chore(backend): include stylesheet in default layout
This commit is contained in:
parent
748542533b
commit
41cb0c83eb
@ -141,6 +141,8 @@ siteLayout' :: ( BearerAuthSite UniWorX
|
|||||||
=> Maybe (WidgetFor UniWorX ()) -- ^ `pageHeading`
|
=> Maybe (WidgetFor UniWorX ()) -- ^ `pageHeading`
|
||||||
-> WidgetFor UniWorX () -> HandlerFor UniWorX Html
|
-> WidgetFor UniWorX () -> HandlerFor UniWorX Html
|
||||||
siteLayout' overrideHeading widget = do
|
siteLayout' overrideHeading widget = do
|
||||||
|
$(widgetFile "widgets/includeCss")
|
||||||
|
|
||||||
AppSettings { appUserDefaults = UserDefaultConf{..}, .. } <- getsYesod $ view appSettings
|
AppSettings { appUserDefaults = UserDefaultConf{..}, .. } <- getsYesod $ view appSettings
|
||||||
|
|
||||||
isModal <- hasCustomHeader HeaderIsModal
|
isModal <- hasCustomHeader HeaderIsModal
|
||||||
@ -487,7 +489,7 @@ siteLayout' overrideHeading widget = do
|
|||||||
frontendI18n = toJSON (mr :: FrontendMessage -> Text)
|
frontendI18n = toJSON (mr :: FrontendMessage -> Text)
|
||||||
frontendDatetimeLocale <- toJSON <$> selectLanguage frontendDatetimeLocales
|
frontendDatetimeLocale <- toJSON <$> selectLanguage frontendDatetimeLocales
|
||||||
|
|
||||||
pc <- widgetToPageContent $ do
|
pc' <- widgetToPageContent $ do
|
||||||
bundlerLinks_main StaticR
|
bundlerLinks_main StaticR
|
||||||
bundlerLinks_polyfill StaticR
|
bundlerLinks_polyfill StaticR
|
||||||
toWidget $(juliusFile "templates/i18n.julius")
|
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*/}"
|
| otherwise -> CssBuilder . LTB.fromLazyText $ "[data-uw-field-display=\"" <> fromStrict hpSecret <> "\"]{/*display:none!important*/}"
|
||||||
|
|
||||||
$(widgetFile "default-layout")
|
$(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")
|
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user