mirror of
https://github.com/sigoden/dufs.git
synced 2026-06-07 15:59:03 +03:00
refactor: webui add css color variables (#710)
* refactor: webui add css color variables * refactor: removed redundant css * fix: correct colors to match original * fix: update bg-tertiary variable --------- Co-authored-by: sigoden <sigoden@gmail.com>
This commit is contained in:
+58
-59
@@ -1,13 +1,35 @@
|
|||||||
|
:root {
|
||||||
|
color-scheme: light;
|
||||||
|
--bg-primary: #fff;
|
||||||
|
--bg-secondary: #fafafa;
|
||||||
|
--bg-tertiary: #fff;
|
||||||
|
--bg-hover: #fafafa;
|
||||||
|
--text-primary: #24292e;
|
||||||
|
--text-secondary: #5c5c5c;
|
||||||
|
--text-tertiary: #586069;
|
||||||
|
--text-accent: #0366d6;
|
||||||
|
--svg-primary: #24292e;
|
||||||
|
--svg-secondary: rgba(3, 47, 98, 0.5);
|
||||||
|
--svg-tertiary: #24292e;
|
||||||
|
--border-primary: #ddd;
|
||||||
|
--border-secondary: #ced4da;
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #24292e;
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* prevent premature breadcrumb wrapping on mobile */
|
/* prevent premature breadcrumb wrapping on mobile */
|
||||||
min-width: 538px;
|
min-width: 538px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
background-color: var(--bg-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: var(--svg-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
@@ -21,7 +43,7 @@ body {
|
|||||||
padding: 0.6em 1em;
|
padding: 0.6em 1em;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
background-color: white;
|
background-color: var(--bg-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
@@ -31,7 +53,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb>a {
|
.breadcrumb>a {
|
||||||
color: #0366d6;
|
color: var(--text-accent);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,17 +63,17 @@ body {
|
|||||||
|
|
||||||
/* final breadcrumb */
|
/* final breadcrumb */
|
||||||
.breadcrumb>b {
|
.breadcrumb>b {
|
||||||
color: #24292e;
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb>.separator {
|
.breadcrumb>.separator {
|
||||||
color: #586069;
|
color: var(--text-tertiary);
|
||||||
padding: 0 0.25em;
|
padding: 0 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb svg {
|
.breadcrumb svg {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
fill: rgba(3, 47, 98, 0.5);
|
fill: var(--svg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbox {
|
.toolbox {
|
||||||
@@ -83,9 +105,9 @@ body {
|
|||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
width: 246px;
|
width: 246px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
background-color: #fafafa;
|
background-color: var(--bg-secondary);
|
||||||
transition: all .15s;
|
transition: all .15s;
|
||||||
border: 1px #ddd solid;
|
border: 1px var(--border-primary) solid;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
@@ -97,17 +119,22 @@ body {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
color: var(--text-primary);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchbar .icon {
|
.searchbar .icon {
|
||||||
color: #9a9a9a;
|
color: var(--svg-tertiary);
|
||||||
padding: 3px 3px;
|
padding: 3px 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.searchbar svg {
|
||||||
|
fill: var(--svg-tertiary);
|
||||||
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
padding: 0 1em;
|
padding: 0 1em;
|
||||||
}
|
}
|
||||||
@@ -120,7 +147,7 @@ body {
|
|||||||
.paths-table th {
|
.paths-table th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: unset;
|
font-weight: unset;
|
||||||
color: #5c5c5c;
|
color: var(--text-secondary);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,7 +175,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.paths-table tbody tr:hover {
|
.paths-table tbody tr:hover {
|
||||||
background-color: #fafafa;
|
background-color: var(--bg-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.paths-table .cell-actions {
|
.paths-table .cell-actions {
|
||||||
@@ -172,7 +199,7 @@ body {
|
|||||||
|
|
||||||
.path svg {
|
.path svg {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
fill: rgba(3, 47, 98, 0.5);
|
fill: var(--svg-secondary);
|
||||||
padding-right: 0.5em;
|
padding-right: 0.5em;
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
}
|
}
|
||||||
@@ -182,7 +209,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.path a {
|
.path a {
|
||||||
color: #0366d6;
|
color: var(--text-accent);
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -212,7 +239,9 @@ body {
|
|||||||
.editor {
|
.editor {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh - 5rem);
|
height: calc(100vh - 5rem);
|
||||||
border: 1px solid #ced4da;
|
border: 1px solid var(--border-secondary);
|
||||||
|
background: var(--bg-primary);
|
||||||
|
color: var(--text-primary);
|
||||||
outline: none;
|
outline: none;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
@@ -258,50 +287,20 @@ body {
|
|||||||
|
|
||||||
/* dark theme */
|
/* dark theme */
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
body {
|
:root {
|
||||||
background-color: #000;
|
color-scheme: dark;
|
||||||
}
|
--bg-primary: #000;
|
||||||
|
--bg-secondary: #111;
|
||||||
html,
|
--bg-tertiary: #111;
|
||||||
.breadcrumb>b,
|
--bg-hover: #1a1a1a;
|
||||||
.searchbar #search {
|
--text-primary: #fff;
|
||||||
color: #fff;
|
--text-secondary: #ddd;
|
||||||
}
|
--text-tertiary: #586069; /*Unchanged in both color schemes*/
|
||||||
|
--text-accent: #3191ff;
|
||||||
.uploaders-table th,
|
--svg-primary: #fff;
|
||||||
.paths-table th {
|
--svg-secondary: #fff;
|
||||||
color: #ddd;
|
--svg-tertiary: #fff6;
|
||||||
}
|
--border-primary: #fff6;
|
||||||
|
--border-secondary: #ced4da; /*Unchanged in both color schemes*/
|
||||||
svg,
|
|
||||||
.path svg,
|
|
||||||
.breadcrumb svg {
|
|
||||||
fill: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.head {
|
|
||||||
background-color: #111;
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchbar {
|
|
||||||
background-color: #111;
|
|
||||||
border-color: #fff6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchbar svg {
|
|
||||||
fill: #fff6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.path a {
|
|
||||||
color: #3191ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paths-table tbody tr:hover {
|
|
||||||
background-color: #1a1a1a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor {
|
|
||||||
background: black;
|
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -97,7 +97,7 @@
|
|||||||
<svg viewBox="0 0 1024 1024" width="24" height="24">
|
<svg viewBox="0 0 1024 1024" width="24" height="24">
|
||||||
<path
|
<path
|
||||||
d="M426.666667 682.666667v42.666666h170.666666v-42.666666h-170.666666z m-42.666667-85.333334h298.666667v128h42.666666V418.133333L605.866667 298.666667H298.666667v426.666666h42.666666v-128h42.666667z m260.266667-384L810.666667 379.733333V810.666667H213.333333V213.333333h430.933334zM341.333333 341.333333h85.333334v170.666667H341.333333V341.333333z"
|
d="M426.666667 682.666667v42.666666h170.666666v-42.666666h-170.666666z m-42.666667-85.333334h298.666667v128h42.666666V418.133333L605.866667 298.666667H298.666667v426.666666h42.666666v-128h42.666667z m260.266667-384L810.666667 379.733333V810.666667H213.333333V213.333333h430.933334zM341.333333 341.333333h85.333334v170.666667H341.333333V341.333333z"
|
||||||
fill="#444444" p-id="8311"></path>
|
p-id="8311"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user