mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 01:35:11 +00:00
implement dark theme
This commit is contained in:
parent
2db24b059f
commit
4ddecf2aaa
6 changed files with 51 additions and 7 deletions
33
ui/dist/themes/dark.css
vendored
Normal file
33
ui/dist/themes/dark.css
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
:root {
|
||||||
|
/* Colors */
|
||||||
|
--color-primary: #009688;
|
||||||
|
--color-canvas: #0f1517;
|
||||||
|
--color-bg: #1a2327;
|
||||||
|
--color-bg-alt: #314048;
|
||||||
|
--color-help: #AAA;
|
||||||
|
--color-error: #a94442;
|
||||||
|
--color-load-screen-text: #FFF;
|
||||||
|
--color-money: var(--color-primary);
|
||||||
|
--color-meta-light: #757575;
|
||||||
|
--color-dark-overlay: rgb(15, 21, 23, 0.85);
|
||||||
|
|
||||||
|
/* Text */
|
||||||
|
--text-color: #FFF;
|
||||||
|
|
||||||
|
/* Input */
|
||||||
|
--input-bg: transparent;
|
||||||
|
--input-active-bg: rgba(0,0,0, 0.65);
|
||||||
|
--input-border-color: rgba(255,255,255, 0.25);
|
||||||
|
|
||||||
|
/* Search */
|
||||||
|
--search-bg: rgba(0,0,0, 0.45);
|
||||||
|
--search-active-bg: rgba(0,0,0, 0.75);
|
||||||
|
--search-border: 1px solid rgba(0,0,0, 0.5);
|
||||||
|
|
||||||
|
/* Select */
|
||||||
|
--select-bg: var(--color-bg-alt);
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
--header-color: #EEE;
|
||||||
|
--header-active-color: #FFF;
|
||||||
|
}
|
|
@ -19,6 +19,10 @@ class App extends React.PureComponent {
|
||||||
alertError(event.detail);
|
alertError(event.detail);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
getThemes();
|
||||||
|
|
||||||
|
setTheme();
|
||||||
|
|
||||||
if (!this.props.upgradeSkipped) {
|
if (!this.props.upgradeSkipped) {
|
||||||
checkUpgradeAvailable();
|
checkUpgradeAvailable();
|
||||||
}
|
}
|
||||||
|
@ -32,12 +36,6 @@ class App extends React.PureComponent {
|
||||||
this.scrollListener = () => this.props.recordScroll(window.scrollY);
|
this.scrollListener = () => this.props.recordScroll(window.scrollY);
|
||||||
|
|
||||||
window.addEventListener("scroll", this.scrollListener);
|
window.addEventListener("scroll", this.scrollListener);
|
||||||
|
|
||||||
// Load themes
|
|
||||||
getThemes();
|
|
||||||
|
|
||||||
// Select theme
|
|
||||||
setTheme();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
|
@ -7,6 +7,7 @@ html
|
||||||
}
|
}
|
||||||
body
|
body
|
||||||
{
|
{
|
||||||
|
color: var(--text-color);
|
||||||
font-family: 'Source Sans Pro', sans-serif;
|
font-family: 'Source Sans Pro', sans-serif;
|
||||||
line-height: var(--font-line-height);
|
line-height: var(--font-line-height);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
--color-bg: #ffffff;
|
--color-bg: #ffffff;
|
||||||
--color-bg-alt: #D9D9D9;
|
--color-bg-alt: #D9D9D9;
|
||||||
|
|
||||||
|
|
||||||
/* Misc */
|
/* Misc */
|
||||||
--content-max-width: 1000px;
|
--content-max-width: 1000px;
|
||||||
--nsfw-blur-intensity: 20px;
|
--nsfw-blur-intensity: 20px;
|
||||||
|
@ -50,9 +51,14 @@
|
||||||
|
|
||||||
/* Input */
|
/* Input */
|
||||||
--input-width: 330px;
|
--input-width: 330px;
|
||||||
|
--input-color: var(--text-color);
|
||||||
--input-border-size: 2px;
|
--input-border-size: 2px;
|
||||||
--input-border-color: rgba(0,0,0,.25);
|
--input-border-color: rgba(0,0,0,.25);
|
||||||
|
|
||||||
|
/* Select */
|
||||||
|
--select-bg: var(--color-bg-alt);
|
||||||
|
--select-color: var(--text-color);
|
||||||
|
|
||||||
/* Button */
|
/* Button */
|
||||||
--button-bg: var(--color-bg-alt);
|
--button-bg: var(--color-bg-alt);
|
||||||
--button-color: #FFF;
|
--button-color: #FFF;
|
||||||
|
|
|
@ -46,6 +46,8 @@ input[type="text"].input-copyable {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
height: $spacing-vertical;
|
height: $spacing-vertical;
|
||||||
|
background: var(--select-bg);
|
||||||
|
color: var(--select-color);
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: var(--input-border-size) solid var(--color-primary);
|
outline: var(--input-border-size) solid var(--color-primary);
|
||||||
}
|
}
|
||||||
|
@ -67,6 +69,8 @@ input[type="text"].input-copyable {
|
||||||
padding-right: 1px;
|
padding-right: 1px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
background: var(--input-bg);
|
||||||
|
color: var(--input-color);
|
||||||
&[readonly] {
|
&[readonly] {
|
||||||
background-color: #bbb;
|
background-color: #bbb;
|
||||||
}
|
}
|
||||||
|
@ -82,6 +86,7 @@ input[type="text"].input-copyable {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding-top: $spacing-vertical * 1/3;
|
padding-top: $spacing-vertical * 1/3;
|
||||||
padding-bottom: $spacing-vertical * 1/3;
|
padding-bottom: $spacing-vertical * 1/3;
|
||||||
|
|
||||||
&.form-field__input--error {
|
&.form-field__input--error {
|
||||||
border-color: var(--color-error);
|
border-color: var(--color-error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,9 @@
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
@include border-radius(2px);
|
@include border-radius(2px);
|
||||||
border: var(--search-border);
|
border: var(--search-border);
|
||||||
transition: all var(--transition-duration) var(--transition-type);
|
transition: box-shadow var(--transition-duration) var(--transition-type);
|
||||||
&:focus {
|
&:focus {
|
||||||
|
background: var(--search-active-bg);
|
||||||
color: var(--search-active-color);
|
color: var(--search-active-color);
|
||||||
box-shadow: var(--box-shadow-focus);
|
box-shadow: var(--box-shadow-focus);
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
|
|
Loading…
Add table
Reference in a new issue