From b479a48904d739b0a03d96c9d41236d0f37bc63b Mon Sep 17 00:00:00 2001 From: cube Date: Tue, 24 Mar 2026 21:17:27 +0000 Subject: [PATCH] fix #34 and added dark and pink-lighter themes #11 --- myriad/__init__.py | 7 ++++ myriad/static/themes/dark.css | 46 +++++++++++++++++++++++++++ myriad/static/themes/pink-lighter.css | 44 +++++++++++++++++++++++++ myriad/templates/base.html | 7 ++-- 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 myriad/static/themes/dark.css create mode 100644 myriad/static/themes/pink-lighter.css diff --git a/myriad/__init__.py b/myriad/__init__.py index a365773..56a6589 100644 --- a/myriad/__init__.py +++ b/myriad/__init__.py @@ -32,4 +32,11 @@ def create_app(test_config=None): from . import blog app.register_blueprint(blog.bp) + @app.context_processor + def utility_processor(): + def get_themes(): + themes = os.listdir(app.config["THEMES_FOLDER"]) + return themes + return dict(get_themes=get_themes) + return app diff --git a/myriad/static/themes/dark.css b/myriad/static/themes/dark.css new file mode 100644 index 0000000..1c80d74 --- /dev/null +++ b/myriad/static/themes/dark.css @@ -0,0 +1,46 @@ +.dark{ + background-color:#1B1F23; + border-color:#000000; + color:#D0D5DA; +} +.dark .bio{ + color:#D0D5DA; +} +.dark .heading +{ + background-color:#292F35; + border-color:#000000; + color:#D0D5DA; +} +.dark .heading b +{ + color:#D0D5DA; +} +.dark a{ + color: #D0D5DA; +} +.dark a:hover{ + color: #D0D5DA; +} +.dark ::selection { + background:#D0D5DA; + color: white; + text-shadow: none; +} +.dark ::-moz-selection { + background: #D0D5DA; + color: #EEE; + text-shadow: none; +} +.dark .icon{ + border-color:black; +} + +body.dark{ + background: linear-gradient(90deg, #1B1F23 0%, #1B1F23 50%, #1B1F23 100%); + scrollbar-color:#292F35 #373b3e; +} +.dark .container{ + background-color:#1B1F23; + border-color:black; +} \ No newline at end of file diff --git a/myriad/static/themes/pink-lighter.css b/myriad/static/themes/pink-lighter.css new file mode 100644 index 0000000..f5acbd3 --- /dev/null +++ b/myriad/static/themes/pink-lighter.css @@ -0,0 +1,44 @@ +.pink-lighter{ + background-color:#fddffa; + border-color:#f24ae1; + color:black; +} +.pink-lighter .heading +{ + background-color:#f9bffa; + border-color:#f24ae1; + color:#d85ac1; +} +.pink-lighter .heading b +{ + color:black; +} +.pink-lighter a{ + color: #da14b6; + text-decoration:wavy; +} +.pink-lighter a:hover{ + color: #980e88; +} +.pink-lighter ::selection { + background:#f878e9; + color: white; + text-shadow: none; +} +.pink-lighter ::-moz-selection { + background: #f878e9; + color: #EEE; + text-shadow: none; +} +.pink-lighter .icon{ + border-color:#da14af; +} + +body.pink-lighter{ + background: linear-gradient(90deg, #f5c2ea 0%, #e89dfb 50%, #f6959c 100%); + scrollbar-color:#a414da #d991f4; +} +.pink-lighter .container{ + background-color:#fac9f6; + border-color:#da14c6; +} \ No newline at end of file diff --git a/myriad/templates/base.html b/myriad/templates/base.html index dfc2fc4..2d42413 100644 --- a/myriad/templates/base.html +++ b/myriad/templates/base.html @@ -3,9 +3,10 @@ {% block title %}{% endblock %} - Myriad - - - +{% set themes = get_themes() %} +{% for theme in themes %} + +{% endfor %}