From 57070cb14a577f2befd7691194e0fb61f07fbd21 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Thu, 27 Mar 2025 15:00:01 -0700 Subject: [PATCH] feat: add dark mode and announcement component --- components/announcement-banner/about.json | 14 ++++ .../announcement-banner/common/common.scss | 28 ++++++++ .../announcement-banner/common/head_tag.html | 65 +++++++++++++++++++ palettes/sakura-dreams-dark.json | 16 +++++ .../{sakura-dreams => sakura-dreams.json} | 0 themes/sakura-dreams-dark/about.json | 14 ++++ themes/sakura-dreams-dark/common/common.scss | 20 ++++++ 7 files changed, 157 insertions(+) create mode 100644 components/announcement-banner/about.json create mode 100644 components/announcement-banner/common/common.scss create mode 100644 components/announcement-banner/common/head_tag.html create mode 100644 palettes/sakura-dreams-dark.json rename palettes/{sakura-dreams => sakura-dreams.json} (100%) create mode 100644 themes/sakura-dreams-dark/about.json create mode 100644 themes/sakura-dreams-dark/common/common.scss diff --git a/components/announcement-banner/about.json b/components/announcement-banner/about.json new file mode 100644 index 0000000..e295339 --- /dev/null +++ b/components/announcement-banner/about.json @@ -0,0 +1,14 @@ +{ + "name": "announcement-banner-DO-NOT-REMOVE", + "component": true, + "license_url": null, + "about_url": null, + "authors": null, + "theme_version": null, + "minimum_discourse_version": null, + "maximum_discourse_version": null, + "assets": {}, + "color_schemes": {}, + "modifiers": {}, + "learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966" +} \ No newline at end of file diff --git a/components/announcement-banner/common/common.scss b/components/announcement-banner/common/common.scss new file mode 100644 index 0000000..41bb968 --- /dev/null +++ b/components/announcement-banner/common/common.scss @@ -0,0 +1,28 @@ +.announcement { + background-color: #a32952; + font-family: monospace; + color: #ffefef; + font-size: 1em; + line-height: 1.4; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + margin: 1em 0; + padding: 1em; +} + +.announcement a { + color: #ffefef; + font-weight: bold; + text-decoration: underline; + padding: 0 4px; +} + +.announcement a:hover { + cursor: pointer; +} + +.announcement-heading { + text-align: center; +} diff --git a/components/announcement-banner/common/head_tag.html b/components/announcement-banner/common/head_tag.html new file mode 100644 index 0000000..2b37948 --- /dev/null +++ b/components/announcement-banner/common/head_tag.html @@ -0,0 +1,65 @@ + + + + + \ No newline at end of file diff --git a/palettes/sakura-dreams-dark.json b/palettes/sakura-dreams-dark.json new file mode 100644 index 0000000..9bbf108 --- /dev/null +++ b/palettes/sakura-dreams-dark.json @@ -0,0 +1,16 @@ +{ + "Sakura Dreams Dark": { + "primary": "fff5f8", + "secondary": "7a2048", + "tertiary": "ff85a1", + "quaternary": "c75b7c", + "header_background": "7a2048", + "header_primary": "ffb7c5", + "highlight": "ffb7c5", + "danger": "ff5c5c", + "success": "ff9ecf", + "love": "ff6eb5", + "selected": "ffd6e0", + "hover": "ffecf2" + } +} diff --git a/palettes/sakura-dreams b/palettes/sakura-dreams.json similarity index 100% rename from palettes/sakura-dreams rename to palettes/sakura-dreams.json diff --git a/themes/sakura-dreams-dark/about.json b/themes/sakura-dreams-dark/about.json new file mode 100644 index 0000000..05311a3 --- /dev/null +++ b/themes/sakura-dreams-dark/about.json @@ -0,0 +1,14 @@ +{ + "name": "Sakura Dreams Dark", + "component": false, + "license_url": null, + "about_url": null, + "authors": null, + "theme_version": null, + "minimum_discourse_version": null, + "maximum_discourse_version": null, + "assets": {}, + "color_schemes": {}, + "modifiers": {}, + "learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966" +} \ No newline at end of file diff --git a/themes/sakura-dreams-dark/common/common.scss b/themes/sakura-dreams-dark/common/common.scss new file mode 100644 index 0000000..2413bd1 --- /dev/null +++ b/themes/sakura-dreams-dark/common/common.scss @@ -0,0 +1,20 @@ +body::before { + background: url(https://cdn.nhcarrigan.com/background.png); + background-size: cover; + background-position: center; + width: 100%; + height: 100%; + z-index: -1; + content: ""; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 1; + pointer-events: none; +} + +body { + background-color: #7a2048dd; +} \ No newline at end of file