diff --git a/internal/server/routes.go b/internal/server/routes.go index 3ccf8aa..863a167 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -67,6 +67,24 @@ func NewRouter(cfg Config) http.Handler { dist := http.FileServer(http.Dir("./dist")) mux.Handle("/dist/", http.StripPrefix("/dist/", withMimeTypes(dist))) + // Serve Apple Touch Icons from static directory + mux.HandleFunc("/apple-touch-icon.png", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "image/svg+xml") + http.ServeFile(w, r, "./static/apple-touch-icon.svg") + }) + mux.HandleFunc("/apple-touch-icon-precomposed.png", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "image/svg+xml") + http.ServeFile(w, r, "./static/apple-touch-icon-precomposed.svg") + }) + mux.HandleFunc("/apple-touch-icon-120x120.png", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "image/svg+xml") + http.ServeFile(w, r, "./static/apple-touch-icon-120x120.svg") + }) + mux.HandleFunc("/apple-touch-icon-120x120-precomposed.png", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "image/svg+xml") + http.ServeFile(w, r, "./static/apple-touch-icon-120x120-precomposed.svg") + }) + mux.HandleFunc("/", animeHandler.HandleCatalog) mux.HandleFunc("/api/catalog/airing", animeHandler.HandleCatalogAiring) mux.HandleFunc("/api/catalog/popular", animeHandler.HandleCatalogPopular) diff --git a/static/apple-touch-icon-120x120-precomposed.svg b/static/apple-touch-icon-120x120-precomposed.svg new file mode 100644 index 0000000..fb4251d --- /dev/null +++ b/static/apple-touch-icon-120x120-precomposed.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/apple-touch-icon-120x120.svg b/static/apple-touch-icon-120x120.svg new file mode 100644 index 0000000..fb4251d --- /dev/null +++ b/static/apple-touch-icon-120x120.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/apple-touch-icon-precomposed.svg b/static/apple-touch-icon-precomposed.svg new file mode 100644 index 0000000..fb4251d --- /dev/null +++ b/static/apple-touch-icon-precomposed.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/apple-touch-icon.svg b/static/apple-touch-icon.svg new file mode 100644 index 0000000..fb4251d --- /dev/null +++ b/static/apple-touch-icon.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file