This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
!function(t){"use strict";const e=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function n(t,n){if(!t)return null;const o=Array.prototype.slice.call(t.querySelectorAll(e));return n?o[0]:o[o.length-1]}t.ShaarliProA11y={focusFirst:function(t){const e=n(t,!0);e&&e.focus()},trapFocus:function(t){if(!t)return function(){};function e(e){if("Tab"!==e.key)return;const o=n(t,!0),i=n(t,!1);o&&i&&(e.shiftKey&&document.activeElement===o?(e.preventDefault(),i.focus()):e.shiftKey||document.activeElement!==i||(e.preventDefault(),o.focus()))}return t.addEventListener("keydown",e),function(){t.removeEventListener("keydown",e)}},getFocusable:n}}(window);
|
||||||
Vendored
+2
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+56
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-08-10T00:43:08.243Z",
|
"generatedAt": "2026-08-10T01:14:15.102Z",
|
||||||
"files": {
|
"files": {
|
||||||
"css/style.css": {
|
"css/style.css": {
|
||||||
"dist": "dist/style.min.css",
|
"dist": "dist/style.min.css",
|
||||||
@@ -20,6 +20,61 @@
|
|||||||
"dist": "dist/awesomplete.min.css",
|
"dist": "dist/awesomplete.min.css",
|
||||||
"hash": "3d064bc68c5d",
|
"hash": "3d064bc68c5d",
|
||||||
"size": 1440
|
"size": 1440
|
||||||
|
},
|
||||||
|
"js/i18n.js": {
|
||||||
|
"dist": "dist/i18n.min.js",
|
||||||
|
"hash": "65a93efc158a",
|
||||||
|
"size": 5699
|
||||||
|
},
|
||||||
|
"js/shaarit-rules.js": {
|
||||||
|
"dist": "dist/shaarit-rules.min.js",
|
||||||
|
"hash": "13bd03a5472d",
|
||||||
|
"size": 6394
|
||||||
|
},
|
||||||
|
"js/modules/a11y.js": {
|
||||||
|
"dist": "dist/a11y.min.js",
|
||||||
|
"hash": "74b084c2aa76",
|
||||||
|
"size": 756
|
||||||
|
},
|
||||||
|
"js/modules/theme.js": {
|
||||||
|
"dist": "dist/theme.min.js",
|
||||||
|
"hash": "71ee5209634d",
|
||||||
|
"size": 1920
|
||||||
|
},
|
||||||
|
"js/modules/navigation.js": {
|
||||||
|
"dist": "dist/navigation.min.js",
|
||||||
|
"hash": "e6a4e847315c",
|
||||||
|
"size": 1671
|
||||||
|
},
|
||||||
|
"js/modules/search.js": {
|
||||||
|
"dist": "dist/search.min.js",
|
||||||
|
"hash": "86ff97ee522f",
|
||||||
|
"size": 12525
|
||||||
|
},
|
||||||
|
"js/modules/bulk-actions.js": {
|
||||||
|
"dist": "dist/bulk-actions.min.js",
|
||||||
|
"hash": "3ecca607bd44",
|
||||||
|
"size": 5165
|
||||||
|
},
|
||||||
|
"js/script.js": {
|
||||||
|
"dist": "dist/script.min.js",
|
||||||
|
"hash": "d14722799315",
|
||||||
|
"size": 49872
|
||||||
|
},
|
||||||
|
"js/custom_views.js": {
|
||||||
|
"dist": "dist/custom_views.min.js",
|
||||||
|
"hash": "daa518e70bbc",
|
||||||
|
"size": 132846
|
||||||
|
},
|
||||||
|
"js/awesomplete.min.js": {
|
||||||
|
"dist": "dist/awesomplete.min.js",
|
||||||
|
"hash": "784fb5005249",
|
||||||
|
"size": 7438
|
||||||
|
},
|
||||||
|
"js/metadata.min.js": {
|
||||||
|
"dist": "dist/metadata.min.js",
|
||||||
|
"hash": "61422013d705",
|
||||||
|
"size": 1552
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vendored
+62
@@ -0,0 +1,62 @@
|
|||||||
|
(function () {
|
||||||
|
var loaded = false;
|
||||||
|
var tried = {};
|
||||||
|
|
||||||
|
function toAbsolute(url) {
|
||||||
|
try {
|
||||||
|
return new URL(url, window.location.href).toString();
|
||||||
|
} catch (e) {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadNext(candidates, index) {
|
||||||
|
if (loaded || index >= candidates.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var src = toAbsolute(candidates[index]);
|
||||||
|
if (tried[src]) {
|
||||||
|
loadNext(candidates, index + 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
tried[src] = true;
|
||||||
|
|
||||||
|
var script = document.createElement('script');
|
||||||
|
script.src = src;
|
||||||
|
script.async = false;
|
||||||
|
script.onload = function () {
|
||||||
|
loaded = true;
|
||||||
|
};
|
||||||
|
script.onerror = function () {
|
||||||
|
script.remove();
|
||||||
|
loadNext(candidates, index + 1);
|
||||||
|
};
|
||||||
|
document.head.appendChild(script);
|
||||||
|
}
|
||||||
|
|
||||||
|
var rootPath = (window.shaarli && window.shaarli.rootPath) || '';
|
||||||
|
var basePath = (window.shaarli && window.shaarli.basePath) || '';
|
||||||
|
var assetPath = (window.shaarli && window.shaarli.assetPath) || '';
|
||||||
|
|
||||||
|
var candidates = [];
|
||||||
|
|
||||||
|
if (assetPath) {
|
||||||
|
candidates.push(assetPath.replace(/\/tpl\/shaarli-pro\/?$/, '/tpl/default') + '/js/metadata.min.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (basePath) {
|
||||||
|
candidates.push(basePath + '/tpl/default/js/metadata.min.js');
|
||||||
|
candidates.push(basePath + '/js/metadata.min.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rootPath) {
|
||||||
|
candidates.push(rootPath + '/tpl/default/js/metadata.min.js');
|
||||||
|
candidates.push(rootPath + '/js/metadata.min.js');
|
||||||
|
}
|
||||||
|
|
||||||
|
candidates.push('/js/metadata.min.js');
|
||||||
|
candidates.push('/tpl/default/js/metadata.min.js');
|
||||||
|
|
||||||
|
loadNext(candidates, 0);
|
||||||
|
})();
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded",()=>{"use strict";const e=document.querySelector(".sidebar-add-note");e&&e.addEventListener("click",t=>{if(t.preventDefault(),!window.ShaarItRules)return void console.warn("[shaarit] ShaarItRules not available, cannot generate note URL");const a=e.getAttribute("data-base-path")||"",n=window.ShaarItRules.generateNoteUrl(),o=`${a}/admin/shaare?post=${encodeURIComponent(n)}&tags=note`;window.location.href=o});const t=document.querySelector(".sidebar-add-todo");t&&t.addEventListener("click",e=>{if(e.preventDefault(),!window.ShaarItRules)return void console.warn("[shaarit] ShaarItRules not available, cannot generate todo URL");const a=t.getAttribute("data-base-path")||"",n=window.ShaarItRules.generateTodoUrl(),o=`${a}/admin/shaare?post=${encodeURIComponent(n)}&tags=todo&title=%E2%9C%85%20`;window.location.href=o});const a=document.getElementById("sidebar"),n=document.getElementById("sidebar-overlay"),o=document.getElementById("mobile-menu-btn");function d(){return window.matchMedia("(max-width: 1100px)").matches}function s(){a&&n&&(a.classList.remove("show"),n.classList.remove("show"),o?.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true"),document.body.style.overflow="")}o?.addEventListener("click",function(){a?.classList.contains("show")?s():a&&n&&(a.classList.add("show"),n.classList.add("show"),o?.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),d()&&(document.body.style.overflow="hidden"))}),n?.addEventListener("click",s),a?.querySelectorAll("a").forEach(e=>{e.addEventListener("click",()=>{d()&&s()})}),window.addEventListener("resize",()=>{d()||s()})});
|
||||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
!function(){"use strict";const e="shaarit_themes_config";function t(){try{const t=localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return n&&"object"==typeof n?n:null}catch(e){return null}}window.ShaaritThemeConfig={save:function(n){const o=t()||{},r=Object.assign({version:2,themes:[],default:"DEFAULT",mode:"dark"},o,n||{}),a=function(t){try{return localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){return!1}}(r);return Promise.resolve({ok:a,config:r})},load:function(){return Promise.resolve(t())},findCandidates:function(){return Promise.resolve([])}}}(),document.addEventListener("DOMContentLoaded",()=>{"use strict";const e=document.getElementById("theme-toggle-checkbox"),t=document.getElementById("theme-icon-light"),n=document.querySelector(".theme-toggle-label span"),o=window.ShaarliProI18n||{t:function(e){return e}};function r(){const e=localStorage.getItem("shaarit_theme_id")||"DEFAULT";return-1!==["LINEAR","SPOTIFY","NOTION","DISCORD","DRACULA","ONE_DARK_PRO","TOKYO_NIGHT","NORD","NIGHT_OWL","ANTHRACITE","CYBERPUNK","NAVY_ELEGANCE","EARTHY"].indexOf(e)}function a(a){r()&&(a="dark"),document.documentElement.setAttribute("data-theme",a),localStorage.setItem("theme",a),e&&(e.checked="dark"===a,e.disabled=r(),e.closest(".theme-switch").style.opacity=e.disabled?"0.5":"1"),t&&(t.className="dark"===a?"mdi mdi-weather-night":"mdi mdi-weather-sunny"),n&&(n.textContent="dark"===a?o.t("Dark Mode"):o.t("Light Mode"))}window.addEventListener("themeChanged",()=>{a(localStorage.getItem("theme")||"dark")});a(localStorage.getItem("theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),e&&e.addEventListener("change",()=>{if(r())return;const t=e.checked?"dark":"light";a(t),async function(e){try{if(!window.ShaaritThemeConfig)return;await window.ShaaritThemeConfig.save({mode:e})}catch(e){console.error("[shaarit] Failed to sync mode to bookmark",e)}}(t)})});
|
||||||
Reference in New Issue
Block a user