Skip to content

Commit

Permalink
Add quick and dirty dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
leaty committed Nov 22, 2021
1 parent ae184d5 commit 7b6b265
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/app.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'theme.scss';

@font-face {
font-family: 'Cinzel Decorative';
src: url('~src/assets/fonts/CinzelDecorative-Regular.ttf');
Expand Down Expand Up @@ -37,7 +39,7 @@
padding: 0.2em 1em;
line-height: 2.4em;

color: #000000;
color: $color-text;
font-weight: 500;
font-size: 1.2ex;

Expand Down
4 changes: 2 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HashRouter as Router, Switch, Route } from 'react-router-dom';

import { Client as Styletron } from 'styletron-engine-atomic';
import { Provider as StyletronProvider } from 'styletron-react';
import { LightTheme, BaseProvider } from 'baseui';
import { DarkTheme, BaseProvider } from 'baseui';
import { SnackbarProvider, PLACEMENT } from 'baseui/snackbar';

import AppContext from 'src/share/context';
Expand Down Expand Up @@ -65,7 +65,7 @@ const App = () => {
return (
<AppContext.Provider value={contextValue}>
<StyletronProvider value={engine}>
<BaseProvider theme={LightTheme}>
<BaseProvider theme={DarkTheme}>
<SnackbarProvider
placement={PLACEMENT.bottom}
overrides={{
Expand Down
11 changes: 7 additions & 4 deletions src/components/perk-showcase/style.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../theme.scss';

.item {
display: flex;
align-items: center;
Expand All @@ -7,7 +9,7 @@
user-select: none;

&:hover {
background-color: #f6f6f6;
background-color: $color-hover;
cursor: pointer;
}

Expand All @@ -24,20 +26,21 @@
}

.name {
font-size: 0.8rem;
font-size: 16px;
font-weight: bold;
color: #997328;
}

.detail {
font-size: 12px;
font-size: 14px;
color: #fff;

> span:not(:last-child) {
margin-right: 10px;
}

.value {
font-size: 13px;
font-size: 14px;
font-weight: bold;
}

Expand Down
4 changes: 3 additions & 1 deletion src/components/toolbar/style.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../theme.scss';

.toolbar {
width: 100vw;
z-index: 10;
Expand Down Expand Up @@ -28,7 +30,7 @@
-webkit-app-region: no-drag;

&:hover {
background-color: #e2e2e2;
background-color: $color-hover;
cursor: pointer;
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '~normalize.css';
@import 'theme.scss';

::-webkit-scrollbar {
width: 10px;
Expand Down Expand Up @@ -26,6 +27,8 @@ body {
helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: $color-background;
color: $color-text;

//color: #ffffff;
font-weight: 600;
Expand Down
4 changes: 2 additions & 2 deletions src/modules/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import { Client as Styletron } from 'styletron-engine-atomic';
import { Provider as StyletronProvider } from 'styletron-react';
import { LightTheme, BaseProvider } from 'baseui';
import { DarkTheme, BaseProvider } from 'baseui';

import initI18n from 'src/modules/i18n';
import { Content } from './content';
Expand All @@ -13,7 +13,7 @@ const engine = new Styletron();
export default function Popup() {
return (
<StyletronProvider value={engine}>
<BaseProvider theme={LightTheme}>
<BaseProvider theme={DarkTheme}>
<Content />
</BaseProvider>
</StyletronProvider>
Expand Down
8 changes: 5 additions & 3 deletions src/modules/popup/style.module.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
@import '../../theme.scss';

body {
overflow-y: hidden;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
margin: unset;
overflow-x: hidden;
background: #ffffff;
background: $color-background;
}

.list {
display: flex;
flex-direction: column;
background-color: #ffffff;
background-color: $color-background;
}

.main {
background-color: #ffffff;
background-color: $color-background;
}

.drag {
Expand Down
3 changes: 3 additions & 0 deletions src/theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$color-text: #ffffff;
$color-background: #1a1c1f;
$color-hover: #292929;

0 comments on commit 7b6b265

Please sign in to comment.