Put icons into a level to keep horizontal layout on mobile devices
parent
fb30014a2d
commit
62c7ec7511
|
@ -5,8 +5,8 @@
|
||||||
{{ $image := resources.Get "img/logo.jpg" }}
|
{{ $image := resources.Get "img/logo.jpg" }}
|
||||||
|
|
||||||
{{ with $image }}
|
{{ with $image }}
|
||||||
{{ $imageResized := $image.Resize "64x" }}
|
{{ $imageResized := $image.Resize "64x" }}
|
||||||
{{ $imageURL = $imageResized.Permalink }}
|
{{ $imageURL = $imageResized.Permalink }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img src="{{ $imageURL }}">
|
<img src="{{ $imageURL }}">
|
||||||
</a>
|
</a>
|
||||||
|
@ -73,22 +73,28 @@
|
||||||
<a class="navbar-item {{ if $currentPage.IsMenuCurrent $menuName . }}is-active is-tab{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
<a class="navbar-item {{ if $currentPage.IsMenuCurrent $menuName . }}is-active is-tab{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
<div class="navbar-end ml-0 mr-4">
|
||||||
{{ end }}
|
<div class="level">
|
||||||
<div class="navbar-end ml-0 mr-4">
|
<div class="level-left">
|
||||||
<!-- Each item should have a corresponding assets/img/x.png and link in config.yaml -->
|
<div class="level-item">
|
||||||
{{ range (slice "github" "mastodon" "gitea" "mail" "funkwhale" )}}
|
<!-- Each item should have a corresponding assets/img/x.png and link in config.yaml -->
|
||||||
{{ $imageName := . }}
|
{{ range (slice "github" "mastodon" "gitea" "mail" "funkwhale" )}}
|
||||||
<!-- Get image and resize to logo size -->
|
{{ $imageName := . }}
|
||||||
{{ $imagePath := printf "img/%s.png" $imageName }}
|
<!-- Get image and resize to logo size -->
|
||||||
{{ $image := resources.Get $imagePath }}
|
{{ $imagePath := printf "img/%s.png" $imageName }}
|
||||||
{{ $imageResized := $image.Resize "64x" }}
|
{{ $image := resources.Get $imagePath }}
|
||||||
<!-- Get logo link in site params (index allows to use a dynamic parameter name) -->
|
{{ $imageResized := $image.Resize "64x" }}
|
||||||
<a class="navbar-item" href="{{ index $.Site.Params $imageName }}">
|
<!-- Get logo link in site params (index allows to use a dynamic parameter name) -->
|
||||||
<img src="{{ $imageResized.Permalink }}">
|
<a class="navbar-item" href="{{ index $.Site.Params $imageName }}">
|
||||||
</a>
|
<img src="{{ $imageResized.Permalink }}">
|
||||||
{{ end }}
|
</a>
|
||||||
</div>
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in New Issue