Add favicon

This commit is contained in:
swagg boi 2022-07-21 20:38:40 -04:00
parent 1c8140987a
commit 2620f05b3d
9 changed files with 29 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
public/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

BIN
public/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
public/site.webmanifest Normal file
View file

@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

19
t/favicon.t Normal file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env perl
use Test::More;
use Mojo::File qw{curfile};
use Test::Mojo;
my $script = curfile->dirname->sibling('www-swagg.pl');
my $t = Test::Mojo->new($script);
$t->get_ok('/android-chrome-192x192.png')->status_is(200);
$t->get_ok('/android-chrome-512x512.png')->status_is(200);
$t->get_ok('/apple-touch-icon.png' )->status_is(200);
$t->get_ok('/favicon-16x16.png' )->status_is(200);
$t->get_ok('/favicon-32x32.png' )->status_is(200);
$t->get_ok('/favicon.ico' )->status_is(200);
$t->get_ok('/robots.txt' )->status_is(200);
$t->get_ok('/site.webmanifest' )->status_is(200);
done_testing();

View file

@ -7,6 +7,15 @@
<meta name="theme-color" content="#0000FF">
<title>Swagg::Net - <%= title %></title>
<link rel="stylesheet" type="text/css" href="/css/swagg.css">
<link rel="icon" type="image/png" sizes="192x192"
href="/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512"
href="/android-chrome-512x512.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="manifest" href="/site.webmanifest">
</head>
<body>
<% unless (session('banner') eq 'seen') { %>