@hackage / Shpadoinkle-template

Read standard file formats into Shpadoinkle with Template Haskell

Latest0.0.0.2

About

Metadata

  • Last updated , by fresheyeball
  • License BSD-3-Clause
  • Categories Web Development
  • Maintained by: isaac.shapira@platonic.systems

  • Lottery factor: 0

Links

Installation

Readme

Shpadoinkle Template

Goldwater Haddock BSD-3 built with nix Hackage Hackage Deps Hackage CI

This module provides the ability to read files into Shpadoinkle views.

Usage

Lets say you have template.html

<h1>Hi!</h1>
<div>Nice to meat you</div>

you can now embed it into a Shpadoinkle

view :: Html m a
view = div [ className "my-view" ] $(embedHtml "./template.html")

which will render as

<div class="my-view">
  <h1>Hi!</h1>
  <div>Nice to meat you</div>
</div>