mirror of
https://github.com/taigrr/homer
synced 2025-01-18 04:53:12 -08:00
Adding support for section backgrounf images
This commit is contained in:
parent
d05b8d3bf0
commit
154e6efe80
@ -42,6 +42,7 @@ colors:
|
|||||||
text-subtitle: "#424242"
|
text-subtitle: "#424242"
|
||||||
card-shadow: rgba(0, 0, 0, 0.1)
|
card-shadow: rgba(0, 0, 0, 0.1)
|
||||||
link-hover: "#363636"
|
link-hover: "#363636"
|
||||||
|
background-image: "assets/your/light/bg.png"
|
||||||
dark:
|
dark:
|
||||||
highlight-primary: "#3367d6"
|
highlight-primary: "#3367d6"
|
||||||
highlight-secondary: "#4285f4"
|
highlight-secondary: "#4285f4"
|
||||||
@ -54,6 +55,7 @@ colors:
|
|||||||
text-subtitle: "#f5f5f5"
|
text-subtitle: "#f5f5f5"
|
||||||
card-shadow: rgba(0, 0, 0, 0.4)
|
card-shadow: rgba(0, 0, 0, 0.4)
|
||||||
link-hover: "#ffdd57"
|
link-hover: "#ffdd57"
|
||||||
|
background-image: "assets/your/dark/bg.png"
|
||||||
|
|
||||||
# Optional message
|
# Optional message
|
||||||
message:
|
message:
|
||||||
|
@ -24,6 +24,9 @@ body {
|
|||||||
#app {
|
#app {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
|
background-image: var(--background-image);
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms;
|
transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ colors:
|
|||||||
text-subtitle: "#424242"
|
text-subtitle: "#424242"
|
||||||
card-shadow: rgba(0, 0, 0, 0.1)
|
card-shadow: rgba(0, 0, 0, 0.1)
|
||||||
link-hover: "#363636"
|
link-hover: "#363636"
|
||||||
|
background-image: ""
|
||||||
dark:
|
dark:
|
||||||
highlight-primary: "#3367d6"
|
highlight-primary: "#3367d6"
|
||||||
highlight-secondary: "#4285f4"
|
highlight-secondary: "#4285f4"
|
||||||
@ -36,6 +37,7 @@ colors:
|
|||||||
text-subtitle: "#f5f5f5"
|
text-subtitle: "#f5f5f5"
|
||||||
card-shadow: rgba(0, 0, 0, 0.4)
|
card-shadow: rgba(0, 0, 0, 0.4)
|
||||||
link-hover: "#ffdd57"
|
link-hover: "#ffdd57"
|
||||||
|
background-image: ""
|
||||||
|
|
||||||
message: ~
|
message: ~
|
||||||
links: []
|
links: []
|
||||||
|
@ -25,7 +25,13 @@ export default {
|
|||||||
getVars: function (theme) {
|
getVars: function (theme) {
|
||||||
let vars = [];
|
let vars = [];
|
||||||
for (const themeVars in theme) {
|
for (const themeVars in theme) {
|
||||||
vars.push(`--${themeVars}: ${theme[themeVars]}`);
|
let value = `${theme[themeVars]}`;
|
||||||
|
if (!value) {
|
||||||
|
value = "inital";
|
||||||
|
} else if (themeVars == "background-image") {
|
||||||
|
value = `url(${theme[themeVars]})`;
|
||||||
|
}
|
||||||
|
vars.push(`--${themeVars}: ${value}`);
|
||||||
}
|
}
|
||||||
return vars.join(";");
|
return vars.join(";");
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user