@hackage Shpadoinkle-backend-static0.2.0.0
A backend for rendering Shpadoinkle as Text.
Categories
License
BSD-3-Clause
Maintainer
fresheyeball@protonmail.com
Links
- Documentation
- No source repository
- Changelog
- Security
Versions
Installation
Dependencies (4)
- base >=4.12.0 && <4.16
- text >=1.2.3 && <1.3
- Shpadoinkle
- compactable >=0.1.2 && <0.2 Show all…
Dependents (4)
@hackage/Shpadoinkle-router, @hackage/Shpadoinkle-examples, @hackage/Shpadoinkle-disembodied, @hackage/Shpadoinkle-template
Shpadoinkle Backend Static
This module provides a static rendering backend that translates Shpadoinkle Html
into Text
.
For example:
page :: Html' a
page = h "div" [ ("class", PText "header" ) ]
[ h "h1" [] [ text "Trappers!" ] ]
main = putStrLn $ unpack $ renderStatic page
will output:
<div class="header"><h1>Trappers!</h1></div>