From e9a79251526425b769dbcac6816882b998564371 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 9 Sep 2019 21:00:56 +0100 Subject: [PATCH] feat: add XS and XL font sizes and change default font size to L --- exampleSite/config/_default/params.toml | 14 +++++++++----- layouts/partials/functions/parse_theme.html | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 739382b4..2f383892 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -2,7 +2,7 @@ # Documentation: https://sourcethemes.com/academic/ # Choose a theme. -# Latest themes (may require updating Academic): https://sourcethemes.com/academic/themes/ +# Latest themes (may require updating): https://sourcethemes.com/academic/themes/ # Browse built-in themes in `themes/academic/data/themes/` # Browse user installed themes in `data/themes/` theme = "minimal" @@ -10,15 +10,15 @@ theme = "minimal" # Enable users to switch between day and night mode? day_night = true -# Overrride the theme's font set (optional). -# Latest font sets (may require updating Academic): https://sourcethemes.com/academic/themes/ +# Override the theme's font set (optional). +# Latest font sets (may require updating): https://sourcethemes.com/academic/themes/ # Browse built-in font sets in `themes/academic/data/fonts/` # Browse user installed font sets in `data/fonts/` font = "" # Choose a font size. -# Sizes: s (small), m (medium), l (large) -font_size = "m" +# Sizes: XS (extra small), S (small), M (medium), L (large - DEFAULT), XL (extra large) +font_size = "L" # Description for social sharing and search engines. If undefined, superuser role is used in place. description = "" @@ -109,6 +109,10 @@ latitude = "37.4275" longitude = "-122.1697" zoom = 15 +# Address line delimiter +# Popular separators are ", " (comma), "
" (new line), " " (space) +address_delimiter = ", " + ############################ ## Plugins ## ############################ diff --git a/layouts/partials/functions/parse_theme.html b/layouts/partials/functions/parse_theme.html index 769217c8..101d2e6a 100644 --- a/layouts/partials/functions/parse_theme.html +++ b/layouts/partials/functions/parse_theme.html @@ -9,9 +9,9 @@ {{/* Get Font Size. */}} -{{- $font_size := site.Params.font_size | default "m" -}} -{{- $font_sizes := dict "s" 16 "m" 21 "l" 25 -}} -{{- $font_size_numeric := (index $font_sizes $font_size) | default (index $font_sizes "m") -}} +{{- $font_size := lower site.Params.font_size | default "l" -}} +{{- $font_sizes := dict "xs" 14 "s" 16 "m" 18 "l" 21 "xl" 23 -}} +{{- $font_size_numeric := (index $font_sizes $font_size) | default (index $font_sizes "l") -}} {{- $scr.Set "font_size" $font_size_numeric -}} {{- $scr.Set "font_size_small" (mul 0.77 $font_size_numeric) -}}