Skip to content

Commit

Permalink
New monochrome logo and favicon code-golf#63.
Browse files Browse the repository at this point in the history
  • Loading branch information
SirBogman committed May 31, 2020
1 parent 80b271c commit 1360a8c
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 8 deletions.
32 changes: 27 additions & 5 deletions assets/build
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ my ( %data, %paths );

for (
sort { $b =~ /\.woff2$/ <=> $a =~ /\.woff2$/ or $a cmp $b }
<assets/*.{css,ico,js,woff2}>
<assets/*.{css,js,png,woff2,svg}>
) {
say;

Expand All @@ -36,13 +36,35 @@ for (

my $name = s/\.(\w)/\U$1/r;

if ( $_ eq 'favicon.ico' ) {
if ( $_ eq 'favicon.svg' ) {
$data{$name} = $data;

print $fh <<'GO';
case "/favicon.ico":
w.Header().Set("Content-Type", "image/x-icon")
w.Write(faviconIco)
case "/favicon.svg":
w.Header().Set("Content-Type", "image/svg+xml")
w.Write(faviconSvg)
GO

next;
}
if ( $_ eq 'favicon16.png' ) {
$data{$name} = $data;

print $fh <<'GO';
case "/favicon16.png":
w.Header().Set("Content-Type", "image/png")
w.Write(favicon16Png)
GO

next;
}
if ( $_ eq 'favicon32.png' ) {
$data{$name} = $data;

print $fh <<'GO';
case "/favicon32.png":
w.Header().Set("Content-Type", "image/png")
w.Write(favicon32Png)
GO

next;
Expand Down
Binary file removed assets/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions assets/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicon32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ func main() {
r.Get("/about", routes.About)
r.Get("/assets/{asset}", routes.Asset)
r.Get("/callback", routes.Callback)
r.Get("/favicon.ico", routes.Asset)
r.Get("/favicon.svg", routes.Asset)
r.Get("/favicon16.png", routes.Asset)
r.Get("/favicon32.png", routes.Asset)
r.Get("/feeds/{feed}", routes.Feed)
r.Get("/ideas", routes.Ideas)
r.Get("/log-out", routes.LogOut)
Expand Down
3 changes: 3 additions & 0 deletions views/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<link rel=alternate href=/feeds/atom type=application/atom+xml>
<link rel=alternate href=/feeds/rss type=application/rss+xml>
<link rel=alternate href=/feeds/json type=application/json>
<link rel=icon type=image/svg+xml href=/favicon.svg>
<link rel="alternate icon" type=image/png href=/favicon16.png sizes=16x16>
<link rel="alternate icon" type=image/png href=/favicon32.png sizes=32x32>

{{/* FIXME This won't change for dark themes :-( */}}
<meta name=theme-color content=#343A40>
Expand Down
2 changes: 1 addition & 1 deletion views/svg/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1360a8c

Please sign in to comment.