From 86b35e9b5676e1043f99c0002a3d48901f9bd085 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Tue, 12 Jul 2022 14:08:37 +0000 Subject: [PATCH] Style: Replace yesod favicon with Vervis icon made by ikomi (thanks <3) --- config/favicon.ico | Bin 1342 -> 0 bytes config/favicon.png | Bin 0 -> 1208 bytes config/favicon.svg | 181 ++++++++++++++++++++++++ config/routes | 6 +- src/Vervis/Foundation.hs | 5 +- src/Vervis/Handler/Common.hs | 19 ++- templates/default-layout-wrapper.hamlet | 3 + 7 files changed, 204 insertions(+), 10 deletions(-) delete mode 100644 config/favicon.ico create mode 100644 config/favicon.png create mode 100644 config/favicon.svg diff --git a/config/favicon.ico b/config/favicon.ico deleted file mode 100644 index 9dd5f356d4119b9f50f2cfc370d84b975688ca3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1342 zcmZQzU}Ruo5D;Jh(h3Y2EDQ{43=BX%6OhlyumQ;K1Bz*Y#DG`9fi}^UD+ED^lEv4=~bZE?Oa#QNJ z+cU2q@Jy_cXbVuDRgi&!Pndy$Uj&FjG%!r~G*}n}eN{LmftXW(osr#3fhE^klz}@^ zU$|;Qg2VkYvnvl)`{~~bP+{8=sLs_J1jT`BoV|gnVB8(3%DyR3nI&CMh(Rw@h3UVq z976)oLHzLs0y{P~#GTvJ7=J#|Q0S1eI75h=9Fw`b9HR{w%Q9NKNHZGw$TO`BQDl7J zB*l;!s>tv^SdrnOhYW+Vqd0?Ip`+sMGqWlVOi6OO5U9ko&Rv=z-&2+$3yQ1#2)2Iyt@UV6l_ZOK%y5iLO!%E~8CEhtTI!F91gl`Au7IhU0E0?}kN(w@ z(@GAltcg2Y=&tj-&|Ulg{DQz6r)QS$ZjG{eR_vksuf$95e~GvL|56`=|G7@8hd^n- zM_a_T#Lx6fU6|F+{xt7rP0@~@>%wjS*G1U>Z;o;N-k;|6qA}9`6OjL}G1~EeW3=^5DjW<90fw^D6(KfPd$WT6cc%IO1Eo_)x()s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/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} $#