diff options
Diffstat (limited to 'app/views/puzzles/index.html.haml')
| -rw-r--r-- | app/views/puzzles/index.html.haml | 26 |
1 files changed, 26 insertions, 0 deletions
| diff --git a/app/views/puzzles/index.html.haml b/app/views/puzzles/index.html.haml new file mode 100644 index 0000000..fe497e4 --- /dev/null +++ b/app/views/puzzles/index.html.haml | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | .breadcrumb= link_to "← Back to home page", root_path | ||
| 2 | %h1 Archive | ||
| 3 | %table#archive | ||
| 4 | %tr | ||
| 5 | %th | ||
| 6 | %th Normal | ||
| 7 | %th Hard | ||
| 8 | %th Expert | ||
| 9 | - @puzzles.each do |date, dps| | ||
| 10 | %tr{ class: cycle("even", "odd") } | ||
| 11 | %td= date.strftime("%B %-d, %Y") | ||
| 12 | %td | ||
| 13 | - if dps.has_key? "normal" | ||
| 14 | %ul | ||
| 15 | - dps["normal"].each do |puzzle| | ||
| 16 | %li= link_to "\##{puzzle.id}", puzzle | ||
| 17 | %td | ||
| 18 | - if dps.has_key? "hard" | ||
| 19 | %ul | ||
| 20 | - dps["hard"].each do |puzzle| | ||
| 21 | %li= link_to "\##{puzzle.id}", puzzle | ||
| 22 | %td | ||
| 23 | - if dps.has_key? "expert" | ||
| 24 | %ul | ||
| 25 | - dps["expert"].each do |puzzle| | ||
| 26 | %li= link_to "\##{puzzle.id}", puzzle | ||
