diff options
author | Gustav Näslund <gustav@gntech.se> | 2019-11-04 21:50:27 +0300 |
---|---|---|
committer | Gustav Näslund <gustav@gntech.se> | 2019-11-04 21:50:27 +0300 |
commit | 8a094e628f584e6bea04900e11c111adbb80ca63 (patch) | |
tree | 98193214df958af4ce8f171ba98d91cba31a8afe /layouts | |
parent | f7a755e7e000a2f2ed7f2e402bc05d74d7d7b111 (diff) |
Add logo image
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/sidebar.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 2e33fec..e256384 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -3,7 +3,15 @@ <div class="container {{ with .Site.Params.sidebarSticky }}sidebar-sticky{{ end }}"> <div class="sidebar-about"> <span class="site__title"> - <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> + <a href="{{ .Site.BaseURL }}"> + {{ with .Site.Params.logoimage }} + {{ $strippedSlash := ($.Site.Params.logoimage | replaceRE "^(/)+(.*)" "$2") }} + {{ $logoImage := (printf "%s%s" $.Site.BaseURL $strippedSlash) }} + <img src="{{$logoImage}}" alt="Logo Image" class="element--center"> + {{ else }} + {{ .Site.Title }} + {{ end }} + </a> </span> {{ if and (isset .Site.Params "authorimage") (not (isset .Site.Params.social "gravatar")) }} {{ with .Site.Params.authorimage }} |