From 5ddfd3d2e6c13873cfaacdfd53c3e853d605f951 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 17 Dec 2023 21:02:25 +0000 Subject: Tinkering --- app/assets/stylesheets/_header.scss | 4 -- app/assets/stylesheets/_styles.scss | 17 +++++++ app/assets/stylesheets/application.bootstrap.scss | 2 +- app/views/events/_form.html.erb | 23 ++++++++- app/views/events/index.html.erb | 57 ++++++++++++----------- 5 files changed, 70 insertions(+), 33 deletions(-) delete mode 100644 app/assets/stylesheets/_header.scss create mode 100644 app/assets/stylesheets/_styles.scss diff --git a/app/assets/stylesheets/_header.scss b/app/assets/stylesheets/_header.scss deleted file mode 100644 index 723e9d1..0000000 --- a/app/assets/stylesheets/_header.scss +++ /dev/null @@ -1,4 +0,0 @@ -#header-title { - background-color: yellow; - color: red; -} diff --git a/app/assets/stylesheets/_styles.scss b/app/assets/stylesheets/_styles.scss new file mode 100644 index 0000000..95ca513 --- /dev/null +++ b/app/assets/stylesheets/_styles.scss @@ -0,0 +1,17 @@ +#header-title { + background-color: yellow; + color: red; +} + +table { + width: 100%; + border-collapse: collapse; + background: lightgreen; + margin-top: 30px; + table-layout: fixed; + border: 2px solid; +} +th, td { + border: 1px solid; + padding: 3px; +} diff --git a/app/assets/stylesheets/application.bootstrap.scss b/app/assets/stylesheets/application.bootstrap.scss index 834724c..add77b4 100644 --- a/app/assets/stylesheets/application.bootstrap.scss +++ b/app/assets/stylesheets/application.bootstrap.scss @@ -1,3 +1,3 @@ @import 'bootstrap/scss/bootstrap'; @import 'bootstrap-icons/font/bootstrap-icons'; -@import '_header.scss'; +@import '_styles.scss'; diff --git a/app/views/events/_form.html.erb b/app/views/events/_form.html.erb index 4c718ae..e4ee1a0 100644 --- a/app/views/events/_form.html.erb +++ b/app/views/events/_form.html.erb @@ -1,3 +1,21 @@ +
+

Create a new event

+ + + <%= form_with(model: event) do |form| %> <% if event.errors.any? %>
@@ -17,11 +35,12 @@
- <%= form.label :name, style: "display: block" %> + <%= form.label "Event name", style: "display: block" %> <%= form.text_field :name %>
- <%= form.submit style: "background: green; color: white; margin-top: 2px;"%> + <%= form.submit style: "background: green; color: white; margin-top: 1.1em;"%>
<% end %> +
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 5c9402f..2a8cc5f 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -6,51 +6,56 @@ <%# <%= link_to "New event", new_event_path %1> %> - +

Help on this table

+ +

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? %> - - - + + + + + + <% else %> - - + + + + + <% end %> <% end %> -- cgit v1.2.3
DateBunter DayBAES BarrowRRDLOp. BerthsComments
<%= e.day %>Toss<%= e.strftime("%A") %><%= e.strftime("%d/%m") %><%= e.strftime("%A") %>----
<%= e.day %>Toss<%= e.strftime("%A") %><%= e.strftime("%d/%m") %><%= e.strftime("%A") %>----
<%= e.day %>Toss<%= e.strftime("%d/%m") %> <%= e.strftime("%A") %>DSC 2/A---