Browse Source

make 'customVars' accessible as CSS-variables

master
Dom SP 3 years ago
parent
commit
6456d5676e
3 changed files with 14 additions and 2 deletions
  1. +6
    -0
      app/views/colors.css
  2. +3
    -1
      main.cfg.sample
  3. +5
    -1
      rsc/sass/_colours.scss

+ 6
- 0
app/views/colors.css View File

@@ -6,3 +6,9 @@ html {
background-attachment: fixed;
background-size: 2000px 2000px;
}

<repeat group="{{ @customVars }}" key="{{ @ikey }}" value="{{ @ivalue }}">
:root {
--{{ @ikey }}: {{ $@ikey }};
}
</repeat>

+ 3
- 1
main.cfg.sample View File

@@ -25,7 +25,9 @@ includeBanner=false
;; "customVars" are global (in F3) and can be changed in content files
[customVars]
backgroundColor=#fff
info1=test
color1=#333
color2=#777
color3=#bbb

[globals]
title=Title of new Page

+ 5
- 1
rsc/sass/_colours.scss View File

@@ -3,7 +3,11 @@ $white:#fff;
$black:#000;
$gray:#777;


:root {
--color1: red;
--color2: green;
--color3: blue;
}

html {
color:$gray;

Loading…
Cancel
Save