Skip to content

Commit f868994

Browse files
committed
Improve favicon
1 parent 5bcc410 commit f868994

File tree

9 files changed

+98
-3
lines changed

9 files changed

+98
-3
lines changed

_includes/favicon.html

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,24 @@
22
We override favicon.html so we can add a query argument `?v=1` which
33
we can increment whenever the favicon changes in any way, to force browsers
44
to refresh their caches.
5+
6+
The primary favicon was created by merging the light and dark gaplogo-notext.svg
7+
icons with suitable CSS.
8+
9+
Moreover, we use alternate icons to support older browsers that don't
10+
support SVG favicons.
511
{%- endcomment -%}
612
{%- assign ver = 1 %}
7-
<link rel="icon" href="{{ site.baseurl }}/favicon.png?v={{ver}}" type="image/png">
8-
<link rel="icon" href="{{ site.baseurl }}/assets/logo/light/gaplogo-notext.svg?v={{ver}}" type="image/svg+xml">
9-
<link rel="apple-touch-icon" href="{{ site.baseurl }}/apple-touch-icon.png?v={{ver}}">
13+
<!-- Default favicon (SVG) -->
14+
<link rel="icon" href="{{ site.baseurl }}/assets/logo/favicon.svg?v={{ver}}" type="image/svg+xml" />
15+
16+
<!-- Light mode PNG fallbacks -->
17+
<link rel="alternate icon" href="{{ site.baseurl }}/assets/logo/light/gaplogo-notext32.png?v={{ver}}" media="(prefers-color-scheme: light)" sizes="32x32">
18+
<link rel="alternate icon" href="{{ site.baseurl }}/assets/logo/light/gaplogo-notext512.png?v={{ver}}" media="(prefers-color-scheme: light)" sizes="any">
19+
20+
<!-- Dark mode PNG fallbacks -->
21+
<link rel="alternate icon" href="{{ site.baseurl }}/assets/logo/dark/gaplogo-notext32.png?v={{ver}}" media="(prefers-color-scheme: dark)" sizes="32x32">
22+
<link rel="alternate icon" href="{{ site.baseurl }}/assets/logo/dark/gaplogo-notext512.png?v={{ver}}" media="(prefers-color-scheme: dark)" sizes="any">
23+
24+
<!-- Meta for color-scheme hint -->
25+
<meta name="color-scheme" content="light dark">

apple-touch-icon.png

-71.6 KB
Binary file not shown.
1.63 KB
Loading
31.1 KB
Loading

assets/logo/favicon.svg

Lines changed: 79 additions & 0 deletions
Loading
1.25 KB
Loading
23.2 KB
Loading

favicon.ico

-14.7 KB
Binary file not shown.

favicon.png

-4.39 KB
Binary file not shown.

0 commit comments

Comments
 (0)