From a61eae9cb947fa8b7b89a2c26266d129855c71de Mon Sep 17 00:00:00 2001 From: nelind Date: Thu, 24 Jul 2025 18:40:11 +0200 Subject: [PATCH] appview: pages: refactor base layout to be one big grid so we can avoid min-h-screen workarounds that cause permanent scrolling Change-Id: sttryvoqzmuzwomukksxrlwuywpplomn Signed-off-by: nelind --- appview/pages/templates/layouts/base.html | 49 +++++++------------ appview/pages/templates/repo/commit.html | 32 +++++++----- .../pages/templates/repo/compare/compare.html | 34 ++++++++----- .../pages/templates/repo/pulls/interdiff.html | 34 ++++++++----- appview/pages/templates/repo/pulls/patch.html | 34 ++++++++----- 5 files changed, 101 insertions(+), 82 deletions(-) diff --git a/appview/pages/templates/layouts/base.html b/appview/pages/templates/layouts/base.html index be4760d..3aff0ef 100644 --- a/appview/pages/templates/layouts/base.html +++ b/appview/pages/templates/layouts/base.html @@ -14,20 +14,16 @@ {{ block "title" . }}{{ end }} ยท tangled {{ block "extrameta" . }}{{ end }} - -
- {{ block "topbarLayout" . }} -
-
- {{ template "layouts/topbar" . }} -
-
- {{ end }} -
+ + {{ block "topbarLayout" . }} +
+ {{ template "layouts/topbar" . }} +
+ {{ end }} -
- {{ block "contentLayout" . }} -
+ {{ block "mainLayout" . }} +
+ {{ block "contentLayout" . }}
{{ block "contentLeft" . }} {{ end }}
@@ -37,11 +33,9 @@
{{ block "contentRight" . }} {{ end }}
-
- {{ end }} - - {{ block "contentAfterLayout" . }} -
+ {{ end }} + + {{ block "contentAfterLayout" . }}
{{ block "contentAfterLeft" . }} {{ end }}
@@ -51,20 +45,15 @@
{{ block "contentAfterRight" . }} {{ end }}
-
- {{ end }} -
- -
- {{ block "footerLayout" . }} -
-
- {{ template "layouts/footer" . }} -
+ {{ end }}
- {{ end }} -
+ {{ end }} + {{ block "footerLayout" . }} +
+ {{ template "layouts/footer" . }} +
+ {{ end }} {{ end }} diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index bbdb29f..b68d3b1 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -80,28 +80,34 @@ {{end}} {{ define "topbarLayout" }} -
+
{{ template "layouts/topbar" . }}
{{ end }} -{{ define "contentLayout" }} - {{ block "content" . }}{{ end }} -{{ end }} +{{ define "mainLayout" }} +
+ {{ block "contentLayout" . }} + {{ block "content" . }}{{ end }} + {{ end }} -{{ define "contentAfterLayout" }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} + {{ block "contentAfterLayout" . }} +
+
+ {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
+ {{ end }}
{{ end }} -{{ define "footerLayout" }} - {{ template "layouts/footer" . }} +{{ define "footerLayout" }} +
+ {{ template "layouts/footer" . }} +
{{ end }} {{ define "contentAfter" }} diff --git a/appview/pages/templates/repo/compare/compare.html b/appview/pages/templates/repo/compare/compare.html index 9c5eacb..5b35541 100644 --- a/appview/pages/templates/repo/compare/compare.html +++ b/appview/pages/templates/repo/compare/compare.html @@ -11,26 +11,34 @@ {{ end }} {{ define "topbarLayout" }} - {{ template "layouts/topbar" . }} +
+ {{ template "layouts/topbar" . }} +
{{ end }} -{{ define "contentLayout" }} - {{ block "content" . }}{{ end }} -{{ end }} +{{ define "mainLayout" }} +
+ {{ block "contentLayout" . }} + {{ block "content" . }}{{ end }} + {{ end }} -{{ define "contentAfterLayout" }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} + {{ block "contentAfterLayout" . }} +
+
+ {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
+ {{ end }}
{{ end }} -{{ define "footerLayout" }} - {{ template "layouts/footer" . }} +{{ define "footerLayout" }} +
+ {{ template "layouts/footer" . }} +
{{ end }} {{ define "contentAfter" }} diff --git a/appview/pages/templates/repo/pulls/interdiff.html b/appview/pages/templates/repo/pulls/interdiff.html index 22afd9f..5f8c544 100644 --- a/appview/pages/templates/repo/pulls/interdiff.html +++ b/appview/pages/templates/repo/pulls/interdiff.html @@ -29,26 +29,34 @@ {{ end }} {{ define "topbarLayout" }} - {{ template "layouts/topbar" . }} +
+ {{ template "layouts/topbar" . }} +
{{ end }} -{{ define "contentLayout" }} - {{ block "content" . }}{{ end }} -{{ end }} +{{ define "mainLayout" }} +
+ {{ block "contentLayout" . }} + {{ block "content" . }}{{ end }} + {{ end }} -{{ define "contentAfterLayout" }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} + {{ block "contentAfterLayout" . }} +
+
+ {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
+ {{ end }}
{{ end }} -{{ define "footerLayout" }} - {{ template "layouts/footer" . }} +{{ define "footerLayout" }} +
+ {{ template "layouts/footer" . }} +
{{ end }} diff --git a/appview/pages/templates/repo/pulls/patch.html b/appview/pages/templates/repo/pulls/patch.html index 677ffac..c193698 100644 --- a/appview/pages/templates/repo/pulls/patch.html +++ b/appview/pages/templates/repo/pulls/patch.html @@ -35,26 +35,34 @@ {{ end }} {{ define "topbarLayout" }} - {{ template "layouts/topbar" . }} +
+ {{ template "layouts/topbar" . }} +
{{ end }} -{{ define "contentLayout" }} - {{ block "content" . }}{{ end }} -{{ end }} +{{ define "mainLayout" }} +
+ {{ block "contentLayout" . }} + {{ block "content" . }}{{ end }} + {{ end }} -{{ define "contentAfterLayout" }} -
-
- {{ block "contentAfterLeft" . }} {{ end }} + {{ block "contentAfterLayout" . }} +
+
+ {{ block "contentAfterLeft" . }} {{ end }} +
+
+ {{ block "contentAfter" . }}{{ end }} +
-
- {{ block "contentAfter" . }}{{ end }} -
+ {{ end }}
{{ end }} -{{ define "footerLayout" }} - {{ template "layouts/footer" . }} +{{ define "footerLayout" }} + {{ end }} {{ define "contentAfter" }} -- 2.50.0