forked from extern/homer
Dark theme improvements
This commit is contained in:
parent
e608701404
commit
67fd101a38
@ -159,7 +159,9 @@ export default {
|
||||
}
|
||||
this.config = merge(defaults, config);
|
||||
this.services = this.config.services;
|
||||
document.title = this.config.documentTitle || `${this.config.title} | ${this.config.subtitle}`;
|
||||
document.title =
|
||||
this.config.documentTitle ||
|
||||
`${this.config.title} | ${this.config.subtitle}`;
|
||||
if (this.config.stylesheet) {
|
||||
let stylesheet = "";
|
||||
for (const file of this.config.stylesheet) {
|
||||
|
@ -13,17 +13,17 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
html {
|
||||
html, body, body #app {
|
||||
height: 100%;
|
||||
background-color: var(--background);
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Raleway", sans-serif;
|
||||
height: 100%;
|
||||
|
||||
#app {
|
||||
height: auto;
|
||||
min-height: 100%;
|
||||
background-color: var(--background);
|
||||
background-image: var(--background-image);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
|
@ -1,17 +1,15 @@
|
||||
<template>
|
||||
<DynamicStyle>
|
||||
/* light / dark theme switch based on system pref if available */ body #app
|
||||
{
|
||||
:root, body #app.is-light {
|
||||
{{ getVars(themes.light) }}
|
||||
} @media (prefers-color-scheme: light), (prefers-color-scheme:
|
||||
no-preference) { body #app {
|
||||
no-preference) { :root, body #app {
|
||||
{{ getVars(themes.light) }}
|
||||
} } @media (prefers-color-scheme: dark) { body #app { } } /* light / dark
|
||||
theme override base on user choice. */ body #app.is-dark {
|
||||
} } body #app.is-dark {
|
||||
{{ getVars(themes.dark) }}
|
||||
} body #app.is-light {
|
||||
{{ getVars(themes.light) }}
|
||||
}
|
||||
} @media (prefers-color-scheme: dark) { :root, body #app {
|
||||
{{ getVars(themes.dark) }}
|
||||
} }
|
||||
</DynamicStyle>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user