diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-10 11:29:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-10 11:29:00 +0200 |
| commit | c42150058196f5affad5c6c590e99dd2fc7321c3 (patch) | |
| tree | cb0a7ad297128a43d32111e403959491573b6ace /public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js | |
| parent | d51e4ef7dcd8609cd008a803f9d51674ac3d3ed2 (diff) | |
| download | danixxyz-theme-c42150058196f5affad5c6c590e99dd2fc7321c3.tar.gz danixxyz-theme-c42150058196f5affad5c6c590e99dd2fc7321c3.zip | |
feat: complete Hugo theme implementation from mockups
Transform all production-ready mockup files into a fully functional Hugo theme
with all design patterns, components, and interactivity. Implements the complete
plan: token alignment, global shell, homepage, articles section, single article
views, photo gallery, static pages, and 404 page.
Changes:
- Phase 0: Token alignment (--color-* → --type-*, add spacing/z-index/timing scales)
- Phase 1a: Global shell (baseof.html, hamburger menu, theme toggle, matrix rain)
- Phase 1b: Homepage (hero layout, glitch/typing/scroll-reveal effects)
- Phase 1c: Articles section (timeline layout, filter system, featured cards)
- Phase 1d: Single article (meta bar, share sidebar, footer nav, progress bar)
- Phase 1e: Photo gallery (lightbox, grid layout, shortcode updates)
- Phase 1f: Static pages (about/contact page layout)
- Phase 1g: 404 page (standalone HTML, quote randomization, recent articles)
New files:
- 6 CSS components: hamburger, article-hero, share-sidebar, timeline, lightbox, 404
- 8 JS modules: hamburger, glitch, typing, scroll-reveal, share-sidebar, lightbox, 404, photo-utils
- 6 template partials: article-single, featured-card, photo-article, share-sidebar, static-page, timeline-item
- 1 layout: 404.html (standalone)
Updated:
- All CSS variables with comprehensive token system
- All JS modules integrated into main.js
- All shortcodes (gallery, gal-img) for lightbox compatibility
- All layout files (baseof, home, section, page) with new dispatching logic
Verified: Hugo build succeeds with 21 pages, no errors.
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, 0 insertions, 1 deletions
diff --git a/public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js b/public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js deleted file mode 100644 index 0dadf45..0000000 --- a/public/js/main.55ed9b054bac537d7aab80112d090a8b88bbcaae5dec86c26009f393fd2d213d.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{(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)})})();})(); |
