From 4574c4cc0cbc26bdec9cf7d0872ae7401c7cc76b Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 16 Apr 2026 00:24:58 +0200 Subject: Complete matrix rain background effect implementation - Add canvas-based matrix rain animation with ASCII + katakana characters - Implement per-column animation with varied drop speeds (2-4 frame throttle) - Theme-aware colors: purple and green accents with live switching - Homepage: 28% opacity (dark) / 35% opacity (light) for prominent hero effect - Inner pages: 13% opacity (dark) / 18% opacity (light) for subtle side gutters - Respect prefers-reduced-motion system setting - Add opaque background to content grids to block rain under text - Add .content-grid class to differentiate single pages from list pages - Add solid background to article list item cards - Update article list item with bg-bg class for readability - Z-index stack: canvas (z-1), content grid (z-9), main content (z-10) Files modified: - matrix-rain.js: new IIFE animation script with MutationObserver for theme switching - baseof.html: add canvas element and script tag with guard - main.css: add canvas positioning, opacity rules, content grid background - _default/single.html: add max-w-7xl and .content-grid class - articles/single.html: add max-w-7xl and .content-grid class - is/list.html: add max-w-7xl and .content-grid class - article-list-item.html: add bg-bg class for solid background Co-Authored-By: Claude Haiku 4.5 --- themes/danix-xyz-hacker/layouts/_default/baseof.html | 11 ++++++++++- themes/danix-xyz-hacker/layouts/_default/single.html | 2 +- themes/danix-xyz-hacker/layouts/articles/single.html | 2 +- themes/danix-xyz-hacker/layouts/is/list.html | 2 +- .../danix-xyz-hacker/layouts/partials/article-list-item.html | 2 +- 5 files changed, 14 insertions(+), 5 deletions(-) (limited to 'themes/danix-xyz-hacker/layouts') diff --git a/themes/danix-xyz-hacker/layouts/_default/baseof.html b/themes/danix-xyz-hacker/layouts/_default/baseof.html index 7e8338a..efeba38 100644 --- a/themes/danix-xyz-hacker/layouts/_default/baseof.html +++ b/themes/danix-xyz-hacker/layouts/_default/baseof.html @@ -27,7 +27,7 @@ {{ $chroma := resources.Get "css/chroma-custom.css" | minify }} - + {{ if eq .Kind "page" }}
+ + + {{ end }} + + + {{ with resources.Get "js/matrix-rain.js" }} + {{ $s := . | minify }} + + {{ end }} diff --git a/themes/danix-xyz-hacker/layouts/_default/single.html b/themes/danix-xyz-hacker/layouts/_default/single.html index 16d519f..5707968 100644 --- a/themes/danix-xyz-hacker/layouts/_default/single.html +++ b/themes/danix-xyz-hacker/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }}
-
+
diff --git a/themes/danix-xyz-hacker/layouts/articles/single.html b/themes/danix-xyz-hacker/layouts/articles/single.html index 93abdb6..fe2ff6e 100644 --- a/themes/danix-xyz-hacker/layouts/articles/single.html +++ b/themes/danix-xyz-hacker/layouts/articles/single.html @@ -2,7 +2,7 @@ {{ $articleType := .Params.type | default "life" }} {{ $template := printf "article-types/%s.html" $articleType }}
-
+
diff --git a/themes/danix-xyz-hacker/layouts/is/list.html b/themes/danix-xyz-hacker/layouts/is/list.html index 7535a37..1184b18 100644 --- a/themes/danix-xyz-hacker/layouts/is/list.html +++ b/themes/danix-xyz-hacker/layouts/is/list.html @@ -1,6 +1,6 @@ {{ define "main" }}
-
+
diff --git a/themes/danix-xyz-hacker/layouts/partials/article-list-item.html b/themes/danix-xyz-hacker/layouts/partials/article-list-item.html index 70d530c..29f8d2b 100644 --- a/themes/danix-xyz-hacker/layouts/partials/article-list-item.html +++ b/themes/danix-xyz-hacker/layouts/partials/article-list-item.html @@ -13,7 +13,7 @@ {{ end }} {{ end }} -