mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 06:14:48 +00:00
Fix theme system
This commit is contained in:
1 parent
48945c6b80
commit
e7fa40b1c6
3 files changed
+3
-3
No files matched your search
@@ -2,7 +2,7 @@
|
||||
name = "Classic"
|
||||
|
||||
# Optional Google font URL
|
||||
google_fonts = "Playfair Display:400,700|Fauna One"
|
||||
google_fonts = "Playfair+Display:400,700|Fauna+One"
|
||||
|
||||
# Font families
|
||||
heading_font = "Playfair Display"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{{/* Attempt to load font style specified by user. */}}
|
||||
{{- $font_index := .Site.Params.font | default "default" -}}
|
||||
{{ if isset .Site.Data.themes $font_index }}
|
||||
{{ if isset .Site.Data.fonts $font_index }}
|
||||
{{- $font := index .Site.Data.fonts $font_index -}}
|
||||
{{- $scr.Set "google_fonts" $font.google_fonts -}}
|
||||
{{- $scr.Set "body_font" $font.body_font -}}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{{- partial "css/parse_theme.css" . -}}
|
||||
{{- $scr := .Scratch -}}
|
||||
{{ with ($scr.Get "google_fonts") }}
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family={{- . -}}">
|
||||
<link rel="stylesheet" href="{{ printf "//fonts.googleapis.com/css?family=%s" . }}">
|
||||
{{ end }}
|
||||
<link rel="stylesheet" href="{{ "styles.css" | relURL }}">
|
||||
{{ range .Site.Params.custom_css }}
|
||||
|
||||
Reference in new issue
Block a user