diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-07-15 14:26:01 -0700 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-07-15 14:26:01 -0700 |
commit | 154e6efe8036dca91b1bfe9c4fb22ef227df5858 (patch) | |
tree | 4e422123d4847e9d425dfbc65c40ba4ec728783c /src/components/DynamicTheme.vue | |
parent | d05b8d3bf0e4951ea863131b5a0067a5cd339cae (diff) | |
download | homer-154e6efe8036dca91b1bfe9c4fb22ef227df5858.tar.gz homer-154e6efe8036dca91b1bfe9c4fb22ef227df5858.tar.zst homer-154e6efe8036dca91b1bfe9c4fb22ef227df5858.zip |
Adding support for section backgrounf images
Diffstat (limited to 'src/components/DynamicTheme.vue')
-rw-r--r-- | src/components/DynamicTheme.vue | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/DynamicTheme.vue b/src/components/DynamicTheme.vue index cf9963b..2ccb47b 100644 --- a/src/components/DynamicTheme.vue +++ b/src/components/DynamicTheme.vue | |||
@@ -25,7 +25,13 @@ export default { | |||
25 | getVars: function (theme) { | 25 | getVars: function (theme) { |
26 | let vars = []; | 26 | let vars = []; |
27 | for (const themeVars in theme) { | 27 | for (const themeVars in theme) { |
28 | vars.push(`--${themeVars}: ${theme[themeVars]}`); | 28 | let value = `${theme[themeVars]}`; |
29 | if (!value) { | ||
30 | value = "inital"; | ||
31 | } else if (themeVars == "background-image") { | ||
32 | value = `url(${theme[themeVars]})`; | ||
33 | } | ||
34 | vars.push(`--${themeVars}: ${value}`); | ||
29 | } | 35 | } |
30 | return vars.join(";"); | 36 | return vars.join(";"); |
31 | }, | 37 | }, |