diff --git a/snikket_web/scss/_theme.scss b/snikket_web/scss/_theme.scss index 030a114..df64a6f 100644 --- a/snikket_web/scss/_theme.scss +++ b/snikket_web/scss/_theme.scss @@ -56,6 +56,15 @@ $colours: ( ] ); +$box-types: ( + "primary": "blue", + "accent": "yellow", + "alert": "alert", + "warning": "yellow", + "success": "green", + "hint": "blue" +); + $gray-100: nth(map-get($colours, "gray"), 1); $gray-200: nth(map-get($colours, "gray"), 2); $gray-300: nth(map-get($colours, "gray"), 3); diff --git a/snikket_web/scss/app.scss b/snikket_web/scss/app.scss index 32ac476..a049de0 100644 --- a/snikket_web/scss/app.scss +++ b/snikket_web/scss/app.scss @@ -594,11 +594,11 @@ button.lv-tertiary, .button.lv-tertiary { @extend .el-1; - @each $type, $values in $colours { + @each $type, $colour in $box-types { &.#{$type} { - border-color: nth($values, 2); - background-color: nth($values, 9); - color: nth($values, 1); + border-color: nth(map-get($colours, $colour), 2); + background-color: nth(map-get($colours, $colour), 9); + color: nth(map-get($colours, $colour), 1); } } } diff --git a/snikket_web/templates/demo.html b/snikket_web/templates/demo.html index 413628d..9111a97 100644 --- a/snikket_web/templates/demo.html +++ b/snikket_web/templates/demo.html @@ -61,11 +61,11 @@
The channel was added to your list.
{% endcall %}The following box contains a notice:
- {% call box("accent", "Quota warning") %} + {% call box("warning", "Quota warning") %}You have nearly reached your HTTP upload storage quota.
{% endcall %}The following box contains a hint:
- {% call box("primary", "Update available") %} + {% call box("hint", "Update available") %}There is a new version of the Snikket Server available.
{% endcall %}Finally, the following box has unspecified content:
@@ -84,11 +84,11 @@The channel was added to your list.
{% endcall %}The following box contains a notice:
- {% call box("accent", "Quota warning", slim=True) %} + {% call box("warning", "Quota warning", slim=True) %}You have nearly reached your HTTP upload storage quota.
{% endcall %}The following box contains a hint:
- {% call box("primary", "Update available", slim=True) %} + {% call box("hint", "Update available", slim=True) %}There is a new version of the Snikket Server available.
{% endcall %}Finally, the following box has unspecified content: