diff --git a/cmd/img/android-chrome-192x192.png b/cmd/img/android-chrome-192x192.png new file mode 100644 index 0000000..70a721c Binary files /dev/null and b/cmd/img/android-chrome-192x192.png differ diff --git a/cmd/img/android-chrome-512x512.png b/cmd/img/android-chrome-512x512.png new file mode 100644 index 0000000..158333f Binary files /dev/null and b/cmd/img/android-chrome-512x512.png differ diff --git a/cmd/img/apple-touch-icon.png b/cmd/img/apple-touch-icon.png new file mode 100644 index 0000000..b75700d Binary files /dev/null and b/cmd/img/apple-touch-icon.png differ diff --git a/cmd/img/browserconfig.xml b/cmd/img/browserconfig.xml new file mode 100644 index 0000000..b3930d0 --- /dev/null +++ b/cmd/img/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/cmd/img/favicon-16x16.png b/cmd/img/favicon-16x16.png new file mode 100644 index 0000000..bc61b06 Binary files /dev/null and b/cmd/img/favicon-16x16.png differ diff --git a/cmd/img/favicon-32x32.png b/cmd/img/favicon-32x32.png new file mode 100644 index 0000000..5ee35a3 Binary files /dev/null and b/cmd/img/favicon-32x32.png differ diff --git a/cmd/img/favicon.ico b/cmd/img/favicon.ico new file mode 100644 index 0000000..a6fdf0f Binary files /dev/null and b/cmd/img/favicon.ico differ diff --git a/cmd/img/mstile-144x144.png b/cmd/img/mstile-144x144.png new file mode 100644 index 0000000..3267e81 Binary files /dev/null and b/cmd/img/mstile-144x144.png differ diff --git a/cmd/img/mstile-150x150.png b/cmd/img/mstile-150x150.png new file mode 100644 index 0000000..6298692 Binary files /dev/null and b/cmd/img/mstile-150x150.png differ diff --git a/cmd/img/mstile-310x150.png b/cmd/img/mstile-310x150.png new file mode 100644 index 0000000..4dbfe39 Binary files /dev/null and b/cmd/img/mstile-310x150.png differ diff --git a/cmd/img/mstile-310x310.png b/cmd/img/mstile-310x310.png new file mode 100644 index 0000000..1c1668e Binary files /dev/null and b/cmd/img/mstile-310x310.png differ diff --git a/cmd/img/mstile-70x70.png b/cmd/img/mstile-70x70.png new file mode 100644 index 0000000..5a72f6d Binary files /dev/null and b/cmd/img/mstile-70x70.png differ diff --git a/cmd/img/safari-pinned-tab.svg b/cmd/img/safari-pinned-tab.svg new file mode 100644 index 0000000..411a9be --- /dev/null +++ b/cmd/img/safari-pinned-tab.svg @@ -0,0 +1,28 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + diff --git a/cmd/img/site.webmanifest b/cmd/img/site.webmanifest new file mode 100644 index 0000000..b20abb7 --- /dev/null +++ b/cmd/img/site.webmanifest @@ -0,0 +1,19 @@ +{ + "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" +} diff --git a/cmd/root.go b/cmd/root.go index e8b4d04..7833ac5 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -76,5 +76,5 @@ func init() { }) rootCmd.SetVersionTemplate("roulette v{{.Version}}\n") - rootCmd.Version = "0.46.1" + rootCmd.Version = "0.47.0" } diff --git a/cmd/web.go b/cmd/web.go index 921be2c..26436a2 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -5,6 +5,8 @@ Copyright © 2023 Seednode package cmd import ( + "bytes" + "embed" "encoding/gob" "encoding/json" "fmt" @@ -26,10 +28,14 @@ import ( "syscall" "time" + "github.com/go-chi/chi/v5" "github.com/klauspost/compress/zstd" "github.com/yosssi/gohtml" ) +//go:embed img/* +var favicons embed.FS + const ( LogDate string = `2006-01-02T15:04:05.000-07:00` Prefix string = `/src` @@ -864,6 +870,13 @@ func serveMedia(paths []string, Regexes *Regexes, index *Index) http.HandlerFunc var htmlBody strings.Builder htmlBody.WriteString(``) + htmlBody.WriteString(``) + htmlBody.WriteString(``) + htmlBody.WriteString(``) + htmlBody.WriteString(``) + htmlBody.WriteString(``) + htmlBody.WriteString(``) + htmlBody.WriteString(``) htmlBody.WriteString(`