Add theming support
This commit is contained in:
parent
3df1f89f06
commit
10a8433ccf
8 changed files with 34 additions and 17 deletions
|
@ -8,7 +8,7 @@
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background-color: #0dbd8b;
|
background-color: var(--primaryColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.facepile .avatar > * {
|
.facepile .avatar > * {
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: white;
|
color: var(--textColor1);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.roomListItem:hover {
|
.roomListItem:hover {
|
||||||
background-color: rgba(141, 151, 165, 0.2);
|
background-color: rgba(141, 151, 165, 0.2);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
color: white;
|
color: var(--textColor1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.roomAvatar {
|
.roomAvatar {
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 8px 9px;
|
padding: 8px 9px;
|
||||||
color: white;
|
color: var(--textColor1);
|
||||||
background-color: #21262c;
|
background-color: var(--bgColor2);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
.inputField label {
|
.inputField label {
|
||||||
transition: font-size 0.25s ease-out 0.1s, color 0.25s ease-out 0.1s,
|
transition: font-size 0.25s ease-out 0.1s, color 0.25s ease-out 0.1s,
|
||||||
top 0.25s ease-out 0.1s, background-color 0.25s ease-out 0.1s;
|
top 0.25s ease-out 0.1s, background-color 0.25s ease-out 0.1s;
|
||||||
color: white;
|
color: var(--textColor1);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
.inputField input:focus + label,
|
.inputField input:focus + label,
|
||||||
.inputField input:not(:placeholder-shown) + label {
|
.inputField input:not(:placeholder-shown) + label {
|
||||||
background-color: #21262c;
|
background-color: var(--bgColor2);
|
||||||
transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s,
|
transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s,
|
||||||
top 0.25s ease-out 0s, background-color 0.25s ease-out 0s;
|
top 0.25s ease-out 0s, background-color 0.25s ease-out 0s;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
@ -138,8 +138,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxField input[type="checkbox"]:checked + label > .checkbox {
|
.checkboxField input[type="checkbox"]:checked + label > .checkbox {
|
||||||
background: #0dbd8b;
|
background: var(--primaryColor);
|
||||||
border-color: #0dbd8b;
|
border-color: var(--primaryColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxField input[type="checkbox"]:checked + label > .checkbox svg {
|
.checkboxField input[type="checkbox"]:checked + label > .checkbox svg {
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #0dbd8b;
|
background-color: var(--primaryColor);
|
||||||
width: auto;
|
width: auto;
|
||||||
padding: 7px 15px;
|
padding: 7px 15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
color: white;
|
color: var(--textColor1);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 25px 60px;
|
padding: 25px 60px;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
background-color: #21262c;
|
background-color: var(--bgColor2);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ limitations under the License.
|
||||||
max-height: 225px;
|
max-height: 225px;
|
||||||
border-radius: 24px;
|
border-radius: 24px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #444;
|
background-color: var(--bgColor3);
|
||||||
margin: 40px 20px 20px 20px;
|
margin: 40px 20px 20px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ limitations under the License.
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(0, -100%);
|
transform: translate(0, -100%);
|
||||||
top: -5px;
|
top: -5px;
|
||||||
background-color: #394049;
|
background-color: var(--bgColor4);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdownContainer li:hover {
|
.dropdownContainer li:hover {
|
||||||
background-color: #8d97a5;
|
background-color: var(--bgColor5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdownActiveItem {
|
.dropdownActiveItem {
|
||||||
|
|
|
@ -23,6 +23,13 @@ limitations under the License.
|
||||||
:root {
|
:root {
|
||||||
--inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f,
|
--inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f,
|
||||||
U+25c2-2664, U+2666-2763, U+2765-2b05, U+2b07-2b1b, U+2b1d-10FFFF;
|
U+25c2-2664, U+2666-2763, U+2765-2b05, U+2b07-2b1b, U+2b1d-10FFFF;
|
||||||
|
--primaryColor: #0dbd8b;
|
||||||
|
--bgColor1: #15191e;
|
||||||
|
--bgColor2: #21262c;
|
||||||
|
--bgColor3: #444;
|
||||||
|
--bgColor4: #394049;
|
||||||
|
--bgColor5: #8d97a5;
|
||||||
|
--textColor1: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -106,8 +113,8 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #15191e;
|
background-color: var(--bgColor1);
|
||||||
color: #fff;
|
color: var(--textColor1);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
||||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||||
|
|
10
src/main.jsx
10
src/main.jsx
|
@ -22,6 +22,16 @@ import App from "./App";
|
||||||
import * as Sentry from "@sentry/react";
|
import * as Sentry from "@sentry/react";
|
||||||
import { Integrations } from "@sentry/tracing";
|
import { Integrations } from "@sentry/tracing";
|
||||||
|
|
||||||
|
if (import.meta.env.VITE_CUSTOM_THEME) {
|
||||||
|
const style = document.documentElement.style;
|
||||||
|
style.setProperty("--primaryColor", import.meta.env.VITE_PRIMARY_COLOR);
|
||||||
|
style.setProperty("--bgColor1", import.meta.env.VITE_BG_COLOR_1);
|
||||||
|
style.setProperty("--bgColor2", import.meta.env.VITE_BG_COLOR_2);
|
||||||
|
style.setProperty("--bgColor3", import.meta.env.VITE_BG_COLOR_3);
|
||||||
|
style.setProperty("--bgColor4", import.meta.env.VITE_BG_COLOR_4);
|
||||||
|
style.setProperty("--textColor1", import.meta.env.VITE_TEXT_COLOR_1);
|
||||||
|
}
|
||||||
|
|
||||||
const history = createBrowserHistory();
|
const history = createBrowserHistory();
|
||||||
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
|
|
Loading…
Add table
Reference in a new issue