Skip to content

Instantly share code, notes, and snippets.

@y-yu
Created August 16, 2011 14:13
Show Gist options
  • Save y-yu/1149182 to your computer and use it in GitHub Desktop.
Save y-yu/1149182 to your computer and use it in GitHub Desktop.
表示してる部分のテンプレート。かなり手抜きだけど、Xslateは神。
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Data <: $today :></title>
<style type="text/css">
td {
font-size: small;
border: 1px #2b2b2b solid;
}
td.name {
width: auto;
}
td.in {
width: 10px;
background-color: #0099ff;
}
</style>
</head>
<body>
<h1><: $today :></h1>
<table>
<tr>
<td class="name">Name</td>
: for $times -> $time {
<td><: $time :></td>
: }
</tr>
: for $users.keys() -> $id {
<tr>
<td class="name"><: $users[$id].name :></td>
: for $times -> $time {
: if $users[$id].times[$time] != nil {
<td class="in" title="<: $users[$id].times[$time].join(", ") :>">
: } else {
<td>
: }
</td>
: }
</tr>
: }
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment