From 9d4892044bda2e9f9d875e6c953b1fdaacf5c48f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 16 Apr 2025 14:00:33 -0300 Subject: css: don't hard-code static-4p1 gezus chrikey --- src/content/dependencies/generatePageLayout.js | 6 ++++++ src/static/css/site.css | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index 070c7c82..0acf401c 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -583,6 +583,11 @@ export default { ` background-image: url("${to('media.path', 'bg.jpg')}");\n` + `}`); + const goshFrigginDarnitStyleRule = + `.image-media-link::after {\n` + + ` mask-image: url("${to('staticMisc.path', 'image.svg')}");\n` + + `}`; + const numWallpaperParts = html.resolve(slots.styleRules, {normalize: 'string'}) .match(/\.wallpaper-part:nth-child/g) @@ -733,6 +738,7 @@ export default { .slot('color', slots.color ?? data.wikiColor), fallbackBackgroundStyleRule, + goshFrigginDarnitStyleRule, slots.styleRules, ]), diff --git a/src/static/css/site.css b/src/static/css/site.css index 07c2e7fa..8c53f877 100644 --- a/src/static/css/site.css +++ b/src/static/css/site.css @@ -931,7 +931,11 @@ a .normal-content { background-color: var(--primary-color); - mask-image: url(/static-4p1/misc/image.svg); + /* mask-image is set in content JavaScript, + * because we can't identify the correct nor + * absolute path to the file from CSS. + */ + mask-repeat: no-repeat; mask-position: calc(100% - 2px); vertical-align: text-bottom; -- cgit 1.3.0-6-gf8a5