[1]: https://www.oreilly.com/library/view/developing-web-applicat...
[2]: https://www.yesodweb.com/
Copied below to save you a click:
Hamlet (HTML)
$doctype 5 #{pageTitle} - My Site #{pageTitle} Here is a list of your friends: $if null friends Sorry, I lied, you don't have any friends. $else $forall Friend name age <- friends #{name} (#{age} years old)
Here is a list of your friends: $if null friends
Sorry, I lied, you don't have any friends. $else
#myid color: #{red} font-size: #{bodyFontSize} foo bar baz background-image: url(@{MyBackgroundR})
section.blog { padding: 1em; border: 1px solid #000; h1 { color: #{headingColor}; } }
$(function(){ $("section.#{sectionClass}").hide(); $("#mybutton").click(function(){document.location = "@{SomeRouteR}";}); ^{addBling} });
[1]: https://www.oreilly.com/library/view/developing-web-applicat...
[2]: https://www.yesodweb.com/
Copied below to save you a click:
Hamlet (HTML)
Cassius (CSS) Lucius (CSS) Julius (JavaScript) For those curious, the above is implemented in the metaprogramming framework of Template Haskell.