diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index e7d2d48d..f50da6ff 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,14 +1,20 @@ {{ $current_page := . }} + +{{/* Get site logo. */}} {{ $show_logo := site.Params.main_menu.show_logo | default true }} +{{ $has_logo := fileExists "assets/images/logo.png" }} +{{ $logo := "" }} +{{ if $has_logo }} + {{ $logo = (partial "functions/get_logo" (dict "constraint" "max_height" "size" 70)) }} +{{ end }} + {{if $show_logo}} - {{ $has_logo := fileExists "assets/images/logo.png" }} {{- if $has_logo -}} - {{ $logo := (partial "functions/get_logo" (dict "constraint" "max_height" "size" 70)) }} {{- else -}} {{- site.Title -}} @@ -27,10 +33,10 @@ {{if $show_logo}} - {{- if site.Params.logo -}} - + {{- if $has_logo -}} + {{- else -}} - {{- site.Title -}} + {{- site.Title -}} {{- end -}}