master
Quentin Duchemin 2021-05-27 00:52:36 +02:00
parent 74384d7bdc
commit 81f8222e9d
4 changed files with 13 additions and 4 deletions

BIN
assets/img/logo.jpg 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -38,6 +38,8 @@ module:
mounts: mounts:
- source: themes/chosto/static - source: themes/chosto/static
target: assets target: assets
- source: assets
target: assets
params: params:
github: https://github.com/Chostakovitch github: https://github.com/Chostakovitch

View File

@ -2,7 +2,7 @@
<div class="has-text-centered"> <div class="has-text-centered">
Conçu avec&nbsp;<a href="https://gohugo.io/">Hugo</a>&nbsp;et&nbsp;<a href="https://bulma.io">Bulma</a>. Conçu avec&nbsp;<a href="https://gohugo.io/">Hugo</a>&nbsp;et&nbsp;<a href="https://bulma.io">Bulma</a>.
Les sources sont <a href="https://git.chosto.me/Chosto/blog">ici</a>. Les sources sont <a href="https://git.chosto.me/Chosto/blog">ici</a>.
Tout le contenu du blog est disponible sous licence&nbsp;<a href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution ShareAlike 4.0.</a> Sauf mention contraire, le contenu du blog est disponible sous licence&nbsp;<a href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution ShareAlike 4.0.</a>
<br /><br /> <br /><br />
Prenez soin de vous. ❤️ Prenez soin de vous. ❤️
</div> </div>

View File

@ -1,7 +1,14 @@
<nav class="navbar is-fixed-top is-transparent" role="navigation" aria-label="main navigation"> <nav class="navbar is-fixed-top is-transparent" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="{{ .Site.Home.Permalink }}"> <a class="navbar-item" href="{{ .Site.Home.Permalink }}">
<img src="https://bulma.io/images/placeholders/128x128.png"> {{ $imageURL := "https://bulma.io/images/placeholders/64x64.png" }}
{{ $image := resources.Get "img/logo.jpg" }}
{{ with $image }}
{{ $imageResized := $image.Resize "64x" }}
{{ $imageURL = $imageResized.Permalink }}
{{ end }}
<img src="{{ $imageURL }}">
</a> </a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar"> <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar">
<span aria-hidden="true"></span> <span aria-hidden="true"></span>
@ -76,10 +83,10 @@
<!-- Get image and resize to logo size --> <!-- Get image and resize to logo size -->
{{ $imagePath := printf "img/%s.png" $imageName }} {{ $imagePath := printf "img/%s.png" $imageName }}
{{ $image := resources.Get $imagePath }} {{ $image := resources.Get $imagePath }}
{{ $image32 := $image.Resize "64x" }} {{ $imageResized := $image.Resize "64x" }}
<!-- Get logo link in site params (index allows to use a dynamic parameter name) --> <!-- Get logo link in site params (index allows to use a dynamic parameter name) -->
<a class="navbar-item" href="{{ index $.Site.Params $imageName }}"> <a class="navbar-item" href="{{ index $.Site.Params $imageName }}">
<img src="{{ $image32.Permalink }}"> <img src="{{ $imageResized.Permalink }}">
</a> </a>
{{ end }} {{ end }}
</div> </div>