yu-core-0.1.1.2: The core of Yu.

Copyright(C) 2017-2018 Johann Lee <me@qinka.pro>
LicenseGPL3
Maintainerme@qinka.pro
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Yu.Core.View.Internal

Contents

Description

The internal party for View, including Hamletic.

Synopsis

Documentation

class (MonadHandler m, Mongodic a m) => Hamletic a m | m -> a where Source #

Hamtletic

Limit, and test

Minimal complete definition

getTitle, getFramePrefix, getVersion, getRaw

Methods

getTitle Source #

Arguments

:: m Text

get title

getFramePrefix Source #

Arguments

:: m Text

get the prefix path of frame

getVersion Source #

Arguments

:: m Text

get the version of blog itself or application

getRaw Source #

Arguments

:: m Bool

return raw html

yuLayout Source #

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

yuErrorHandler Source #

Arguments

:: Yesod site 
=> ErrorResponse

error

-> HandlerT site IO TypedContent 

handler the error

layouts

layoutBootstrap :: Yesod site => YuLayout site Source #

layout with bootstrap