From 67e15c8e299bd278097a1321ed9b8934c35675df Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 17 Jun 2022 20:31:32 -0400 Subject: themes/default/layouts/_default/summary: Rename nsfw to unsafe Use unsafe as boolean. --- assets/css/default.css | 18 +++++++++--------- content/canory/messages/nsfw.md | 16 ---------------- content/canory/messages/unsafe.md | 16 ++++++++++++++++ themes/default/layouts/_default/summary.html | 12 ++++++------ 4 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 content/canory/messages/nsfw.md create mode 100644 content/canory/messages/unsafe.md diff --git a/assets/css/default.css b/assets/css/default.css index 2c98d66..9bb35d1 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -844,18 +844,18 @@ micro-header footer p { display: inline; } -micro-nsfw-content * { +micro-unsafe-content * { visibility: hidden; opacity: 0; pointer-events: none; } -micro-nsfw details svg { +micro-unsafe details svg { stroke-width: 0.1rem; margin-right: 0.15rem; } -micro-nsfw details summary { +micro-unsafe details summary { font-variant: all-small-caps; letter-spacing: 0.025rem; line-height: 1.25; @@ -864,11 +864,11 @@ micro-nsfw details summary { list-style: none; } -micro-nsfw details > summary::-webkit-details-marker { +micro-unsafe details > summary::-webkit-details-marker { display: none; } -micro-nsfw-content { +micro-unsafe-content { border-radius: 0.25rem; display: block; background: repeating-linear-gradient( @@ -880,7 +880,7 @@ micro-nsfw-content { ); } -micro-nsfw details[open] + micro-nsfw-content * { +micro-unsafe details[open] + micro-unsafe-content * { filter: none; transition: 1s; visibility: visible; @@ -890,17 +890,17 @@ micro-nsfw details[open] + micro-nsfw-content * { pointer-events: auto; } -micro-nsfw details[open] + micro-nsfw-content { +micro-unsafe details[open] + micro-unsafe-content { background: none; } @supports (filter: blur(2rem)) { - micro-nsfw-content * { + micro-unsafe-content * { filter: blur(2rem); visibility: unset; opacity: unset; } - micro-nsfw-content { + micro-unsafe-content { outline: none; background: unset; } diff --git a/content/canory/messages/nsfw.md b/content/canory/messages/nsfw.md deleted file mode 100644 index 0f24896..0000000 --- a/content/canory/messages/nsfw.md +++ /dev/null @@ -1,16 +0,0 @@ -+++ -date = "2022-03-09T02:43:51+00:00" -lastmod = "2022-03-09T02:43:51+00:00" -tags = [ "docs", "nsfw" ] -nsfw = "1" -author = "canory" -+++ - -Is it safe? Well this message ain't. -{{< quote - "Evil communications corrupt good manners" - "https://www.kingjamesbibleonline.org/1-Corinthians-15-33/" ->}}. Grace your hearers with a warning before things get unsavory. -Shoo. - -{{< youtube "gk8XGnKLhfU" "Monopoly Mermaid Monday" >}} diff --git a/content/canory/messages/unsafe.md b/content/canory/messages/unsafe.md new file mode 100644 index 0000000..8874fb7 --- /dev/null +++ b/content/canory/messages/unsafe.md @@ -0,0 +1,16 @@ ++++ +date = "2022-03-09T02:43:51+00:00" +lastmod = "2022-03-09T02:43:51+00:00" +tags = [ "docs", "unsafe" ] +unsafe = true +author = "canory" ++++ + +Is it safe? Well this message ain't. +{{< quote + "Evil communications corrupt good manners" + "https://www.kingjamesbibleonline.org/1-Corinthians-15-33/" +>}}. Grace your hearers with a warning before things get unsavory. +Shoo. + +{{< youtube "gk8XGnKLhfU" "Monopoly Mermaid Monday" >}} diff --git a/themes/default/layouts/_default/summary.html b/themes/default/layouts/_default/summary.html index 430ec86..ec0037f 100644 --- a/themes/default/layouts/_default/summary.html +++ b/themes/default/layouts/_default/summary.html @@ -8,15 +8,15 @@ {{ partial "card-meta.html" . }} - {{ if .Params.nsfw }} - + {{ if .Params.unsafe }} +
{{ safeHTML (readFile "static/icons/feather/alert-circle.svg") }} Danger: Unsafe Content. Click here to show/hide
- + {{ end }} {{- .Content | @@ -24,9 +24,9 @@ replaceRE "

" "" | safeHTML -}} - {{ if .Params.nsfw }} -
-
+ {{ if .Params.unsafe }} + + {{ end }} {{ partial "tags.html" . }} -- cgit v1.2.3