X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2FDynamicTheme.vue;h=fc2fd55034c1c37c6c5ad1171df0156e8851bf00;hb=37dfd2a132d883482b330b22a7c19d86948a391c;hp=cf9963baeb56e31f17e71afb9a1a0c08b101561b;hpb=b9c5fcf085bed9c6100283133531b36bfbb06cf0;p=github%2Fbastienwirtz%2Fhomer.git diff --git a/src/components/DynamicTheme.vue b/src/components/DynamicTheme.vue index cf9963b..fc2fd55 100644 --- a/src/components/DynamicTheme.vue +++ b/src/components/DynamicTheme.vue @@ -1,17 +1,15 @@ @@ -25,7 +23,13 @@ export default { getVars: function (theme) { let vars = []; 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(";"); },