diff options
author | Matthew Lemon <y@yulqen.org> | 2023-12-17 17:34:32 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-12-17 17:34:32 +0000 |
commit | a3044438caa594a826e49bb08b745c093bcb51cc (patch) | |
tree | d8f6ed15fa730807e3c2c5c119d1184892fcdc4c /app/views | |
parent | 86916794341f20b26b9a321f1e15f9521f94a618 (diff) |
Ghetto weekend table colouring
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/events/index.html.erb | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 16c656b..f07b5df 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -4,17 +4,46 @@ <%= render partial: "events/form", locals: { event: Event.new } %> -<%= link_to "New event", new_event_path %> +<%# <%= link_to "New event", new_event_path %1> %> -<table class="table table-success table-striped table-bordered mt-2"> +<table class="table table-success table-striped table-bordered mt-5"> + <thead> + <tr> + <th>January Date</th> + <th>Day</th> + </tr> + </thead> + <tbody> + <% @january_dates.each do |e| %> + <% if e.saturday? %> + <tr> + <td style="color: gray"><%= e %></td> + <td style="color: gray"><%= e.strftime("%A") %></td> + </tr> + <% elsif e.sunday? %> + <tr> + <td style="color: gray"><%= e %></td> + <td style="color: gray"><%= e.strftime("%A") %></td> + </tr> + <% else %> + <tr> + <td><%= e %></td> + <td><%= e.strftime("%A") %></td> + </tr> + <% end %> + <% end %> + </tbody> +</table> + +<table class="table table-success table-striped table-bordered mt-5"> <tr> <th>Date</th> <th>Name</th> </tr> <% @events.each do |e| %> <tr> - <td><%= e.name %></td> <td><%= e.date.to_formatted_s(:rfc822) %></td> + <td><%= e.name %></td> </tr> <% end %> </table> |