Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use combineStyleSheets #45

Open
wants to merge 1 commit into
base: postgres
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Foundation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ instance Yesod App where
-- you to use normal widget features in default-layout.

pc <- widgetToPageContent $ do
addStylesheet $ StaticR css_bootstrap_css
$(combineStylesheets 'StaticR defaultCss)
$(widgetFile "default-layout")
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")

Expand Down
6 changes: 5 additions & 1 deletion Settings/StaticFiles.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
module Settings.StaticFiles where

import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
import Yesod.Static (staticFiles, StaticRoute)

-- | This generates easy references to files in the static directory at compile time,
-- giving you compile-time verification that referenced files exist.
-- Warning: any files added to your static directory during run-time can't be
-- accessed this way. You'll have to use their FilePath or URL to access them.
staticFiles (appStaticDir compileTimeAppSettings)

defaultCss :: [StaticRoute]
defaultCss = [ css_bootstrap_css
]