Created
December 9, 2009 00:31
-
-
Save geelen/252126 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Post(username: String, title: String, body: String) | |
object Main { | |
import Tags._ | |
def main(args: Array[String]) { | |
println(render(Post("glen", "opinions", "wack."))) | |
} | |
def render(post: Post) = { | |
html( | |
head( | |
title(post.title) | |
), | |
body( | |
h1(post.title, p("foo")), | |
h2('class -> "us'er", post.username), | |
p('class -> "post", post.body), | |
span("span1"), | |
span('class -> "span2", "span2"), | |
span('class -> "span3", 'id -> "win", "span3"), | |
span('class -> "span3", 'id -> "winboat", 'style -> "lol: strong", "span3") | |
) | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>opinions</title> | |
</head> | |
<body> | |
<h1>opinions | |
<p>foo</p> | |
</h1> | |
<h2 class='us\'er'>glen</h2> | |
<p class='post'>wack.</p> | |
<span>span1</span> | |
<span class='span2'>span2</span> | |
<span class='span3' id='win'>span3</span> | |
<span class='span3' style='lol: strong' id='winboat'>span3</span> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment