💄 Make section headers sticky
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 24 Mar 2024 16:10:04 +0000 (17:10 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 24 Mar 2024 16:10:04 +0000 (17:10 +0100)
Unfortunately, it will not be displayed that way in either Mail.app on
macOS nor in Samsung Email on Android.

src/main/kotlin/net/pterodactylus/rhynodge/filters/webpages/savoy/MovieState.kt

index d434ac5..ae08995 100644 (file)
@@ -35,7 +35,7 @@ class MovieState(@JsonProperty val movies: Collection<Movie>, val newMovies: Col
                        style("text/css") {
                                unsafe {
                                        +"html { font-family: 'Recursive Sans Linear Static', Roboto, serif; }"
-                                       +"section.new-movies > .label { font-family: Impact, sans-serif; background-color: black; padding: 0.5ex; font-size: 200%; color: #ffffee; font-weight: bold; }"
+                                       +"section.new-movies > .label { font-family: Impact, sans-serif; background-color: black; padding: 0.5ex; font-size: 200%; color: #ffffee; font-weight: bold; position: sticky; top: 0px; }"
                                        +"section.new-movies ul { padding: 0; margin: 0; }"
                                        +"section.new-movies li.movie { list-style: none; display: grid; margin: 1ex 1ex 1ex 0ex; grid-template-columns: 250px auto; }"
                                        +"section.new-movies li.movie img { grid-area: 1/1/2/2; height: 353px; }"
@@ -45,7 +45,7 @@ class MovieState(@JsonProperty val movies: Collection<Movie>, val newMovies: Col
 
                                        +"section.daily-programmes ol { padding: 0; }"
                                        +"section.daily-programmes li { list-style: none; }"
-                                       +"section.daily-programmes li.day > .label { font-family: Impact, sans-serif; background-color: black; padding: 0.5ex; font-size: 200%; color: #ffffee; font-weight: bold; }"
+                                       +"section.daily-programmes li.day > .label { font-family: Impact, sans-serif; background-color: black; padding: 0.5ex; font-size: 200%; color: #ffffee; font-weight: bold; position: sticky; top: 0px; }"
                                        +"section.daily-programmes li .performances { border-top: 1ex; }"
                                        +"section.daily-programmes li.performance { display: inline-block; margin: 1ex 1ex 1ex 0ex; }"
                                        +"section.daily-programmes li.performance a { text-decoration: none; color: white; text-shadow: 2px 2px black; font-weight: bold; font-size: 150%; display: grid; width: 250px; height: 353px; grid-template-rows: 0fr 0fr 1fr 0fr; grid-template-columns: 250px; }"