Browse Source

simplify color overwrite

Alexander Avery 3 months ago
parent
commit
977376b2b9
  1. 19
      assets/sass/colors.scss
  2. 1
      assets/sass/main.scss
  3. 15
      layouts/_default/baseof.html

19
assets/sass/colors.scss

@ -1,17 +1,14 @@
@import "hugo:vars";
$beetbox-red: #9e0008;
$beetbox-pink: #d93370;
$beetbox-purple: #ac65cb;
$beetbox-green: #003f56;
$beetbox-blue: #5fcfd0;
// Default colors are defined within layouts/_default/baseof.html.
// To pick your own colors, place variables in your site config under params.styles
$background-color: $background-color;
$font-color: $font-color;
$top-bar: $top-bar;
$dark: $dark;
$link-color: $link-color;
$link-color-visited: $link-color-visited;
$code-edge: $code-edge;
$background-color: #1f2835;
$font-color: #f8f8ff;
$font-color-alternate: #1f2835;
$top-bar: #f8f8ffcc;
$dark: #111;
$link-color: $beetbox-blue;
$link-color-visited: #e4cdef;
$code-edge: $beetbox-purple;

1
assets/sass/main.scss

@ -2,7 +2,6 @@
@import 'cards.scss';
@import 'code.scss';
@import 'fonts.scss';
@import 'hugo:vars';
@mixin screen-max($max) {
@media (max-width: $max - 1) {

15
layouts/_default/baseof.html

@ -19,20 +19,7 @@
<meta name="description" content="{{ delimit . "," }}">
{{- end }}
{{ $defaultColors := dict
"background_color" "#1f2835"
"font_color" "#f8f8ff"
"font_color_alternate" "#1f2835"
"top_bar" "#f8f8ffcc"
"dark" "#111"
"link_color" "#5fcfd0"
"link_color_visited" "#e4cdef"
"code_edge" "#ac65cb"
}}
{{ $opts := dict "vars" (default $defaultColors site.Params.styles) }}
{{ $style := resources.Get "/sass/main.scss" | resources.ToCSS $opts -}}
{{ $style := resources.Get "/sass/main.scss" | resources.ToCSS -}}
<link rel="stylesheet" href="{{ $style.Permalink }}">
<title>

Loading…
Cancel
Save