From 3e0948223975284efc0aa7d7649088c96634a7f1 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 3 Dec 2020 00:28:06 +0100 Subject: [PATCH] Improve scrolling behavior of headers This was way too much work -.- --- web/viewdata.html | 128 +++++++++++++++++++++++++++++++--------------- 1 file changed, 86 insertions(+), 42 deletions(-) diff --git a/web/viewdata.html b/web/viewdata.html index d32b446..5de2cdb 100644 --- a/web/viewdata.html +++ b/web/viewdata.html @@ -16,55 +16,67 @@ } main { height: calc(100% - 42px); - overflow-Y: scroll; vertical-align: top; } main > section { - height: 100%; + height: calc(100% - 32px); display: inline-block; vertical-align: top; } - main > section.names { - width: 127px; - border-right: 1px solid gray; - } - main > section.timewrap { - width: calc(100% - 128px); - overflow-X: scroll; - } - .times { - overflow-X: hidden; - } - .row { - position: relative; - height: 2em; - background-size: 60px 100%; - } - .names .row:nth-child(odd) { background: #ddd; } - .names .row:nth-child(even) { background: #eee; } - .times .row:nth-child(odd) { - background-image: linear-gradient(to right, #bbb 1px, #ddd 1px); - } - .times .row:nth-child(even) { - background-image: linear-gradient(to right, #bbb 1px, #eee 1px); - } - .row > span { - padding: 7px; + main > .viewheader { display: inline-block; + vertical-align: top; } - .names { + main > section.names, #nameheader { + width: 127px; + overflow: hidden; + border-right: 1px solid gray; font-weight: bold; text-transform: capitalize; } - .times span { + main #names { + padding-bottom: 32px; + } + main > section.times, #timeheader { + width: calc(100% - 128px); + overflow: hidden; + } + .scroll { + height: 100%; + width: 100%; + overflow: scroll; + } + .row, .row #timelabels { + position: relative; + height: 32px; + background-size: 60px 100%; + } + .names .row:nth-child(even) { background: #ddd; } + .names .row:nth-child(odd) { background: #eee; } + .times .row:nth-child(even) { + background-image: linear-gradient(to right, #bbb 1px, #ddd 1px); + } + .times .row:nth-child(odd) { + background-image: linear-gradient(to right, #bbb 1px, #eee 1px); + } + .row span { + padding: 7px; + display: inline-block; + } + .times span, #timeheader span { position: absolute; background: #c50e1f; color: #ddd; margin-right: 16px; } - #timeheader span { - background: none; - color: #444; + .viewheader.row { + height: 31px; + background: #ddd !important; + border-bottom: 1px solid gray; + } + .viewheader span { + background: none !important; + color: #444 !important; padding-left: 4px; } @@ -76,10 +88,27 @@ Raum:
-
+
+ Names +
+
+
+
+
+
+
+
+
+