1
Fork 0

Add multiple favicon sizes

This commit is contained in:
Jake Howard 2019-10-13 18:02:41 +01:00
parent 39d97b3275
commit 1f28ed3a4b
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 8 additions and 1 deletions

View file

@ -7,7 +7,7 @@
<link rel="alternate" type="application/rss+xml" href="{{ .Site.RSSLink }}" /> <link rel="alternate" type="application/rss+xml" href="{{ .Site.RSSLink }}" />
<meta name="superfish" content="nofish" /> <meta name="superfish" content="nofish" />
<meta name="application-name" content="{{ .Site.Title }}" /> <meta name="application-name" content="{{ .Site.Title }}" />
<link rel="icon" type="image/png" href='{{ ((resources.Get "/img/logo-transparent.png" | fingerprint).Resize "100x").RelPermalink }}'/> {{ partial "favicon.html" }}
{{ partial "style.html" "scss/style.scss" }} {{ partial "style.html" "scss/style.scss" }}
{{ partial "style.html" "css/font-awesome.css" }} {{ partial "style.html" "css/font-awesome.css" }}

View file

@ -0,0 +1,7 @@
{{ $image := "/img/logo-transparent.png" }}
{{ $sizes := slice 16 32 64 100 200 }}
{{ range $sizes }}
{{ $sizes := printf "%dx%d" . . }}
<link rel="icon" type="image/png" sizes="{{ $sizes }}" href='{{ ((resources.Get $image | fingerprint).Resize $sizes).RelPermalink }}'/> -->
{{ end }}