diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-05 09:52:36 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-05 09:52:36 +0200 |
| commit | 25b879bd290528adfb47b0042749305a6a408800 (patch) | |
| tree | 22048174696683141c5eaf00a6a4aee34ce8a244 /public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js | |
| parent | 123b15e442a5a2bd2d73fb9d32cdded69a28f109 (diff) | |
| download | danixxyz-theme-25b879bd290528adfb47b0042749305a6a408800.tar.gz danixxyz-theme-25b879bd290528adfb47b0042749305a6a408800.zip | |
fix: resolve matrix rain opacity, menu styling, and featured articles
Issues fixed:
1. Added missing header.css and footer.css imports to main.css (fixes unstyled menu)
2. Increased matrix rain canvas opacity (0.13→0.25, 0.18→0.35) for better visibility
3. Updated home.html to display featured articles first, then latest 3
4. Removed invalid pseudo-element CSS rule on canvas element
The form on /is/here should now be visible, menu properly styled, and matrix rain more prominent.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Diffstat (limited to 'public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js')
| -rw-r--r-- | public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js b/public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js new file mode 100644 index 0000000..0dadf45 --- /dev/null +++ b/public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js @@ -0,0 +1 @@ +(()=>{(function(){let e="danix-theme",o="theme-dark",t="theme-light";function r(){let c=localStorage.getItem(e),n=window.matchMedia("(prefers-color-scheme: dark)").matches;a((c===null?n:c==="dark")?"dark":"light")}function a(c){let n=document.documentElement;n.classList.remove(o,t),c==="dark"?(n.classList.remove(t),localStorage.setItem(e,"dark")):(n.classList.add(t),localStorage.setItem(e,"light"))}function i(){return document.documentElement.classList.contains(t)?"light":"dark"}function d(){let n=i()==="dark"?"light":"dark";a(n),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:n}}))}function l(){let c=document.getElementById("theme-toggle-btn");c&&(c.addEventListener("click",d),s(),window.addEventListener("theme-changed",s))}function s(){let c=document.getElementById("theme-toggle-btn");if(c){let n=i();c.textContent=n==="dark"?"\u2600\uFE0F light":"\u{1F319} dark"}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){r(),l()}):(r(),l()),window.ThemeToggle={toggle:d,set:a,get:i}})();(function(){let e=document.getElementById("matrix-canvas");if(!e||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let o=e.getContext("2d"),t="\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F2\u30F30123456789ABCDEF<>/\\|{}[]$#@!",r=14,a,i,d;function l(){e.width=e.offsetWidth,e.height=e.offsetHeight,a=Math.floor(e.width/r)+1,i=Array.from({length:a},()=>Math.random()*-(e.height/r))}function s(){let c=document.documentElement.classList.contains("theme-light");o.fillStyle=c?"rgba(240,244,248,0.07)":"rgba(6,11,16,0.055)",o.fillRect(0,0,e.width,e.height),o.font=`${r}px "JetBrains Mono", monospace`;for(let n=0;n<a;n++){let m=t[Math.floor(Math.random()*t.length)];o.fillStyle=Math.random()>.96?c?"#008f5a":"#00ff88":c?"#7c3aed":"#a855f7",o.fillText(m,n*r,i[n]*r),i[n]*r>e.height&&Math.random()>.975&&(i[n]=Math.random()*-20),i[n]+=.5}d=requestAnimationFrame(s)}window.addEventListener("theme-changed",function(){},{passive:!0}),l(),window.addEventListener("resize",()=>{cancelAnimationFrame(d),l(),s()},{passive:!0}),document.addEventListener("visibilitychange",()=>{document.hidden?cancelAnimationFrame(d):s()}),s(),window.MatrixRain={init:l,tick:s}})();(function(){let e=document.querySelector(".reading-progress");if(!e)return;let o=document.querySelector("main");if(!o)return;function t(){let i=window.innerHeight,d=document.documentElement.scrollHeight-i,l=window.scrollY,s=d>0?l/d*100:0;e.style.width=s+"%"}o.offsetHeight>window.innerHeight*1.5&&document.body.classList.add("scrollable");let a=!1;window.addEventListener("scroll",function(){a||(requestAnimationFrame(t),a=!0,setTimeout(()=>{a=!1},100))},{passive:!0}),t()})();(function(){document.querySelectorAll("pre, .highlight").forEach(o=>{let t=document.createElement("button");t.className="code-copy-btn",t.textContent="copy",t.type="button",t.setAttribute("aria-label","Copy code");let r=o.querySelector("code"),a=r?r.textContent:o.textContent;t.addEventListener("click",async function(){try{await navigator.clipboard.writeText(a);let i=t.textContent;t.textContent="copied!",t.classList.add("copied"),setTimeout(()=>{t.textContent=i,t.classList.remove("copied")},2e3)}catch(i){console.error("Failed to copy:",i),t.textContent="error"}}),o.style.position="relative",o.appendChild(t)})})();})(); |
