Browse Source

parameterize colors of theme

Alexander Avery 3 months ago
parent
commit
b11e22bef6
  1. 2
      assets/sass/code.scss
  2. 16
      assets/sass/colors.scss
  3. 4
      assets/sass/main.scss
  4. 14
      layouts/_default/baseof.html
  5. 2
      layouts/partials/header.html

2
assets/sass/code.scss

@ -26,6 +26,6 @@ pre {
white-space: pre; white-space: pre;
max-width: 100%; max-width: 100%;
overflow-x: auto; overflow-x: auto;
border-left: .3rem solid $beetbox-purple; border-left: .3rem solid $code-edge;
} }
} }

16
assets/sass/colors.scss

@ -1,6 +1,4 @@
$background-color: #1f2835; @import "hugo:vars";
$font-color: #f8f8ff;
$top-bar: #f8f8ffcc;
$beetbox-red: #9e0008; $beetbox-red: #9e0008;
$beetbox-pink: #d93370; $beetbox-pink: #d93370;
@ -8,6 +6,12 @@ $beetbox-purple: #ac65cb;
$beetbox-green: #003f56; $beetbox-green: #003f56;
$beetbox-blue: #5fcfd0; $beetbox-blue: #5fcfd0;
$dark: #111; // Default colors are defined within layouts/_default/baseof.html.
$visited-link: #e4cdef; // 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;

4
assets/sass/main.scss

@ -56,10 +56,10 @@ header {
} }
a { a {
color: $beetbox-blue; color: $link-color;
&:visited, &:hover { &:visited, &:hover {
color: $visited-link; color: $link-color-visited;
} }
} }

14
layouts/_default/baseof.html

@ -19,7 +19,19 @@
<meta name="description" content="{{ delimit . "," }}"> <meta name="description" content="{{ delimit . "," }}">
{{- end }} {{- end }}
{{ $style := resources.Get "/sass/main.scss" | resources.ToCSS -}} {{ $defaultColors := dict
"background_color" "#1f2835"
"font_color" "#f8f8ff"
"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 -}}
<link rel="stylesheet" href="{{ $style.Permalink }}"> <link rel="stylesheet" href="{{ $style.Permalink }}">
<title> <title>

2
layouts/partials/header.html

@ -1,6 +1,6 @@
<header> <header>
<nav class="spread"> <nav class="spread">
<a href="/"><img src="/images/logo.svg" alt="The {{ .Site.Title }} Logo"></a> <a href="/"><img src="{{ .Site.Params.logo }}" alt="The {{ .Site.Title }} Logo"></a>
<ul class="spread"> <ul class="spread">
<li><a href="https://gitea.beetbox.io/BeetBox" title="Gitea Repositories">Gitea</a></li> <li><a href="https://gitea.beetbox.io/BeetBox" title="Gitea Repositories">Gitea</a></li>
<li><a href="https://odysee.com/@BeetBox:f" title="Odysee Channel">Odysee</a></li> <li><a href="https://odysee.com/@BeetBox:f" title="Odysee Channel">Odysee</a></li>

Loading…
Cancel
Save