forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

appview/pages: do not specialize layouts in diff views

we don't need this anymore, the topbar and footer layouts are stable

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 81496719 e810bd10

verified
Changed files
+9 -34
appview
pages
templates
+2 -2
appview/pages/templates/layouts/base.html
···
</head>
<body class="min-h-screen flex flex-col gap-4 bg-slate-100 dark:bg-gray-900 dark:text-white transition-colors duration-200">
{{ block "topbarLayout" . }}
-
<header class="w-full bg-white dark:bg-gray-800 col-span-full md:col-span-1 md:col-start-2" style="z-index: 20;">
+
<header class="w-full col-span-full md:col-span-1 md:col-start-2" style="z-index: 20;">
{{ if .LoggedInUser }}
<div id="upgrade-banner"
···
{{ end }}
{{ block "footerLayout" . }}
-
<footer class="bg-white dark:bg-gray-800 mt-12">
+
<footer class="mt-12">
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
+1 -1
appview/pages/templates/layouts/fragments/footer.html
···
{{ define "layouts/fragments/footer" }}
-
<div class="w-full p-8">
+
<div class="w-full p-8 bg-white dark:bg-gray-800">
<div class="mx-auto px-4">
<div class="flex flex-col text-gray-600 dark:text-gray-400 gap-8">
<!-- Desktop layout: grid with 3 columns -->
+1 -1
appview/pages/templates/layouts/fragments/topbar.html
···
{{ define "layouts/fragments/topbar" }}
-
<nav class="mx-auto space-x-4 px-6 py-2 rounded-b dark:text-white drop-shadow-sm">
+
<nav class="mx-auto space-x-4 px-6 py-2 rounded-b dark:text-white drop-shadow-sm bg-white dark:bg-gray-800">
<div class="flex justify-between p-0 items-center">
<div id="left-items">
<a href="/" hx-boost="true" class="text-2xl no-underline hover:no-underline flex items-center gap-2">
+3 -3
appview/pages/templates/repo/commit.html
···
{{end}}
{{ define "topbarLayout" }}
-
<header class="px-1 col-span-full" style="z-index: 20;">
+
<header class="col-span-full" style="z-index: 20;">
{{ template "layouts/fragments/topbar" . }}
</header>
{{ end }}
{{ define "mainLayout" }}
-
<div class="px-1 col-span-full flex flex-col gap-4">
+
<div class="px-1 flex-grow col-span-full flex flex-col gap-4">
{{ block "contentLayout" . }}
{{ block "content" . }}{{ end }}
{{ end }}
···
{{ end }}
{{ define "footerLayout" }}
-
<footer class="px-1 col-span-full mt-12">
+
<footer class="col-span-full mt-12">
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
+1 -14
appview/pages/templates/repo/pulls/interdiff.html
···
{{ end }}
-
{{ define "topbarLayout" }}
-
<header class="px-1 col-span-full" style="z-index: 20;">
-
{{ template "layouts/fragments/topbar" . }}
-
</header>
-
{{ end }}
-
{{ define "mainLayout" }}
-
<div class="px-1 col-span-full flex flex-col gap-4">
+
<div class="px-1 col-span-full flex-grow flex flex-col gap-4">
{{ block "contentLayout" . }}
{{ block "content" . }}{{ end }}
{{ end }}
···
{{ end }}
</div>
{{ end }}
-
-
{{ define "footerLayout" }}
-
<footer class="px-1 col-span-full mt-12">
-
{{ template "layouts/fragments/footer" . }}
-
</footer>
-
{{ end }}
-
{{ define "contentAfter" }}
{{ template "repo/fragments/interdiff" (list .RepoInfo.FullName .Interdiff .DiffOpts) }}
+1 -13
appview/pages/templates/repo/pulls/patch.html
···
</section>
{{ end }}
-
{{ define "topbarLayout" }}
-
<header class="px-1 col-span-full" style="z-index: 20;">
-
{{ template "layouts/fragments/topbar" . }}
-
</header>
-
{{ end }}
-
{{ define "mainLayout" }}
-
<div class="px-1 col-span-full flex flex-col gap-4">
+
<div class="px-1 col-span-full flex-grow flex flex-col gap-4">
{{ block "contentLayout" . }}
{{ block "content" . }}{{ end }}
{{ end }}
···
</div>
{{ end }}
</div>
-
{{ end }}
-
-
{{ define "footerLayout" }}
-
<footer class="px-1 col-span-full mt-12">
-
{{ template "layouts/fragments/footer" . }}
-
</footer>
{{ end }}
{{ define "contentAfter" }}