From 94ee809f9ec4b7a47fd8c56857eee6cd7e48bfa1 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Sun, 8 Sep 2024 01:00:53 +0200 Subject: added extra theme --- assets/css/blog.css | 41 +++++++++++++++++++++++++++++++++++---- assets/image/balloon.svg | 1 + assets/js/theme.js | 6 +++++- templates/acknowledgement.html.j2 | 3 ++- templates/sidebar.html.j2 | 8 ++++++-- 5 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 assets/image/balloon.svg diff --git a/assets/css/blog.css b/assets/css/blog.css index ddee44f..a7385e2 100644 --- a/assets/css/blog.css +++ b/assets/css/blog.css @@ -16,7 +16,7 @@ } } -[used-theme="light"] { +[data-theme="light"] { --term-fg: #515151; --term-bg: #f3f3f3; --term-black: #8e8e8e; @@ -33,16 +33,49 @@ } } +[data-theme="pink"] { + --term-fg: #c61c72; + --term-bg: #f8b9ce; + --term-black: #960052; + --term-red: #ff001e; + --term-green: #6fd800; + --term-yellow: #fcf6a6; + --term-blue: #00aff4; + --term-magenta: #a8005b; + --term-cyan: #00dad5; + --term-white: #f3f3f3; + + .filter-yellow { + filter: brightness(0) saturate(100%) invert(95%) sepia(12%) saturate(1428%) hue-rotate(334deg) brightness(108%) contrast(98%); + } +} + a[class*="theme-selector"] { color: var(--term-green); } -html:not([used-theme]) .theme-selector-dark, -html[used-theme="dark"] .theme-selector-dark, -html[used-theme="light"] .theme-selector-light { + +html:not([data-theme]) .theme-selector-dark, +html[data-theme="dark"] .theme-selector-dark, +html[data-theme="light"] .theme-selector-light, +html[data-theme="pink"] .theme-selector-pink, +html:not([data-extended-theme]) .theme-extender-target { display: none; } +.theme-extender { + color: var(--term-fg); + font-weight: normal; +} + +.theme-extender:hover { + text-decoration: none; +} + +html:not([data-extended-theme]) .theme-extender { + color: var(--term-bg); +} + header, .icon-text { display: flex; flex-flow: row; diff --git a/assets/image/balloon.svg b/assets/image/balloon.svg new file mode 100644 index 0000000..62584c0 --- /dev/null +++ b/assets/image/balloon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/theme.js b/assets/js/theme.js index ffb6d48..9f1660c 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -1,5 +1,5 @@ "use strict" -const THEME_KEY = "used-theme"; +const THEME_KEY = "data-theme"; function updateTheme() { let theme = localStorage.getItem(THEME_KEY); @@ -13,4 +13,8 @@ function setTheme(theme) { updateTheme(); } +function setThemeExtend() { + document.documentElement.setAttribute("data-extended-theme", "true") +} + updateTheme(); \ No newline at end of file diff --git a/templates/acknowledgement.html.j2 b/templates/acknowledgement.html.j2 index 6cb5938..2c11f76 100644 --- a/templates/acknowledgement.html.j2 +++ b/templates/acknowledgement.html.j2 @@ -2,7 +2,7 @@ {% block page_title %}Acknowledgement {{ super() }}{% endblock %} {% block page_title_short %}Acknowledgement{% endblock %} {% block content %} -

Acknowledgement

+

Acknowledgement

Thank you for everyone, who made this blog possible, like...

Marcsello who was kind enough to share his blog source with the world, so I could steal get inspired by it
@@ -13,6 +13,7 @@ Jetbrains for their amazing font which I use literally everywhere
terminal.sexy for the cool terminal color template
iconify for all the icons
+Isotropic for their hex to css filter converter

... and last but not least, You dear Reader!

{% endblock %} \ No newline at end of file diff --git a/templates/sidebar.html.j2 b/templates/sidebar.html.j2 index a58c2cb..ef89489 100644 --- a/templates/sidebar.html.j2 +++ b/templates/sidebar.html.j2 @@ -25,15 +25,19 @@ Sometimes I touch upon some more artistic stuff, but mostly just to amuse myself

ls ~/tags/

{% for tag in site.top_tags %}{{ tag }}/{% if not loop.last %} {% endif %}{% endfor %}

I want different colors

-

~/themes/

+

ls ~/themes/ -A

- sweet-celestia.sh + sweet-celestial.sh luna-eclipsed.sh + + + .pinky-swear.sh +

Never miss a post

-- cgit v1.2.3-70-g09d2