1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 14:26:41 -04:00

svg favicon

This commit is contained in:
2021-05-26 14:02:51 -04:00
parent 28936627bd
commit 5f81813e75
6 changed files with 12 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

1
assets/img/favicon.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" fill="none"><path fill="#6FBC4E" d="M27.7 5l17.1 9.8 8.5-4.9-17-9.9z"/><path fill="#FFB900" d="M27.7 14.8l8.6 4.9v19.7l8.5 4.9V14.8L27.7 5zM19.2 39.4l-8.5-4.9v19.6l17 9.9v-9.8l-8.5-5z"/><path fill="#009CDF" d="M27.7 44.3v-9.8l-8.5 4.9v9.8zM44.8 44.3l-17.1 9.9V64l25.6-14.7V9.9l-8.5 4.9z"/><path fill="#6FBC4E" d="M10.7 34.5l8.5 4.9 8.5-4.9-8.5-4.9zM19.2 49.2l8.5 5 17.1-9.9-8.5-4.9z"/></svg>

After

Width:  |  Height:  |  Size: 455 B

View File

@ -253,7 +253,7 @@
{{ end -}}
</style>
{{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32 48") }}
{{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32") }}
{{ partialCached "head/feeds" . }}
{{ partialCached "head/webmention" . }}
{{ partial "head/schema" . }}

View File

@ -4,7 +4,7 @@
{{ partialCached "head/mobile" . -}}
{{ partialCached "head/preload" . -}}
{{ partial "head/styles" . -}}
{{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32 48") -}}
{{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32") -}}
{{ partialCached "head/feeds" . -}}
{{ partial "head/canonical" . -}}
{{ partialCached "head/webmention" . -}}

View File

@ -7,4 +7,5 @@
{{- end }}
<link rel="author" href="{{ "humans.txt" | absURL }}">
<link rel="pgpkey" href="{{ "pubkey.asc" | absURL }}" type="application/pgp-keys">
<link rel="license" href="{{ "license/" | absURL }}">

View File

@ -1,14 +1,17 @@
{{- $appleIcon := resources.Get "img/apple-touch-icon.png" }}
<link rel="apple-touch-icon" href="{{ $appleIcon.Permalink }}" sizes="{{ $appleIcon.Width }}x{{ $appleIcon.Height }}">
{{- range (split .pngSizes " ") }}
{{- $faviconPng := resources.Get (printf "img/favicon-%v.png" .) }}
<link rel="icon" href="{{ $faviconPng.Permalink }}" sizes="{{ . }}x{{ . }}">
<!-- <link rel="icon" href="{{ $faviconPng.Permalink }}" sizes="{{ . }}x{{ . }}"> -->
{{- end -}}
{{- $s := slice -}}
{{- range (split .icoSizes " ") }}{{ $s = $s | append (printf "%vx%v" . .) }}{{ end -}}
{{- $faviconIco := resources.Get "img/favicon.ico" }}
<link rel="shortcut icon" href="{{ $faviconIco.Permalink }}" sizes="{{ delimit $s " " }}">
<link rel="icon" href="{{ $faviconIco.Permalink }}"> <!-- sizes="{{ delimit $s " " }}" -->
{{- $faviconSvg := resources.Get "img/favicon.svg" }}
<link rel="icon" href="{{ $faviconSvg.Permalink }}" type="image/svg+xml">
{{- $appleIcon := resources.Get "img/apple-touch-icon.png" }}
<link rel="apple-touch-icon" href="{{ $appleIcon.Permalink }}" sizes="{{ $appleIcon.Width }}x{{ $appleIcon.Height }}">
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}">