chore(backend): include stylesheet in default layout

This commit is contained in:
Nora Mosbach 2024-10-20 23:41:03 +02:00
parent 748542533b
commit 41cb0c83eb

View File

@ -141,6 +141,8 @@ siteLayout' :: ( BearerAuthSite UniWorX
=> Maybe (WidgetFor UniWorX ()) -- ^ `pageHeading`
-> WidgetFor UniWorX () -> HandlerFor UniWorX Html
siteLayout' overrideHeading widget = do
$(widgetFile "widgets/includeCss")
AppSettings { appUserDefaults = UserDefaultConf{..}, .. } <- getsYesod $ view appSettings
isModal <- hasCustomHeader HeaderIsModal
@ -487,7 +489,7 @@ siteLayout' overrideHeading widget = do
frontendI18n = toJSON (mr :: FrontendMessage -> Text)
frontendDatetimeLocale <- toJSON <$> selectLanguage frontendDatetimeLocales
pc <- widgetToPageContent $ do
pc' <- widgetToPageContent $ do
bundlerLinks_main StaticR
bundlerLinks_polyfill StaticR
toWidget $(juliusFile "templates/i18n.julius")
@ -505,6 +507,7 @@ siteLayout' overrideHeading widget = do
| otherwise -> CssBuilder . LTB.fromLazyText $ "[data-uw-field-display=\"" <> fromStrict hpSecret <> "\"]{/*display:none!important*/}"
$(widgetFile "default-layout")
let pc = pc'{ pageHead = pageHead pc' <> [hamlet|<link rel=stylesheet href=foobar>|] } -- TODO replace href
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")