From 67f6e179f4a3f1a1369519797209d4f009efbbbd Mon Sep 17 00:00:00 2001 From: Deimos Date: Mon, 5 Aug 2019 13:01:32 -0600 Subject: [PATCH] Add Zenburn theme I was doing some work on an old site over the weekend that uses this color scheme and it reminded me how much I used to like it. Might as well! --- tildes/scss/styles.scss | 1 + tildes/scss/themes/_zenburn.scss | 41 +++++++++++++++++++++++++++++ tildes/tildes/templates/base.jinja2 | 5 +++- tildes/tildes/views/settings.py | 1 + 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tildes/scss/themes/_zenburn.scss diff --git a/tildes/scss/styles.scss b/tildes/scss/styles.scss index 6b71c24..da31d4d 100644 --- a/tildes/scss/styles.scss +++ b/tildes/scss/styles.scss @@ -46,3 +46,4 @@ @import "themes/dracula"; @import "themes/atom_one_dark"; @import "themes/solarized"; +@import "themes/zenburn"; diff --git a/tildes/scss/themes/_zenburn.scss b/tildes/scss/themes/_zenburn.scss new file mode 100644 index 0000000..3448205 --- /dev/null +++ b/tildes/scss/themes/_zenburn.scss @@ -0,0 +1,41 @@ +// Color palette is Jani Nurminen's "Zenburn" +// http://kippura.org/zenburnpage/ + +// Basic monochrome colors +$background: #3f3f3f; +$background-alt: #4f4f4f; +$foreground: #dcdccc; +$foreground-alt: #aaa; +$border: #5b605e; + +// Accent colors +$blue: #8cd0d3; +$green: #7f9f7f; +$green-bright: #80d4aa; +$pink: #dca3a3; +$red: #dc8c6c; +$purple: #bc8cbc; +$yellow: #efef8f; + +// Actual theme definition +$theme-zenburn: ( + "alert": $green-bright, + "background-primary": $background, + "background-secondary": $background-alt, + "border": $border, + "comment-label-exemplary": $blue, + "comment-label-joke": $green, + "comment-label-noise": $yellow, + "comment-label-offtopic": $pink, + "comment-label-malice": $red, + "error": $red, + "foreground-primary": $foreground, + "foreground-secondary": $foreground-alt, + "link": $blue, + "link-visited": $purple, + "warning": $yellow, +); + +body.theme-zenburn { + @include use-theme($theme-zenburn); +} diff --git a/tildes/tildes/templates/base.jinja2 b/tildes/tildes/templates/base.jinja2 index de1e3c2..51bef86 100644 --- a/tildes/tildes/templates/base.jinja2 +++ b/tildes/tildes/templates/base.jinja2 @@ -28,6 +28,8 @@ {% elif request.cookies.get('theme', '') == 'black' %} + {% elif request.cookies.get('theme', '') == 'zenburn' %} + {% endif %} {% assets "css" %} @@ -113,7 +115,8 @@ ("dark", "Solarized Dark"), ("dracula", "Dracula"), ("atom-one-dark", "Atom One Dark"), - ("black", "Black")) %} + ("black", "Black"), + ("zenburn", "Zenburn")) %}