Skip to content

Commit

Permalink
Merge pull request #172 from MarekPikula/disable-footer-logo
Browse files Browse the repository at this point in the history
Fix logo display if no logo/favicon are set
  • Loading branch information
gurusabarish authored Jun 15, 2024
2 parents 684a314 + 63ed2d7 commit c1ff66b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions layouts/partials/sections/footer/copyright.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<div class="container py-4">
<div class="row justify-content-center">
<div class="col-md-4 text-center">
<div class="pb-2">
<a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
<img alt="Footer logo" src="{{ .Site.Params.navbar.brandLogo | default .Site.Params.favicon }}"
height="40px" width="40px">
</a>
</div>
{{ if or .Site.Params.navbar.brandLogo .Site.Params.favicon }}
<div class="pb-2">
<a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
<img alt="Footer logo" src="{{ .Site.Params.navbar.brandLogo | default .Site.Params.favicon }}"
height="40px" width="40px">
</a>
</div>
{{ end }}
&copy; {{ now.Format "2006"}} {{ .Site.Params.copyright }} {{ .Site.Params.terms.copyright | default "All Rights Reserved" }}
<div class="text-secondary">
Made with
Expand All @@ -21,4 +23,4 @@
</div>
</div>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions layouts/partials/sections/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if(resetHeaderStyle) {
profileHeaderElem.classList.remove("showHeaderOnTop");
}
prevScrollPos = currentScrollPos;
prevScrollPos = currentScrollPos;
});
</script>
{{ end }}
Expand All @@ -51,7 +51,7 @@
<div class="container-fluid mx-xs-2 mx-sm-5 mx-md-5 mx-lg-5">
<!-- navbar brand -->
<a class="navbar-brand primary-font text-wrap" href="{{ .Site.BaseURL | relURL }}">
{{ if and (or (.Site.Params.favicon) (.Site.Params.navbar.brandLogo)) .Site.Params.navbar.showBrandLogo | default true }}
{{ if and (or (.Site.Params.favicon) (.Site.Params.navbar.brandLogo)) (.Site.Params.navbar.showBrandLogo | default true) }}
<img src="{{ .Site.Params.navbar.brandLogo | default .Site.Params.favicon }}" width="30" height="30"
class="d-inline-block align-top">
{{ .Site.Params.navbar.brandName | default .Site.Params.title }}
Expand Down

0 comments on commit c1ff66b

Please sign in to comment.