@markbattistella/docsify-sidebarfooter 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /*! docsify-sidebarFooter.js v5.0.0 | (c) Mark Battistella */
1
+ /*! docsify-sidebarFooter.js v5.0.1 | (c) Mark Battistella */
2
2
  'use strict';
3
3
 
4
4
  // MARK: - check if object exists and is not empty
@@ -1,2 +1,2 @@
1
- /* docsify-sidebarFooter.js v5.0.0 | (c) Mark Battistella */
1
+ /* docsify-sidebarFooter.js v5.0.1 | (c) Mark Battistella */
2
2
  "use strict";function doesObjectExists(o){return null!=o&&o.constructor===Object&&0<Object.keys(o).length}function getFooter(o){(new Date).getFullYear();o.name,o.url,o.copyYear,o.policy,o.terms,o.cookies,o.customStyle}var options={name:"",url:"",copyYear:"",policy:!0,terms:!0,cookies:!0,customStyle:!1};function autoFooter(o,t){o.init(function(){var o,t,e;getFooter(options),"boolean"!=typeof options.customStyle&&"string"!=typeof options.customStyle||"boolean"==typeof options.customStyle&&!0===options.customStyle||(o="#mb-footer { border-top: 1px solid; font-size: 0.8em; line-height: 1.5; transition: all var(--sidebar-transition-duration) ease-out; }",("boolean"==typeof options.customStyle&&!1===options.customStyle||"sidebar"===options.customStyle)&&(o+="#mb-footer { padding-top: 1.5rem; margin-top: 1.5rem; } #mb-footer .footer-text, #mb-footer .footer-text a { font-weight: bold; }"),"body"===options.customStyle&&(!$docsify.loadSidebar&&null!==$docsify.loadSidebar&&$docsify.hideSidebar||(o+="body #mb-footer { margin-left: var(--sidebar-width); } body.close #mb-footer { margin-left: 0; }"),o+="#mb-footer { padding: 1.5rem; } #mb-footer .footer-container { max-width: var(--content-max-width); margin: 0 auto; } #mb-footer .footer-container { display: grid; grid-template-columns: auto auto; } #mb-footer .footer-container a { margin-left: 2em; } #mb-footer .footer-link { text-align: right; }@media (max-width: 680px) { #mb-footer .footer-container { grid-template-columns: auto; }#mb-footer .footer-text, #mb-footer .footer-link { text-align: center; } } @media (max-width: 400px) { #mb-footer .footer-text, #mb-footer .footer-link { text-align: left; } #mb-footer span { display: block; } #mb-footer .footer-container a { margin: 0; } }"),t=document.querySelector("head"),e=document.createElement("style"),t.appendChild(e),e.appendChild(document.createTextNode(o)))}),o.doneEach(function(){var r,a,o,t,e,n,i,s,c=document.getElementById("mb-footer");c&&(t=(new Date).getFullYear(),r=window.location.origin+window.location.pathname+"#/",a=function(o){var t=document.createElement("a");return t.href=o,t.host!==window.location.host},s=function(o,t,e,n){var i="";return"boolean"!=typeof o&&"string"!=typeof o||("boolean"==typeof o&&o?i='<a href="'.concat(r+e,'">').concat(t,"</a>"):"string"==typeof o&&(i=(a(o)?'<a target="_blank" href="'.concat(o,'">'):'<a href="'.concat(r+o,'">')).concat(t,"</a>"))),i&&(e="".concat(n.toLowerCase().replace(/\s+/g,"-")),i='<span class="'.concat(e,'">').concat(i,"</span>")),i},o="</div>",t='<span class="footer-text-copyright">Copyright &copy; '.concat(options.copyYear&&options.copyYear<=t?"".concat(options.copyYear).concat(options.copyYear<t?"&#45;"+t:""):t,"</span>"),e=s(options.url,options.name,"","footer-text-author"),n=s(options.policy,"Policy","_policy","footer-links-policy"),i=s(options.terms,"Terms","_terms","footer-links-terms"),s=s(options.cookies,"Cookies","_cookies","footer-links-cookies"),c.innerHTML='<div class="footer-container"><div class="footer-text">'+t+e+o+'<div class="footer-link">'+n+i+s+o+o)})}void 0!==options&&doesObjectExists(options)?(window.$docsify.autoFooter=Object.assign(options,window.$docsify.autoFooter),window.$docsify.plugins=[].concat(autoFooter,window.$docsify.plugins)):console.error("ERROR: sidebar-footer configuration not set\nThis error appears when:\n - the `autoSidebar` not found index.html file\n - the `autoSidebar` is empty");
package/package.json CHANGED
@@ -1,18 +1,15 @@
1
1
  {
2
2
  "name": "@markbattistella/docsify-sidebarfooter",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Add a footer notice for Docsify.js",
5
- "main": "dist/docsify-sidebar.min.js",
5
+ "main": "./dist/docsify-sidebar.min.js",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/markbattistella/docsify-sidebarFooter.git"
9
9
  },
10
- "author": "Mark Battistella",
11
- "license": "MIT",
12
- "bugs": {
13
- "url": "https://github.com/markbattistella/docsify-sidebarFooter/issues"
14
- },
15
- "homepage": "https://footer.docsify.markbattistella.com",
10
+ "scripts": {},
11
+ "unpkg": "./dist/docsify-sidebar.min.js",
12
+ "jsdelivr": "./dist/docsify-sidebar.min.js",
16
13
  "keywords": [
17
14
  "footer",
18
15
  "copyright",
@@ -25,5 +22,11 @@
25
22
  "cookie policy",
26
23
  "docsify",
27
24
  "docsify plugin"
28
- ]
25
+ ],
26
+ "author": "Mark Battistella",
27
+ "license": "MIT",
28
+ "bugs": {
29
+ "url": "https://github.com/markbattistella/docsify-sidebar-footer/issues"
30
+ },
31
+ "homepage": "https://footer.docsify.markbattistella.com"
29
32
  }