From 03d883423c66df5953e067b691d42433fd0c3f1e Mon Sep 17 00:00:00 2001 From: sgenoud Date: Wed, 5 Dec 2018 05:40:47 +0100 Subject: [PATCH] feat(themes): Add the Pitch Black theme (#727) This theme is made with mobile OLED screens (iPhone XS for instance) --- routes/_static/themes.js | 6 ++++++ scss/themes/pitchblack.scss | 25 +++++++++++++++++++++++++ templates/2xx.html | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 scss/themes/pitchblack.scss diff --git a/routes/_static/themes.js b/routes/_static/themes.js index 10d1aa4..dd03143 100644 --- a/routes/_static/themes.js +++ b/routes/_static/themes.js @@ -76,6 +76,12 @@ const themes = [ label: 'Hacker', dark: true, color: '#4ab92f' + }, + { + name: 'pitchblack', + label: 'Pitch Black', + dark: true, + color: '#000' } ] diff --git a/scss/themes/pitchblack.scss b/scss/themes/pitchblack.scss new file mode 100644 index 0000000..a2153ed --- /dev/null +++ b/scss/themes/pitchblack.scss @@ -0,0 +1,25 @@ +$main-theme-color: rgb( 16,61,80); +$body-bg-color: #03131b; +$main-bg-color: #000; +$anchor-color: lighten($main-theme-color, 20%); +$main-text-color: #fafaff; +$border-color: $body-bg-color; +$secondary-text-color: #f6f6ff; +$toast-border: lighten($body-bg-color, 4%); +$toast-bg: lighten($body-bg-color, 4%); +$focus-outline: lighten($main-theme-color, 10%); +$compose-background: darken($main-theme-color, 12%); + +@import "_base.scss"; +@import "_dark.scss"; +@import "_dark_scrollbars.scss"; + +:root { + --settings-list-item-text: #{$anchor-color}; + --settings-list-item-text-hover: #{$anchor-color}; + --settings-list-item-bg-active: #{darken($body-bg-color, 10%)}; + --settings-list-item-bg-hover: #{darken($body-bg-color, 2%)}; + + --form-bg: #{$body-bg-color}; + --form-border: #{darken($border-color, 10%)}; +} diff --git a/templates/2xx.html b/templates/2xx.html index c05e984..c361930 100644 --- a/templates/2xx.html +++ b/templates/2xx.html @@ -50,7 +50,7 @@ html{scrollbar-face-color:var(--scrollbar-face-color);scrollbar-track-color:var( // For perf reasons, this script is run inline to quickly set certain styles. // To allow CSP to work correctly, we also calculate a sha256 hash during // the build process and write it to inline-script-checksum.json. -window.__themeColors = {"default":"royalblue","scarlet":"#e04e41","seafoam":"#177380","hotpants":"hotpink","oaken":"saddlebrown","majesty":"blueviolet","gecko":"#4ab92f","ozark":"#5263af","cobalt":"#08439b","sorcery":"#ae91e8","punk":"#e04e41","riot":"hotpink","hacker":"#4ab92f"} +window.__themeColors = {"default":"royalblue","scarlet":"#e04e41","seafoam":"#177380","hotpants":"hotpink","oaken":"saddlebrown","majesty":"blueviolet","gecko":"#4ab92f","ozark":"#5263af","cobalt":"#08439b","sorcery":"#ae91e8","punk":"#e04e41","riot":"hotpink","hacker":"#4ab92f","pitchblack":"#000"} if (localStorage.store_currentInstance && localStorage.store_instanceThemes) { let safeParse = (str) => str === 'undefined' ? undefined : JSON.parse(str)