Moving a lot of files that were in static to assets in order for building files not to be bundled for public website

Also (nearly) joining the 1MB gang on ad5001.eu lol.
This commit is contained in:
Adsooi 2021-10-16 21:35:17 +02:00
parent 8eabd77df9
commit b014b0d3f3
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
66 changed files with 13 additions and 1 deletions

View file

@ -1,2 +1,11 @@
<img src="/img/badges/{{ .Lang }}/{{ .Icon }}.svg" alt="{{ i18n .Alt }}" class="badge center" loading=lazy/>
{{/* Fetch a new badge from assets. TODO: Convertion from the -text version when hugo implements it.*/}}
{{ $scratch := newScratch }}
{{ $scratch.Set "badge" "/img/badges/" }}
{{ $scratch.Add "badge" .Lang }}
{{ $scratch.Add "badge" "/" }}
{{ $scratch.Add "badge" .Icon }}
{{ $scratch.Add "badge" ".svg" }}
{{ $badgeimg := resources.Get ($scratch.Get "badge") }}
<img src="{{ $badgeimg.Permalink }}" alt="{{ i18n .Alt }}" class="badge center" loading=lazy/>