From 072179bccd9292cf323cbf54e52e6c67ce4a2af6 Mon Sep 17 00:00:00 2001 From: Agahnim Date: Fri, 20 Mar 2026 12:01:22 +0100 Subject: [PATCH] crt: port effect from old site to new one --- static/style.css | 46 ++++++++++++++++++++++++++++++++++++++++++-- templates/base.html | 47 ++++++++++++++++++++++++--------------------- 2 files changed, 69 insertions(+), 24 deletions(-) diff --git a/static/style.css b/static/style.css index a78377b..0b47b47 100644 --- a/static/style.css +++ b/static/style.css @@ -18,11 +18,55 @@ body { overflow: auto; font-family: "DotGothic16", sans-serif; + main { padding-top: 3.5rem; } } +/* CRT Effect */ + +crt { + display: block; + position: relative; + z-index: 9999; + + &::before, + &::after { + content: ""; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + pointer-events: none; + z-index: 2147483647; + } + + &::before { + background: linear-gradient( + to bottom, + transparent 50%, + rgba(0, 0, 0, 0.2) 51% + ); + background-size: 100% 4px; + animation: scanlines 1s steps(60) infinite; + } + + &::after { + width: 100%; + height: 2px; + background: rgba(0, 0, 0, 0.2); + opacity: 0.7; + } +} + +@keyframes scanlines { + 0% { + background-position: 0 50%; + } +} + /* Navbar */ navbar { font-family: "VT323", monospace; @@ -118,6 +162,4 @@ miniplayer { ominous-message { font-style: italic; } - - } \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 02fd5c5..0933a6f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,32 +11,35 @@ - - {% include "partials/header.html" %} - - -

Chargement...

-
-
+ -
- {% block content %}{% endblock %} -
+ + {% include "partials/header.html" %} + + +

Chargement...

+
+
- - + document.body.addEventListener('htmx:afterSwap', updateMiniplayerVisibility); + + +
\ No newline at end of file