| Copyright | (C) 2017-2018 Johann Lee <me@qinka.pro> |
|---|---|
| License | GPL3 |
| Maintainer | me@qinka.pro |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | None |
| Language | Haskell2010 |
Yu.Core.View.Internal
Contents
Description
The internal party for View, including Hamletic.
- class (MonadHandler m, Mongodic a m) => Hamletic a m | m -> a where
- yuLayout :: (Hamletic a (HandlerT a IO), Yesod a) => YuLayout a -> WidgetT a IO () -> HandlerT a IO Html
- yuErrorHandler :: Yesod site => ErrorResponse -> HandlerT site IO TypedContent
- layoutBootstrap :: Yesod site => YuLayout site
Documentation
class (MonadHandler m, Mongodic a m) => Hamletic a m | m -> a where Source #
Hamtletic
Limit, and test
Minimal complete definition
Arguments
| :: (Hamletic a (HandlerT a IO), Yesod a) | |
| => YuLayout a | the layout for yu |
| -> WidgetT a IO () | widget |
| -> HandlerT a IO Html | return |
The example, or say template for layout
layoutXx pageContent hd title nav top bottom = [hamlet|
$newline never
$doctype 5
<html>
<head>
<title> {title}
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
#{hd}
^{pageHead pageContent}
<body>
#{nav}
#{top}
^{pageBody pageContent}
#{bottom}
|]
the default of yu with Yesod
Arguments
| :: Yesod site | |
| => ErrorResponse | error |
| -> HandlerT site IO TypedContent |
handler the error
layouts
layoutBootstrap :: Yesod site => YuLayout site Source #
layout with bootstrap