diff --git a/config/favicon.ico b/config/favicon.ico deleted file mode 100644 index 9dd5f35..0000000 Binary files a/config/favicon.ico and /dev/null differ diff --git a/config/favicon.png b/config/favicon.png new file mode 100644 index 0000000..df26701 Binary files /dev/null and b/config/favicon.png differ diff --git a/config/favicon.svg b/config/favicon.svg new file mode 100644 index 0000000..a93bc96 --- /dev/null +++ b/config/favicon.svg @@ -0,0 +1,181 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/config/routes b/config/routes index 18f2b32..1ec1686 100644 --- a/config/routes +++ b/config/routes @@ -1,6 +1,7 @@ -- This file is part of Vervis. -- --- Written in 2016, 2018, 2019, 2020 by fr33domlover . +-- Written in 2016, 2018, 2019, 2020, 2022 +-- by fr33domlover . -- -- ♡ Copying is an act of love. Please copy, reuse and share. -- @@ -17,7 +18,8 @@ -- ---------------------------------------------------------------------------- /static StaticR Static appStatic -/favicon.ico FaviconR GET +/favicon.svg FaviconSvgR GET +/favicon.png FaviconPngR GET /robots.txt RobotsR GET /highlight/#Text/style.css HighlightStyleR GET diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index 1f83df4..636834e 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2016, 2018, 2019 by fr33domlover . + - Written in 2016, 2018, 2019, 2022 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -760,7 +760,8 @@ instance YesodPaginate App where instance YesodBreadcrumbs App where breadcrumb route = return $ case route of StaticR _ -> ("", Nothing) - FaviconR -> ("", Nothing) + FaviconSvgR -> ("", Nothing) + FaviconPngR -> ("", Nothing) RobotsR -> ("", Nothing) PublishR -> ("Publish", Just HomeR) diff --git a/src/Vervis/Handler/Common.hs b/src/Vervis/Handler/Common.hs index 6e1b466..23074fc 100644 --- a/src/Vervis/Handler/Common.hs +++ b/src/Vervis/Handler/Common.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2016, 2019 by fr33domlover . + - Written in 2016, 2019, 2022 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -15,7 +15,8 @@ -- | Common handler functions. module Vervis.Handler.Common - ( getFaviconR + ( getFaviconSvgR + , getFaviconPngR , getRobotsR ) where @@ -28,11 +29,17 @@ import Vervis.Foundation -- These handlers embed files in the executable at compile time to avoid a -- runtime dependency, and for efficiency. -getFaviconR :: Handler TypedContent -getFaviconR = +getFaviconSvgR :: Handler TypedContent +getFaviconSvgR = return $ - TypedContent "image/x-icon" $ - toContent $(embedFile "config/favicon.ico") + TypedContent "image/svg+xml" $ + toContent $(embedFile "config/favicon.svg") + +getFaviconPngR :: Handler TypedContent +getFaviconPngR = + return $ + TypedContent "image/png" $ + toContent $(embedFile "config/favicon.png") getRobotsR :: Handler TypedContent getRobotsR = diff --git a/templates/default-layout-wrapper.hamlet b/templates/default-layout-wrapper.hamlet index b93ed07..842a106 100644 --- a/templates/default-layout-wrapper.hamlet +++ b/templates/default-layout-wrapper.hamlet @@ -10,6 +10,9 @@ $newline never + + + ^{pageHead pc} $#