add cinny dark theme
This commit is contained in:
1 parent
5f39b9d67b
commit
5569176bef
4 files changed
+110
-2
No files matched your search
@@ -5,6 +5,8 @@
|
||||
- Fixed/updated unknown extended profile keys rendering.
|
||||
- Added support for `---`, `-#`, and fixed `-` to be unordered.
|
||||
- Fix quotes around colors for tuwunel homeservers ([#46](https://github.com/7w1/sable/issues/46))
|
||||
- Added Rosé Pine theme ([#41](https://github.com/7w1/sable/pull/41)) - [wrigglebug](https://github.com/wrigglebug)
|
||||
- Add back default Cinny Dark theme
|
||||
|
||||
## 1.2.1
|
||||
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { onDarkFontWeight, onLightFontWeight } from '../../config.css';
|
||||
import { butterTheme, darkTheme, lightTheme, rosePineTheme, silverTheme } from '../../colors.css';
|
||||
import {
|
||||
butterTheme,
|
||||
cinnyDarkTheme,
|
||||
darkTheme,
|
||||
lightTheme,
|
||||
rosePineTheme,
|
||||
silverTheme,
|
||||
} from '../../colors.css';
|
||||
import { settingsAtom } from '../state/settings';
|
||||
import { useSetting } from '../state/hooks/settings';
|
||||
|
||||
@@ -41,9 +48,17 @@ export const RosePineTheme: Theme = {
|
||||
kind: ThemeKind.Dark,
|
||||
classNames: ['rose-pine-theme', rosePineTheme, onDarkFontWeight, 'prism-dark'],
|
||||
};
|
||||
export const CinnyDarkTheme: Theme = {
|
||||
id: 'cinny-dark-theme',
|
||||
kind: ThemeKind.Dark,
|
||||
classNames: ['cinny-dark-theme', cinnyDarkTheme, onDarkFontWeight, 'prism-dark'],
|
||||
};
|
||||
|
||||
export const useThemes = (): Theme[] => {
|
||||
const themes: Theme[] = useMemo(() => [LightTheme, SilverTheme, DarkTheme, ButterTheme, RosePineTheme], []);
|
||||
const themes: Theme[] = useMemo(
|
||||
() => [LightTheme, SilverTheme, DarkTheme, ButterTheme, RosePineTheme, CinnyDarkTheme],
|
||||
[]
|
||||
);
|
||||
|
||||
return themes;
|
||||
};
|
||||
@@ -55,6 +70,7 @@ export const useThemeNames = (): Record<string, string> =>
|
||||
[SilverTheme.id]: 'Silver',
|
||||
[DarkTheme.id]: 'Dark',
|
||||
[ButterTheme.id]: 'Butter',
|
||||
[CinnyDarkTheme.id]: 'Cinny Dark',
|
||||
[RosePineTheme.id]: 'Rose Pine',
|
||||
}),
|
||||
[]
|
||||
|
||||
@@ -443,3 +443,92 @@
|
||||
--sable-shadow: rgba(0, 0, 0, 0.5);
|
||||
--sable-overlay: rgba(25, 23, 36, 0.85);
|
||||
}
|
||||
|
||||
/* --- Cinny Dark --- */
|
||||
.cinny-dark-theme {
|
||||
/* Background */
|
||||
--sable-bg-container: #1a1a1a;
|
||||
--sable-bg-container-hover: #262626;
|
||||
--sable-bg-container-active: #333333;
|
||||
--sable-bg-container-line: #404040;
|
||||
--sable-bg-on-container: #f2f2f2;
|
||||
|
||||
/* Surface */
|
||||
--sable-surface-container: #262626;
|
||||
--sable-surface-container-hover: #333333;
|
||||
--sable-surface-container-active: #404040;
|
||||
--sable-surface-container-line: #4d4d4d;
|
||||
--sable-surface-on-container: #f2f2f2;
|
||||
|
||||
/* Surface Variant */
|
||||
--sable-surface-var-container: #333333;
|
||||
--sable-surface-var-container-hover: #404040;
|
||||
--sable-surface-var-container-active: #4d4d4d;
|
||||
--sable-surface-var-container-line: #595959;
|
||||
--sable-surface-var-on-container: #f2f2f2;
|
||||
|
||||
/* Primary */
|
||||
--sable-primary-main: #bdb6ec;
|
||||
--sable-primary-main-hover: #b2aae9;
|
||||
--sable-primary-main-active: #ada3e8;
|
||||
--sable-primary-main-line: #a79de6;
|
||||
--sable-primary-on-main: #2c2843;
|
||||
--sable-primary-container: #413c65;
|
||||
--sable-primary-container-hover: #494370;
|
||||
--sable-primary-container-active: #50497b;
|
||||
--sable-primary-container-line: #575086;
|
||||
--sable-primary-on-container: #e3e1f7;
|
||||
|
||||
/* Secondary */
|
||||
--sable-sec-main: #ffffff;
|
||||
--sable-sec-main-hover: #e5e5e5;
|
||||
--sable-sec-main-active: #d9d9d9;
|
||||
--sable-sec-main-line: #cccccc;
|
||||
--sable-sec-on-main: #1a1a1a;
|
||||
--sable-sec-container: #404040;
|
||||
--sable-sec-container-hover: #4d4d4d;
|
||||
--sable-sec-container-active: #595959;
|
||||
--sable-sec-container-line: #666666;
|
||||
--sable-sec-on-container: #f2f2f2;
|
||||
|
||||
/* Success */
|
||||
--sable-success-main: #85e0ba;
|
||||
--sable-success-main-hover: #70dbaf;
|
||||
--sable-success-main-active: #66d9a9;
|
||||
--sable-success-main-line: #5cd6a3;
|
||||
--sable-success-on-main: #0f3d2a;
|
||||
--sable-success-container: #175c3f;
|
||||
--sable-success-container-hover: #1a6646;
|
||||
--sable-success-container-active: #1c704d;
|
||||
--sable-success-container-line: #1f7a54;
|
||||
--sable-success-on-container: #ccf2e2;
|
||||
|
||||
/* Warning */
|
||||
--sable-warn-main: #e3ba91;
|
||||
--sable-warn-main-hover: #dfaf7e;
|
||||
--sable-warn-main-active: #dda975;
|
||||
--sable-warn-main-line: #daa36c;
|
||||
--sable-warn-on-main: #3f2a15;
|
||||
--sable-warn-container: #5e3f20;
|
||||
--sable-warn-container-hover: #694624;
|
||||
--sable-warn-container-active: #734d27;
|
||||
--sable-warn-container-line: #7d542b;
|
||||
--sable-warn-on-container: #f3e2d1;
|
||||
|
||||
/* Critical */
|
||||
--sable-crit-main: #e69d9d;
|
||||
--sable-crit-main-hover: #e28d8d;
|
||||
--sable-crit-main-active: #e08585;
|
||||
--sable-crit-main-line: #de7d7d;
|
||||
--sable-crit-on-main: #401c1c;
|
||||
--sable-crit-container: #602929;
|
||||
--sable-crit-container-hover: #6b2e2e;
|
||||
--sable-crit-container-active: #763333;
|
||||
--sable-crit-container-line: #803737;
|
||||
--sable-crit-on-container: #f5d6d6;
|
||||
|
||||
/* Other */
|
||||
--sable-focus-ring: rgba(255, 255, 255, 0.5);
|
||||
--sable-shadow: rgba(0, 0, 0, 1);
|
||||
--sable-overlay: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
@@ -96,3 +96,4 @@ export const darkTheme = createTheme(color, sableThemeMapping);
|
||||
export const butterTheme = createTheme(color, sableThemeMapping);
|
||||
export const lightTheme = createTheme(color, sableThemeMapping);
|
||||
export const rosePineTheme = createTheme(color, sableThemeMapping);
|
||||
export const cinnyDarkTheme = createTheme(color, sableThemeMapping);
|
||||
Reference in new issue
Block a user