From 2411a16bc2375ffc0346b2201d24776acb8334fe Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 7 Mar 2021 10:32:59 +0000 Subject: [PATCH] Always show vertical scroll bar to improve horizontal alignment Signed-off-by: Graham --- archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt | 3 +++ .../main/resources/org/openrs2/archive/static/css/openrs2.css | 3 +++ .../resources/org/openrs2/archive/templates/caches/index.html | 1 + .../resources/org/openrs2/archive/templates/caches/show.html | 1 + .../main/resources/org/openrs2/archive/templates/index.html | 1 + .../main/resources/org/openrs2/archive/templates/layout.html | 1 + 6 files changed, 10 insertions(+) create mode 100644 archive/src/main/resources/org/openrs2/archive/static/css/openrs2.css diff --git a/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt b/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt index 894baf7f..d5b16e9e 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/web/WebServer.kt @@ -5,6 +5,8 @@ import io.ktor.application.call import io.ktor.application.install import io.ktor.features.ContentNegotiation import io.ktor.http.ContentType +import io.ktor.http.content.resources +import io.ktor.http.content.static import io.ktor.jackson.JacksonConverter import io.ktor.response.respond import io.ktor.routing.get @@ -49,6 +51,7 @@ public class WebServer @Inject constructor( get("/caches/{id}") { cachesController.show(call) } get("/caches/{id}.zip") { cachesController.export(call) } get("/caches/{id}.json") { cachesController.exportKeys(call) } + static("/static") { resources("/org/openrs2/archive/static") } } }.start(wait = true) } diff --git a/archive/src/main/resources/org/openrs2/archive/static/css/openrs2.css b/archive/src/main/resources/org/openrs2/archive/static/css/openrs2.css new file mode 100644 index 00000000..ddc3a1f9 --- /dev/null +++ b/archive/src/main/resources/org/openrs2/archive/static/css/openrs2.css @@ -0,0 +1,3 @@ +html { + overflow-y: scroll; +} diff --git a/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html b/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html index 90870f6a..bfd6d965 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/caches/index.html @@ -3,6 +3,7 @@ Caches - OpenRS2 Archive + diff --git a/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html b/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html index 74642fe4..89f935c5 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/caches/show.html @@ -3,6 +3,7 @@ Cache - OpenRS2 Archive + diff --git a/archive/src/main/resources/org/openrs2/archive/templates/index.html b/archive/src/main/resources/org/openrs2/archive/templates/index.html index 1cb17f55..6522a96d 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/index.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/index.html @@ -3,6 +3,7 @@ OpenRS2 Archive + diff --git a/archive/src/main/resources/org/openrs2/archive/templates/layout.html b/archive/src/main/resources/org/openrs2/archive/templates/layout.html index ef3b1cad..7c233da5 100644 --- a/archive/src/main/resources/org/openrs2/archive/templates/layout.html +++ b/archive/src/main/resources/org/openrs2/archive/templates/layout.html @@ -4,6 +4,7 @@ OpenRS2 Archive +