appview/pages: move topbar and footer into fragments #533

merged
opened by oppi.li targeting master from push-mvmrzuxwmzvs
Changed files
+12 -24
appview
+2 -2
appview/pages/templates/layouts/base.html
···
<body class="min-h-screen grid grid-cols-1 grid-rows-[min-content_auto_min-content] md:grid-cols-12 gap-4 bg-slate-100 dark:bg-gray-900 dark:text-white transition-colors duration-200">
{{ block "topbarLayout" . }}
<header class="px-1 col-span-1 md:col-start-3 md:col-span-8" style="z-index: 20;">
-
{{ template "layouts/topbar" . }}
+
{{ template "layouts/fragments/topbar" . }}
</header>
{{ end }}
···
{{ block "footerLayout" . }}
<footer class="px-1 col-span-1 md:col-start-3 md:col-span-8 mt-12">
-
{{ template "layouts/footer" . }}
+
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
</body>
+1 -1
appview/pages/templates/layouts/footer.html appview/pages/templates/layouts/fragments/footer.html
···
-
{{ define "layouts/footer" }}
+
{{ define "layouts/fragments/footer" }}
<div class="w-full p-4 md:p-8 bg-white dark:bg-gray-800 rounded-t drop-shadow-sm">
<div class="container mx-auto max-w-7xl px-4">
<div class="flex flex-col lg:flex-row justify-between items-start text-gray-600 dark:text-gray-400 text-sm gap-8">
+1 -1
appview/pages/templates/layouts/topbar.html appview/pages/templates/layouts/fragments/topbar.html
···
-
{{ define "layouts/topbar" }}
+
{{ define "layouts/fragments/topbar" }}
<nav class="space-x-4 px-6 py-2 rounded bg-white dark:bg-gray-800 dark:text-white drop-shadow-sm">
<div class="flex justify-between p-0 items-center">
<div id="left-items">
+2 -2
appview/pages/templates/repo/commit.html
···
{{ define "topbarLayout" }}
<header class="px-1 col-span-full" style="z-index: 20;">
-
{{ template "layouts/topbar" . }}
+
{{ template "layouts/fragments/topbar" . }}
</header>
{{ end }}
···
{{ define "footerLayout" }}
<footer class="px-1 col-span-full mt-12">
-
{{ template "layouts/footer" . }}
+
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
+2 -2
appview/pages/templates/repo/compare/compare.html
···
{{ define "topbarLayout" }}
<header class="px-1 col-span-full" style="z-index: 20;">
-
{{ template "layouts/topbar" . }}
+
{{ template "layouts/fragments/topbar" . }}
</header>
{{ end }}
···
{{ define "footerLayout" }}
<footer class="px-1 col-span-full mt-12">
-
{{ template "layouts/footer" . }}
+
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
+2 -2
appview/pages/templates/repo/pulls/interdiff.html
···
{{ define "topbarLayout" }}
<header class="px-1 col-span-full" style="z-index: 20;">
-
{{ template "layouts/topbar" . }}
+
{{ template "layouts/fragments/topbar" . }}
</header>
{{ end }}
···
{{ define "footerLayout" }}
<footer class="px-1 col-span-full mt-12">
-
{{ template "layouts/footer" . }}
+
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
+2 -2
appview/pages/templates/repo/pulls/patch.html
···
{{ define "topbarLayout" }}
<header class="px-1 col-span-full" style="z-index: 20;">
-
{{ template "layouts/topbar" . }}
+
{{ template "layouts/fragments/topbar" . }}
</header>
{{ end }}
···
{{ define "footerLayout" }}
<footer class="px-1 col-span-full mt-12">
-
{{ template "layouts/footer" . }}
+
{{ template "layouts/fragments/footer" . }}
</footer>
{{ end }}
-4
appview/pages/templates/strings/put.html
···
{{ define "title" }}publish a new string{{ end }}
-
{{ define "topbar" }}
-
{{ template "layouts/topbar" $ }}
-
{{ end }}
-
{{ define "content" }}
<div class="px-6 py-2 mb-4">
{{ if eq .Action "new" }}
-4
appview/pages/templates/strings/string.html
···
<meta property="og:description" content="{{ .String.Description }}" />
{{ end }}
-
{{ define "topbar" }}
-
{{ template "layouts/topbar" $ }}
-
{{ end }}
-
{{ define "content" }}
{{ $ownerId := didOrHandle .Owner.DID.String .Owner.Handle.String }}
<section id="string-header" class="mb-4 py-2 px-6 dark:text-white">
-4
appview/pages/templates/strings/timeline.html
···
{{ define "title" }} all strings {{ end }}
-
{{ define "topbar" }}
-
{{ template "layouts/topbar" $ }}
-
{{ end }}
-
{{ define "content" }}
{{ block "timeline" $ }}{{ end }}
{{ end }}