aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-25 20:41:04 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-25 20:41:04 +0100
commitc318211f63576e728e90151994994da32526f286 (patch)
tree3a5c2c1cac6bef4af109498278a3013b0b418924
parente7596b1b3cb58ad774aa8b7fad66d5f2298baa1a (diff)
use html hidden attribute instead of custom class
-rw-r--r--_includes/outdated.html2
-rw-r--r--_sass/layout.scss1
-rw-r--r--script.js2
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; }
diff --git a/script.js b/script.js
index d424c04..efaecbf 100644
--- a/script.js
+++ b/script.js
@@ -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");
});
}