Various helpers for the tildeverse.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
911 B

  1. {{define "table"}}
  2. <html>
  3. <head>
  4. <title>{{.Title}}</title>
  5. <link type="text/css" rel="stylesheet" href="tilde.css" />
  6. <style type="text/css">
  7. td + td + td, td+td+td+td+td+td, td+td+td+td+td+td+td+td {
  8. text-align: center;
  9. }
  10. td + td + td + td + td {
  11. text-align: right;
  12. }
  13. td + td + td + td {
  14. text-align: left;
  15. }
  16. </style>
  17. </head>
  18. <body id="hello">
  19. <h1>{{.Title}}</h1> <span class="updated"><a href="/~bear/">&uarr; up</a></span>
  20. <p>Last Updated: <time datetime="{{.Updated}}">{{.UpdatedForHumans}}</time></p>
  21. <p style="font-size: 1.2em">Current jackpot: <strong>{{.Jackpot}}</strong></p>
  22. <table>
  23. <tr>
  24. <th>&nbsp;</th>
  25. {{range .Table.Headers}}
  26. <th>{{.}}</th>
  27. {{end}}
  28. </tr>
  29. {{range $i, $r := .Table.Rows}}
  30. <tr>
  31. <td>{{add $i 1}}</td>
  32. {{range .Data}}
  33. <td>{{.}}</td>
  34. {{end}}
  35. </tr>
  36. {{end}}
  37. </table>
  38. </body>
  39. </html>
  40. {{end}}