diff --git a/layouts/_partials/custom/navbar-title.html b/layouts/_partials/custom/navbar-title.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_partials/navbar-title.html b/layouts/_partials/navbar-title.html new file mode 100644 index 0000000..2aea9de --- /dev/null +++ b/layouts/_partials/navbar-title.html @@ -0,0 +1,16 @@ +{{- $logoPath := .Site.Params.navbar.logo.path | default "images/logo.svg" -}} +{{- $logoLink := .Site.Params.navbar.logo.link | default .Site.Home.RelPermalink -}} +{{- $logoWidth := .Site.Params.navbar.logo.width | default "20" -}} +{{- $logoHeight := .Site.Params.navbar.logo.height | default "20" -}} +{{- $logoDarkPath := .Site.Params.navbar.logo.dark | default $logoPath -}} + + + {{- $displayTitle := (.Site.Params.navbar.displayTitle | default true) }} + {{- if (.Site.Params.navbar.displayLogo | default true) }} + {{ cond $displayTitle `Logo` .Site.Title }} + {{ cond $displayTitle `Dark Logo` .Site.Title }} + {{- end }} + {{- if $displayTitle }} + {{- .Site.Title -}} + {{- end }} + diff --git a/layouts/_partials/navbar.html b/layouts/_partials/navbar.html index f19c49a..e735199 100644 --- a/layouts/_partials/navbar.html +++ b/layouts/_partials/navbar.html @@ -1,9 +1,3 @@ -{{- $logoPath := .Site.Params.navbar.logo.path | default "images/logo.svg" -}} -{{- $logoLink := .Site.Params.navbar.logo.link | default .Site.Home.RelPermalink -}} -{{- $logoWidth := .Site.Params.navbar.logo.width | default "20" -}} -{{- $logoHeight := .Site.Params.navbar.logo.height | default "20" -}} -{{- $logoDarkPath := .Site.Params.navbar.logo.dark | default $logoPath -}} - {{- $navWidth := "hx:max-w-[90rem]" -}} {{- with .Site.Params.navbar.width -}} {{ if eq . "normal" -}} @@ -20,16 +14,7 @@ >