From c504e1e907ea68e3b777db5d286974010d2361c0 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 18 Dec 2023 09:54:36 +0000 Subject: Added a new _custom.scss file Turns out if you configure it thus, you can customise the sass variables in bootstrap. https://bootstrap.themes.guide/how-to-customize-bootstrap.html --- app/assets/stylesheets/_custom.scss | 20 +++ app/assets/stylesheets/_styles.scss | 4 +- app/assets/stylesheets/application.bootstrap.scss | 1 + app/views/events/index.html.erb | 188 ++++++++++++++++------ 4 files changed, 165 insertions(+), 48 deletions(-) create mode 100644 app/assets/stylesheets/_custom.scss diff --git a/app/assets/stylesheets/_custom.scss b/app/assets/stylesheets/_custom.scss new file mode 100644 index 0000000..4a18dd1 --- /dev/null +++ b/app/assets/stylesheets/_custom.scss @@ -0,0 +1,20 @@ +@import 'bootstrap/scss/bootstrap'; + +$nav-link-color: green; +$nav-link-hover-color: darkgreen; + + +@import 'bootstrap/scss/bootstrap'; + +table { + width: 100%; + border-collapse: collapse; + background: lightgreen; + margin-top: 30px; + table-layout: fixed; + border: 2px solid; +} +td { + border: 1px solid; + padding: 3px; +} diff --git a/app/assets/stylesheets/_styles.scss b/app/assets/stylesheets/_styles.scss index 95ca513..4c8c5de 100644 --- a/app/assets/stylesheets/_styles.scss +++ b/app/assets/stylesheets/_styles.scss @@ -11,7 +11,7 @@ table { table-layout: fixed; border: 2px solid; } -th, td { - border: 1px solid; +td { + border-width: 2px; padding: 3px; } diff --git a/app/assets/stylesheets/application.bootstrap.scss b/app/assets/stylesheets/application.bootstrap.scss index add77b4..9c9fe1b 100644 --- a/app/assets/stylesheets/application.bootstrap.scss +++ b/app/assets/stylesheets/application.bootstrap.scss @@ -1,3 +1,4 @@ @import 'bootstrap/scss/bootstrap'; @import 'bootstrap-icons/font/bootstrap-icons'; @import '_styles.scss'; +@import '_custom.scss'; diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 2a8cc5f..573a67b 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -11,56 +11,152 @@

This is an example of some kind of table. There are lots of things wrong with it but who cares. It is a nice table, isn't it? I'm hoping this text spans all the way across so I can see what it looks like when it renders.

- - - - - - - - - - - - - - - - - - - <% @january_dates.each do |e| %> - <% if e.saturday? %> - - - - - - - - - <% elsif e.sunday? %> + +
+
+
DateDayBAES BarrowRRDLOp. BerthsComments
<%= e.strftime("%d/%m") %><%= e.strftime("%A") %>----
+ + + + + + + - - - - - - + + + + + + - <% else %> + + + <% @january_dates.each do |e| %> + <% if e.saturday? %> + + + + + + + + + <% elsif e.sunday? %> + + + + + + + + + <% else %> + + + + + + + + + <% end %> + <% end %> + +
<%= e.strftime("%d/%m") %><%= e.strftime("%A") %>----DateDayBAES BarrowRRDLOp. BerthsComments
<%= e.strftime("%d/%m") %><%= e.strftime("%A") %>----
<%= e.strftime("%d/%m") %><%= e.strftime("%A") %>----
<%= e.strftime("%d/%m") %><%= e.strftime("%A") %>DSC 2/A---
+ + +
+ + + + + + + + - - - - - - + + + + + + - <% end %> - <% end %> - -
<%= e.strftime("%d/%m") %><%= e.strftime("%A") %>DSC 2/A---DateDayBAES BarrowRRDLOp. BerthsComments
+ + + <% @january_dates.each do |e| %> + <% if e.saturday? %> + + <%= e.strftime("%d/%m") %> + <%= e.strftime("%A") %> + - + - + - + - + + <% elsif e.sunday? %> + + <%= e.strftime("%d/%m") %> + <%= e.strftime("%A") %> + - + - + - + - + + <% else %> + + <%= e.strftime("%d/%m") %> + <%= e.strftime("%A") %> + DSC 2/A + - + - + - + + <% end %> + <% end %> + + +
+
...
+ -- cgit v1.2.3