From 50c5dc14a0e67a1e36a2b41c0b8d5d886b340341 Mon Sep 17 00:00:00 2001 From: pyxel Date: Wed, 26 May 2021 12:57:03 -0400 Subject: [PATCH] adapt code-view to window height --- gitsrht/templates/blame.html | 2 +- gitsrht/templates/blob.html | 2 +- scss/main.scss | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gitsrht/templates/blame.html b/gitsrht/templates/blame.html index 8f57d21..9c5046f 100644 --- a/gitsrht/templates/blame.html +++ b/gitsrht/templates/blame.html @@ -42,7 +42,7 @@ pre, body {
-
+
{# This row has some weird styles going on. This prevents the page from scrolling horizontally diff --git a/gitsrht/templates/blob.html b/gitsrht/templates/blob.html index 60e6215..4b3924a 100644 --- a/gitsrht/templates/blob.html +++ b/gitsrht/templates/blob.html @@ -65,7 +65,7 @@ pre, body { {% if markdown and not force_source %}
{% else %} -
+
{% endif %} {# This row has some weird styles going on. This prevents the page from diff --git a/scss/main.scss b/scss/main.scss index e97af7f..658a3f3 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -1,5 +1,11 @@ @import "base"; +body { + display: flex; + flex-direction: column; + min-height: 100vh; +} + .filter-repos { .btn { height: 1.9rem; @@ -182,6 +188,7 @@ dt { padding-left: calc(1rem + 4px); height: 100%; pointer-events: none; + overflow-x: hidden; pre { background: transparent; @@ -446,3 +453,10 @@ dl { } } } + +.code-viewport { + display: flex; + flex: 1 0 auto; + padding-left: 0; + padding-right: 0; +} -- 2.38.4