Update layout to use Hugo Image Processing.
Created shortcode rimg that uses the srcset attribute to display responsive images.
This commit is contained in:
parent
da036923f3
commit
3a77d4c703
10 changed files with 218 additions and 20 deletions
|
@ -6,6 +6,17 @@
|
|||
{{ if site.Params.logo.inverted }}
|
||||
{{ $invertedLogo = site.Params.logo.inverted }}
|
||||
{{ end }}
|
||||
{{ $mainLogo:= resources.Get $mainLogo}}
|
||||
{{ if $mainLogo }}
|
||||
{{ $mainLogo = $mainLogo.Resize "42x" }}
|
||||
{{ $mainLogo = $mainLogo.RelPermalink}}
|
||||
|
||||
{{ end }}
|
||||
{{ $invertedLogo:= resources.Get $invertedLogo}}
|
||||
{{ if $invertedLogo }}
|
||||
{{ $invertedLogo = $invertedLogo.Resize "42x" }}
|
||||
{{ $invertedLogo = $invertedLogo.RelPermalink}}
|
||||
{{ end }}
|
||||
|
||||
<nav class="navbar navbar-expand-xl top-navbar final-navbar shadow">
|
||||
<div class="container">
|
||||
|
@ -13,7 +24,7 @@
|
|||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
|
||||
<img src="{{ $mainLogo | relURL }}">
|
||||
<img src="{{ $mainLogo }}">
|
||||
{{- site.Title -}}
|
||||
</a>
|
||||
<button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()">
|
||||
|
@ -29,6 +40,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Store the logo information in a hidden img for the JS -->
|
||||
<img src="{{ $mainLogo | relURL }}" class="d-none" id="main-logo">
|
||||
<img src="{{ $invertedLogo | relURL }}" class="d-none" id="inverted-logo">
|
||||
<img src="{{ $mainLogo }}" class="d-none" id="main-logo">
|
||||
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo">
|
||||
</nav>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue