1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
name: hamlet
version: 1.1.9.2
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
maintainer: Michael Snoyman <michael@snoyman.com>
synopsis: Haml-like template files that are compile-time checked
description:
Hamlet gives you a type-safe tool for generating HTML code. It works via Quasi-Quoting, and generating extremely efficient output code. The syntax is white-space sensitive, and it helps you avoid cross-site scripting issues and 404 errors. Please see the documentation at <http://www.yesodweb.com/book/shakespearean-templates> for more details.
.
Here is a quick overview of hamlet html. Due to haddock escaping issues, we can't properly show variable insertion, but we are still going to show some conditionals. Please see <http://www.yesodweb.com/book/shakespearean-templates> for a thorough description
.
> !!!
> <html>
> <head>
> <title>Hamlet Demo
> <body>
> <h1>Information on John Doe
> <h2>
> $if isMarried person
> Married
> $else
> Not married
category: Web, Yesod
stability: Stable
cabal-version: >= 1.8
build-type: Simple
homepage: http://www.yesodweb.com/book/shakespearean-templates
extra-source-files:
test/hamlets/*.hamlet
test/HamletTest.hs
test/HamletTestTypes.hs
test/tmp.hs
test.hs
library
build-depends: base >= 4 && < 5
, shakespeare >= 1.2.0.4 && < 1.3
, bytestring >= 0.9
, template-haskell
, parsec >= 2 && < 4
, failure >= 0.1 && < 0.3
, text >= 0.7
, containers >= 0.2
, blaze-builder >= 0.2 && < 0.4
, process >= 1.0
, blaze-html >= 0.5
, blaze-markup >= 0.5.1
, system-filepath >= 0.4
, system-fileio >= 0.3
, time >= 1
exposed-modules: Text.Hamlet
Text.Hamlet.RT
other-modules: Text.Hamlet.Parse
ghc-options: -Wall
if impl(ghc >= 7.4)
cpp-options: -DGHC_7_4
test-suite test
hs-source-dirs: test
main-is: ../test.hs
type: exitcode-stdio-1.0
ghc-options: -Wall
build-depends: hamlet
, base >= 4 && < 5
, parsec >= 2 && < 4
, containers >= 0.2
, text >= 0.7
, HUnit
, hspec >= 1.3
, blaze-html
, blaze-markup
source-repository head
type: git
location: git://github.com/yesodweb/shakespeare.git
|