about summary refs log tree commit diff stats
path: root/app/views/puzzles/index.html.haml
blob: fe497e4236727fd47c0f2be473760d50655bfa45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.breadcrumb= link_to "← Back to home page", root_path
%h1 Archive
%table#archive
  %tr
    %th
    %th Normal
    %th Hard
    %th Expert
  - @puzzles.each do |date, dps|
    %tr{ class: cycle("even", "odd") }
      %td= date.strftime("%B %-d, %Y")
      %td
        - if dps.has_key? "normal"
          %ul
            - dps["normal"].each do |puzzle|
              %li= link_to "\##{puzzle.id}", puzzle
      %td
        - if dps.has_key? "hard"
          %ul
            - dps["hard"].each do |puzzle|
              %li= link_to "\##{puzzle.id}", puzzle
      %td
        - if dps.has_key? "expert"
          %ul
            - dps["expert"].each do |puzzle|
              %li= link_to "\##{puzzle.id}", puzzle