From 12a8c093e27c5a95b281908f43982f49624f9959 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 18 Aug 2025 12:10:32 +0100 Subject: [PATCH] appview: style nits - remove redundant divs in base layout - allow scrolling changed-files listing - show more of the file in tree views - unify repo-index and repo-tree views Signed-off-by: oppiliappan --- appview/pages/templates/layouts/base.html | 12 ------------ appview/pages/templates/repo/commit.html | 2 +- appview/pages/templates/repo/compare/compare.html | 2 +- .../templates/repo/fragments/interdiffFiles.html | 2 +- appview/pages/templates/repo/index.html | 6 +++--- appview/pages/templates/repo/pulls/interdiff.html | 2 +- appview/pages/templates/repo/pulls/patch.html | 2 +- appview/pages/templates/repo/tree.html | 4 ++-- 8 files changed, 10 insertions(+), 22 deletions(-) diff --git a/appview/pages/templates/layouts/base.html b/appview/pages/templates/layouts/base.html index 02317607..19e96de5 100644 --- a/appview/pages/templates/layouts/base.html +++ b/appview/pages/templates/layouts/base.html @@ -24,27 +24,15 @@ {{ block "mainLayout" . }}
{{ block "contentLayout" . }} -
- {{ block "contentLeft" . }} {{ end }} -
{{ block "content" . }}{{ end }}
-
- {{ block "contentRight" . }} {{ end }} -
{{ end }} {{ block "contentAfterLayout" . }} -
- {{ block "contentAfterLeft" . }} {{ end }} -
{{ block "contentAfter" . }}{{ end }}
-
- {{ block "contentAfterRight" . }} {{ end }} -
{{ end }}
{{ end }} diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index c3a67f8b..6ca19e5f 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -118,7 +118,7 @@
{{ template "repo/fragments/diffOpts" .DiffOpts }}
-
+
{{ template "repo/fragments/diffChangedFiles" .Diff }}
{{end}} diff --git a/appview/pages/templates/repo/compare/compare.html b/appview/pages/templates/repo/compare/compare.html index 384e0f52..70acec06 100644 --- a/appview/pages/templates/repo/compare/compare.html +++ b/appview/pages/templates/repo/compare/compare.html @@ -49,7 +49,7 @@
{{ template "repo/fragments/diffOpts" .DiffOpts }}
-
+
{{ template "repo/fragments/diffChangedFiles" .Diff }}
{{end}} diff --git a/appview/pages/templates/repo/fragments/interdiffFiles.html b/appview/pages/templates/repo/fragments/interdiffFiles.html index 26d3d995..f10e5b6b 100644 --- a/appview/pages/templates/repo/fragments/interdiffFiles.html +++ b/appview/pages/templates/repo/fragments/interdiffFiles.html @@ -1,6 +1,6 @@ {{ define "repo/fragments/interdiffFiles" }} {{ $fileTree := fileTree .AffectedFiles }} -
+
files diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html index 6a3bfb56..9361f102 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -139,8 +139,8 @@ {{ $linkstyle := "no-underline hover:underline dark:text-white" }} {{ range .Files }} -
-
+
+
{{ $link := printf "/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) .Name }} {{ $icon := "folder" }} {{ $iconStyle := "size-4 fill-current" }} @@ -158,7 +158,7 @@
-
+
{{ with .LastCommit }} {{ template "repo/fragments/time" .When }} {{ end }} diff --git a/appview/pages/templates/repo/pulls/interdiff.html b/appview/pages/templates/repo/pulls/interdiff.html index 81da1b22..8f984122 100644 --- a/appview/pages/templates/repo/pulls/interdiff.html +++ b/appview/pages/templates/repo/pulls/interdiff.html @@ -68,7 +68,7 @@
{{ template "repo/fragments/diffOpts" .DiffOpts }}
-
+
{{ template "repo/fragments/interdiffFiles" .Interdiff }}
{{end}} diff --git a/appview/pages/templates/repo/pulls/patch.html b/appview/pages/templates/repo/pulls/patch.html index 3769c3af..eb390b06 100644 --- a/appview/pages/templates/repo/pulls/patch.html +++ b/appview/pages/templates/repo/pulls/patch.html @@ -73,7 +73,7 @@
{{ template "repo/fragments/diffOpts" .DiffOpts }}
-
+
{{ template "repo/fragments/diffChangedFiles" .Diff }}
{{end}} diff --git a/appview/pages/templates/repo/tree.html b/appview/pages/templates/repo/tree.html index 098a1358..75bd7e7c 100644 --- a/appview/pages/templates/repo/tree.html +++ b/appview/pages/templates/repo/tree.html @@ -54,7 +54,7 @@ {{ range .Files }}
-
+
{{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) $.TreePath .Name }} {{ $icon := "folder" }} {{ $iconStyle := "size-4 fill-current" }} @@ -77,7 +77,7 @@ {{ end }}
-
+
{{ with .LastCommit }} {{ template "repo/fragments/time" .When }} {{ end }} -- 2.51.2