aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-12-17 21:02:25 +0000
committerMatthew Lemon <y@yulqen.org>2023-12-17 21:02:25 +0000
commit5ddfd3d2e6c13873cfaacdfd53c3e853d605f951 (patch)
tree665c2d0cb91833f3e33b1a42734aebcdb459d5c7
parenta6929cddd59e6f2a1df5b722194d84e8fb68b9d4 (diff)
Tinkering
-rw-r--r--app/assets/stylesheets/_header.scss4
-rw-r--r--app/assets/stylesheets/_styles.scss17
-rw-r--r--app/assets/stylesheets/application.bootstrap.scss2
-rw-r--r--app/views/events/_form.html.erb23
-rw-r--r--app/views/events/index.html.erb57
5 files changed, 70 insertions, 33 deletions
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 @@
+<hr>
+<h3>Create a new event</h3>
+
+<ul class="nav nav-tabs">
+ <li class="nav-item">
+ <a class="nav-link active" aria-current="page" href="#">Assessment/Inspection</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="#">SyRIF</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="#">Exercise</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
+ </li>
+</ul>
+
<%= form_with(model: event) do |form| %>
<% if event.errors.any? %>
<div style="color: red">
@@ -17,11 +35,12 @@
</div>
<div>
- <%= form.label :name, style: "display: block" %>
+ <%= form.label "Event name", style: "display: block" %>
<%= form.text_field :name %>
</div>
<div>
- <%= form.submit style: "background: green; color: white; margin-top: 2px;"%>
+ <%= form.submit style: "background: green; color: white; margin-top: 1.1em;"%>
</div>
<% end %>
+<hr>
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> %>
-<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>
+<h4>Help on this table</h4>
+
+<p>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.</p>
<table>
- <col style="width: 5%">
- <col style="width: 10%">
- <col style="width: 85%">
+ <col style="width: 7%">
+ <col style="width: 15%">
+ <col style="width: 15%">
+ <col style="width: 15%">
+ <col style="width: 15%">
+ <col style="width: 48%">
<thead>
<tr>
<th>Date</th>
- <th>Bunter</th>
<th>Day</th>
+ <th>BAES Barrow</th>
+ <th>RRDL</th>
+ <th>Op. Berths</th>
+ <th>Comments</th>
</tr>
</thead>
<tbody>
<% @january_dates.each do |e| %>
<% if e.saturday? %>
<tr>
- <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>
+ <td style="background: darkgreen; color: lightgray"><%= e.strftime("%d/%m") %></td>
+ <td style="background: darkgreen; color: lightgray"><%= e.strftime("%A") %></td>
+ <td style="background: darkgreen; color: lightgray">-</td>
+ <td style="background: darkgreen; color: lightgray">-</td>
+ <td style="background: darkgreen; color: lightgray">-</td>
+ <td style="background: darkgreen; color: lightgray">-</td>
</tr>
<% elsif e.sunday? %>
<tr>
- <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>
+ <td style="background: darkgreen; color: lightgray"><%= e.strftime("%d/%m") %></td>
+ <td style="background: darkgreen; color: lightgray"><%= e.strftime("%A") %></td>
+ <td style="background: darkgreen; color: lightgray">-</td>
+ <td style="background: darkgreen; color: lightgray">-</td>
+ <td style="background: darkgreen; color: lightgray">-</td>
+ <td style="background: darkgreen; color: lightgray">-</td>
</tr>
<% else %>
<tr>
- <td><%= e.day %></td>
- <td>Toss</td>
+ <td><%= e.strftime("%d/%m") %></td>
<td><%= e.strftime("%A") %></td>
+ <td>DSC 2/A</td>
+ <td>-</td>
+ <td>-</td>
+ <td>-</td>
</tr>
<% end %>
<% end %>