feat(themes): Add the Pitch Black theme (#727)

This theme is made with mobile OLED screens (iPhone XS for instance)
This commit is contained in:
sgenoud 2018-12-05 05:40:47 +01:00 committed by Nolan Lawson
parent 0f0db010eb
commit 03d883423c
3 changed files with 32 additions and 1 deletions

View file

@ -76,6 +76,12 @@ const themes = [
label: 'Hacker', label: 'Hacker',
dark: true, dark: true,
color: '#4ab92f' color: '#4ab92f'
},
{
name: 'pitchblack',
label: 'Pitch Black',
dark: true,
color: '#000'
} }
] ]

View file

@ -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%)};
}

View file

@ -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. // 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 // To allow CSP to work correctly, we also calculate a sha256 hash during
// the build process and write it to inline-script-checksum.json. // 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) { if (localStorage.store_currentInstance && localStorage.store_instanceThemes) {
let safeParse = (str) => str === 'undefined' ? undefined : JSON.parse(str) let safeParse = (str) => str === 'undefined' ? undefined : JSON.parse(str)