From 4492d2aaad59ca2c501167345ce23f6f86861705 Mon Sep 17 00:00:00 2001 From: Gareth Oakley Date: Sat, 13 Aug 2022 08:16:34 +0100 Subject: feat: Allow configuring logo dimensions --- exampleSite/config.yaml | 3 +++ layouts/partials/navbar-clone.html | 10 ++++++---- layouts/partials/navbar.html | 10 ++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 4c883f1..88d323e 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -23,6 +23,9 @@ params: # Logo (from static/images/logos/___) image: logos/fresh.svg link: / + # Default width/height. Uncomment if you need to change + # width: 112 + # height: 28 font: name: "Open Sans" sizes: [400,600] diff --git a/layouts/partials/navbar-clone.html b/layouts/partials/navbar-clone.html index 431ec4d..b3a1034 100644 --- a/layouts/partials/navbar-clone.html +++ b/layouts/partials/navbar-clone.html @@ -1,15 +1,17 @@ -{{- $navbar := .Site.Params.navbar }} -{{- $sidebarVisible := .Site.Params.sidebar }} +{{- $navbar := .Site.Params.navbar }} +{{- $sidebarVisible := .Site.Params.sidebar }} {{ if .Params.sidebar }} {{ $sidebarVisible = .Params.sidebar }} {{ end }} -{{- $navbarLogo := .Site.Params.navbarlogo }} +{{- $navbarLogo := .Site.Params.navbarlogo }} +{{- $navbarLogoWidth := .Site.Params.navbarlogo.width | default 112 }} +{{- $navbarLogoHeight := .Site.Params.navbarlogo.width | default 28 }}