diff options
author | Matthew Lemon <y@yulqen.org> | 2023-12-17 20:04:56 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-12-17 20:04:56 +0000 |
commit | a9fdcbc3e7fb43be9b5b25b56c80d11cec970f79 (patch) | |
tree | 0e746acf8283100ac1ae9559263944fcb21c2d28 | |
parent | a3044438caa594a826e49bb08b745c093bcb51cc (diff) |
Gone for light green table and no bootstrap
-rw-r--r-- | app/controllers/events_controller.rb | 2 | ||||
-rw-r--r-- | app/views/events/index.html.erb | 36 |
2 files changed, 30 insertions, 8 deletions
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index d9e390a..058486d 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -4,7 +4,7 @@ class EventsController < ApplicationController # GET /events or /events.json def index @events = Event.all.order(date: :asc) - @january_dates = Date.new(2023, 01, 01)..Date.new(2023, 01, 31) + @january_dates = Date.new(2024, 01, 01)..Date.new(2024, 01, 31) render "index" end diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index f07b5df..5c9402f 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -6,10 +6,29 @@ <%# <%= link_to "New event", new_event_path %1> %> -<table class="table table-success table-striped table-bordered mt-5"> +<style type="text/css" media="screen"> + table { + width: 100%; + border-collapse: collapse; + background: lightgreen; + margin-top: 30px; + table-layout: fixed; + border: 2px solid; + } + th, td { + border: 1px solid; + padding: 3px; + } +</style> + +<table> + <col style="width: 5%"> + <col style="width: 10%"> + <col style="width: 85%"> <thead> <tr> - <th>January Date</th> + <th>Date</th> + <th>Bunter</th> <th>Day</th> </tr> </thead> @@ -17,17 +36,20 @@ <% @january_dates.each do |e| %> <% if e.saturday? %> <tr> - <td style="color: gray"><%= e %></td> - <td style="color: gray"><%= e.strftime("%A") %></td> + <td style="background: lightgray; color: gray"><%= e.day %></td> + <td style="background: lightgray; color: gray">Toss</td> + <td style="background: lightgray; 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> + <td style="background: lightgray; color: gray"><%= e.day %></td> + <td style="background: lightgray; color: gray">Toss</td> + <td style="background: lightgray; color: gray"><%= e.strftime("%A") %></td> </tr> <% else %> <tr> - <td><%= e %></td> + <td><%= e.day %></td> + <td>Toss</td> <td><%= e.strftime("%A") %></td> </tr> <% end %> |