diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-25 20:41:04 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-25 20:41:04 +0100 |
commit | c318211f63576e728e90151994994da32526f286 (patch) | |
tree | 3a5c2c1cac6bef4af109498278a3013b0b418924 | |
parent | e7596b1b3cb58ad774aa8b7fad66d5f2298baa1a (diff) |
use html hidden attribute instead of custom class
-rw-r--r-- | _includes/outdated.html | 2 | ||||
-rw-r--r-- | _sass/layout.scss | 1 | ||||
-rw-r--r-- | script.js | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/_includes/outdated.html b/_includes/outdated.html index 2840b70..7859ecd 100644 --- a/_includes/outdated.html +++ b/_includes/outdated.html @@ -1,4 +1,4 @@ -<blockquote class="admonition hidden" x-unhide-after="{{ include.date | date: "%s" | plus: site.stale_threshold }}"> +<blockquote class="admonition" hidden x-unhide-after="{{ include.date | date: "%s" | plus: site.stale_threshold }}"> <p class="title">Warning</p> <p>This post was last updated on {{ include.date | datefmt }}, and may no longer contain accurate or up-to-date information.</p> diff --git a/_sass/layout.scss b/_sass/layout.scss index f944710..c8ada80 100644 --- a/_sass/layout.scss +++ b/_sass/layout.scss @@ -129,4 +129,3 @@ table { margin-right: auto; } -.hidden { display: none; } @@ -2,7 +2,7 @@ let now = Date.now() / 1000; document.querySelectorAll("[x-unhide-after]").forEach(el => { if (now > el.getAttribute("x-unhide-after")) - el.classList.remove("hidden"); + el.removeAttribute("hidden"); }); } |