Skip to content

Instantly share code, notes, and snippets.

@sadache
Forked from nicmarti/demo.scala
Created October 18, 2011 14:23
Show Gist options
  • Save sadache/1295540 to your computer and use it in GitHub Desktop.
Save sadache/1295540 to your computer and use it in GitHub Desktop.
Yes I am proud to be able to write this kind of Code
@(contacts:List[(Long,String,String)])
<html>
<head>
<title>ZenContact - Play! 2 Sample application</title>
<link rel="shortcut icon" type="image/png" href="http://www.playframework.org/public/images/favicon.png">
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Varela+Round|Droid+Sans">
</head>
<body>
<div id="mainPanel" class="shadow">
<span class="bigLogo">ZenContact</span>
<a href="@routes.Application.prepareCreate()">Create a new contact</a>
<hr/>
<h5>Number of contacts in the database: @contacts.length</h5>
@for(letter<-("ABCDEFGHIJKLMNOPQRSTUVWXYZ#")) {
<h3>@letter</h3>
@contacts.filter(_._2.toUpperCase.charAt(0)==letter).map{ contact=>
<strong>@contact._2</strong> @contact._3
}
}
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment