From 489583486bd9d31de5bec8751d7e63997c325fd3 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 30 Oct 2023 00:18:04 -0400 Subject: added archive page and some expert puzzles --- app/views/wittle/puzzles/about.html.haml | 1 + app/views/wittle/puzzles/index.html.haml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'app/views') diff --git a/app/views/wittle/puzzles/about.html.haml b/app/views/wittle/puzzles/about.html.haml index 628ba0b..6a47972 100644 --- a/app/views/wittle/puzzles/about.html.haml +++ b/app/views/wittle/puzzles/about.html.haml @@ -1,3 +1,4 @@ %p by Hatkirby, with help from Sigma144 and jbzdarkid %p= link_to "Normal", @normal_puzzle %p= link_to "Hard", @hard_puzzle +%p= link_to "Expert", @expert_puzzle diff --git a/app/views/wittle/puzzles/index.html.haml b/app/views/wittle/puzzles/index.html.haml index e69de29..097eb87 100644 --- a/app/views/wittle/puzzles/index.html.haml +++ b/app/views/wittle/puzzles/index.html.haml @@ -0,0 +1,25 @@ +%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 -- cgit 1.4.1