summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/blog.css18
-rw-r--r--modules/blogpost_processor.py2
m---------modules/warko0
3 files changed, 20 insertions, 0 deletions
diff --git a/assets/css/blog.css b/assets/css/blog.css
index 0aa6459..e921a73 100644
--- a/assets/css/blog.css
+++ b/assets/css/blog.css
@@ -295,6 +295,24 @@ a.posts-listing-link:hover :is(h2, h3)
text-decoration: underline;
}
+.spoiler {
+ position: absolute;
+ left:-10000px;
+}
+
+.spoiler:checked ~ label.spoiler-on,
+.spoiler:not(:checked) ~ label.spoiler-off {
+ display: none;
+}
+
+label.spoiler-on {
+ background-color: var(--term-fg);
+}
+
+label.spoiler-off {
+ background-color: var(--term-black);
+}
+
@media (min-width: 768px) {
main {
border-width: 0.15rem;
diff --git a/modules/blogpost_processor.py b/modules/blogpost_processor.py
index 0af1409..39e2238 100644
--- a/modules/blogpost_processor.py
+++ b/modules/blogpost_processor.py
@@ -15,6 +15,7 @@ from .warko.extendedimage import get_image_renderer, ExtendedImageElement
from .warko.newtablink import get_new_tab_links
from .warko.quote import Quote
from .warko.fakehtmltag import FakeHtml
+from .warko.spoiler import Spoiler
from ..config import Config
CONTENT_FILE_NAME = "content.md"
@@ -48,6 +49,7 @@ class Post:
, get_new_tab_links(["blog.wazul.moe"])
, Quote
, FakeHtml
+ , Spoiler
]
)
diff --git a/modules/warko b/modules/warko
-Subproject 57ad1a02f119e81d44141c7f4960574132f392c
+Subproject 0f2a22208906cb2f7aeaf01bccaeb9c58fb83ae