aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Lasseter <user@4574.co.uk>2025-05-14 11:27:49 +0100
committerNat Lasseter <user@4574.co.uk>2025-05-14 11:27:49 +0100
commit3dc1417d9038155efc36dcf1c10ffdeef30f6d19 (patch)
tree7ac8ec5e57dca2d751255a3ed40f81c981c64f8e
parent24e512ba55382455bafd28c330a0ea635447dba7 (diff)
[toplinks] trialling new waste thing
-rw-r--r--cgi/home.cgi4
-rw-r--r--static/styles.css3
2 files changed, 4 insertions, 3 deletions
diff --git a/cgi/home.cgi b/cgi/home.cgi
index 4196d1d..655bdcb 100644
--- a/cgi/home.cgi
+++ b/cgi/home.cgi
@@ -48,7 +48,7 @@ def words_collection(resp)
end
def graphic_collection(resp)
- events = Array.new(28) { "empty" }
+ events = Array.new(30) { "empty" }
resp.each { |coll|
days = ((Time.parse(coll["nextCollection"]) - Time.now) / (60*60*24)).ceil
@@ -62,7 +62,7 @@ def graphic_collection(resp)
} +
$cgi.tr {
tout = ""
- (0..27).step(2).each { |i|
+ (0..29).step(2).each { |i|
tout += $cgi.td(class: "waste-#{events[i]} morning")
tout += $cgi.td(class: "waste-#{events[i+1]} evening")
}
diff --git a/static/styles.css b/static/styles.css
index c780c1d..1e44275 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -75,14 +75,15 @@ table.waste-table {
td {
width: 10px;
height: 10px;
+ text-align: center;
}
td.morning {
border: 2px solid black;
border-right: none;
- opacity: 50%;
}
td.evening {
border: 2px solid black;
border-left: none;
+ opacity: 50%;
}
}