CI / build (push) Failing after 6m2s
Introduce a Node build system for minified CSS/JS with content hashes, add PWA support, i18n helpers, accessibility improvements, and more translatable strings. Move theme configuration from bookmarks to localStorage, add Playwright tests, and set up CI workflows.
1 line
1.6 KiB
JavaScript
1 line
1.6 KiB
JavaScript
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()})}); |