add background gradient
This commit is contained in:
Vendored
+73
@@ -1,3 +1,76 @@
|
||||
/* src/base.css */
|
||||
#home-page {
|
||||
--surface: hsla(0, 0%, 100%, 50%);
|
||||
--surface-hover: hsla(0, 0%, 91%, 50%);
|
||||
--surface-active: hsla(0, 0%, 78%, 50%);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#home-page {
|
||||
--surface: hsla(0, 0%, 5%, 30%);
|
||||
--surface-hover: hsla(0, 0%, 20%, 30%);
|
||||
--surface-active: hsla(0, 0%, 44%, 30%);
|
||||
}
|
||||
}
|
||||
#background {
|
||||
position: fixed;
|
||||
top: -120px;
|
||||
left: -120px;
|
||||
right: -120px;
|
||||
bottom: -120px;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
filter: blur(60px);
|
||||
opacity: 0.4;
|
||||
}
|
||||
#background::after,
|
||||
#background::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#background {
|
||||
background-image:
|
||||
linear-gradient(
|
||||
120deg,
|
||||
hsla(210, 100%, 50%, 25%),
|
||||
hsla(210, 100%, 50%, 15%),
|
||||
transparent 70%);
|
||||
}
|
||||
}
|
||||
@media (prefers-color-scheme: light) {
|
||||
#background {
|
||||
background-image:
|
||||
linear-gradient(
|
||||
120deg,
|
||||
hsla(210, 100%, 50%, 25%),
|
||||
hsla(210, 100%, 50%, 15%));
|
||||
}
|
||||
#background::before {
|
||||
top: -150%;
|
||||
left: -50%;
|
||||
right: -500%;
|
||||
bottom: -50%;
|
||||
background-image:
|
||||
radial-gradient(
|
||||
transparent 60%,
|
||||
hsla(110, 100%, 40%, 20%) 60%,
|
||||
hsla(110, 100%, 20%, 40%));
|
||||
}
|
||||
#background::after {
|
||||
top: -300%;
|
||||
left: -50%;
|
||||
right: -400%;
|
||||
bottom: -50%;
|
||||
background-image:
|
||||
radial-gradient(
|
||||
transparent 70%,
|
||||
hsla(110, 100%, 30%, 30%) 70%,
|
||||
hsla(110, 100%, 30%, 40%));
|
||||
}
|
||||
}
|
||||
|
||||
/* src/View/chatPage.css */
|
||||
#chat-page-wrapper {
|
||||
display: none;
|
||||
|
||||
Vendored
+1
@@ -1177,6 +1177,7 @@
|
||||
var settingsViewModel = new SettingsViewModel(storageModel);
|
||||
var connectionViewModel = new ConnectionViewModel(storageModel);
|
||||
var chatListViewModel = new ChatListViewModel(storageModel);
|
||||
document.body.append(/* @__PURE__ */ createElement("div", { id: "background" }));
|
||||
document.querySelector("main").append(
|
||||
HomePage(settingsViewModel, connectionViewModel, chatListViewModel),
|
||||
ChatPageWrapper(chatListViewModel),
|
||||
|
||||
Vendored
+18
-11
@@ -26,9 +26,9 @@ COLORS
|
||||
|
||||
--layer: hsla(0, 0%, 96%, 60%);
|
||||
|
||||
--surface: #f4f4f4;
|
||||
--surface-hover: #e8e8e8;
|
||||
--surface-active: #c6c6c6;
|
||||
--surface: hsla(0, 0%, 96%, 100%);
|
||||
--surface-hover: hsla(0, 0%, 91%, 100%);
|
||||
--surface-active: hsla(0, 0%, 78%, 100%);
|
||||
|
||||
--border: hsla(0, 0%, 0%, 10%);
|
||||
--surface-border: #8d8d8d;
|
||||
@@ -63,9 +63,9 @@ COLORS
|
||||
|
||||
--layer: hsla(0, 0%, 15%, 60%);
|
||||
|
||||
--surface: #262626;
|
||||
--surface-hover: #333333;
|
||||
--surface-active: #6f6f6f;
|
||||
--surface: hsla(0, 0%, 15%, 100%);
|
||||
--surface-hover: hsla(0, 0%, 20%, 100%);
|
||||
--surface-active: hsla(0, 0%, 44%, 100%);
|
||||
|
||||
--border: hsla(0, 0%, 100%, 10%);
|
||||
--surface-border: #6f6f6f;
|
||||
@@ -138,11 +138,11 @@ a {
|
||||
}
|
||||
|
||||
/* controls */
|
||||
button,
|
||||
footer,
|
||||
input,
|
||||
textarea,
|
||||
select,
|
||||
button:not(.tile *),
|
||||
footer:not(.tile *),
|
||||
input:not(.tile *),
|
||||
textarea:not(.tile *),
|
||||
select:not(.tile *),
|
||||
.surface,
|
||||
.tile {
|
||||
background-color: var(--surface);
|
||||
@@ -166,6 +166,7 @@ button.tile.ghost:active,
|
||||
[selected]:active {
|
||||
background-color: var(--surface-hover);
|
||||
}
|
||||
.tile *,
|
||||
header button {
|
||||
background-color: transparent;
|
||||
}
|
||||
@@ -302,6 +303,12 @@ select {
|
||||
}
|
||||
|
||||
/* backdrop-filter */
|
||||
.tile,
|
||||
.surface {
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
header,
|
||||
menu {
|
||||
backdrop-filter: blur(70px);
|
||||
|
||||
Reference in New Issue
Block a user