From cb379596c5cbaeb98480cc727ea6639d938e28d9 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 11 Jan 2024 08:53:40 -0400 Subject: content, css: reveal-heading -> reveal-symbol, use warning icon --- src/content/dependencies/image.js | 6 ++- src/static/site6.css | 13 +++--- src/static/warning.svg | 93 +++++++++++++++++++++++++++++++++++++++ src/strings-default.yaml | 1 - 4 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 src/static/warning.svg (limited to 'src') diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js index 6d58bd23..7ef50e5b 100644 --- a/src/content/dependencies/image.js +++ b/src/content/dependencies/image.js @@ -3,6 +3,7 @@ import {empty} from '#sugar'; export default { extraDependencies: [ + 'cachebust', 'checkIfImagePathHasCachedThumbnails', 'getDimensionsOfImagePath', 'getSizeOfImagePath', @@ -71,6 +72,7 @@ export default { }, generate(data, relations, slots, { + cachebust, checkIfImagePathHasCachedThumbnails, getDimensionsOfImagePath, getSizeOfImagePath, @@ -186,8 +188,8 @@ export default { let reveal = null; if (willReveal) { reveal = [ - html.tag('span', {class: 'reveal-heading'}, - language.$('misc.contentWarnings.heading')), + html.tag('img', {class: 'reveal-symbol'}, + {src: to('shared.staticFile', 'warning.svg', cachebust)}), html.tag('br'), diff --git a/src/static/site6.css b/src/static/site6.css index 772ebc47..a932dfe3 100644 --- a/src/static/site6.css +++ b/src/static/site6.css @@ -1159,14 +1159,15 @@ img.pixelate { padding-bottom: 0.5em; } -.reveal-heading { - font-size: 1.2em; - opacity: 0.8; - font-weight: 800; +.reveal-symbol { + display: inline-block; width: 1em; height: 1em; - margin-bottom: 0.4em; - display: inline-block; + margin-bottom: 0.1em; + + font-size: 1.6em; + opacity: 0.8; + background-image: url("warning.svg"); } .reveal-interaction { diff --git a/src/static/warning.svg b/src/static/warning.svg new file mode 100644 index 00000000..92e55778 --- /dev/null +++ b/src/static/warning.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/strings-default.yaml b/src/strings-default.yaml index ca9da426..92f034f8 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -646,7 +646,6 @@ misc: contentWarnings: warnings: "{WARNINGS}" - heading: "ⓘ" reveal: "click to show" # albumGrid: -- cgit 1.3.0-6-gf8a5