From 04b591cd0be655f51284c69022c8854effaf9c7e Mon Sep 17 00:00:00 2001 From: bigbes Date: Thu, 6 Aug 2026 23:47:10 +0300 Subject: [PATCH] web: git.sr.ht-style dashboard and unified nav brand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopt the family look the dolt service already has. The nav brand becomes circle icon + site name + red service label (dropping the hub-origin variant), matching every other service on the instance. The logged-in index turns into the two-column dashboard: a sidebar with the service blurb and the jump form, and the repositories as shared-theme event-list cards — name, visibility as small muted text (non-public only, lowercase), description underneath. The big in-page h2 lives on only for anonymous visitors, where the nav has no user context yet. --- web/templates/index.html | 50 +++++++++++++++++++++++++++------------ web/templates/layout.html | 7 +----- web/web_test.go | 4 ++-- 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/web/templates/index.html b/web/templates/index.html index dff25a542542c395748bf7266a4179cc52eb4062..293464c7f8bf2bd19c22d9997418c5bd36d38b4e 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -1,28 +1,43 @@ {{define "content"}} +{{if .Data.LoggedIn}}
-
-

{{.SiteName}} compare

+

Compare two references — branches, tags or commits — of any git repository on this instance, and review the diff file by file.

+
+
+ + +
+
+ + +
+ +
-
- -{{if .Data.LoggedIn}} -
-
-

Your repositories

+
+
{{if .Data.Repos}} -
    +
    {{range .Data.Repos}} -
  • - ~{{$.Username}}/{{.Name}} - {{.Visibility}} - {{if .Description}} — {{.Description}}{{end}} -
  • +
    +

    + ~{{$.Username}}/{{.Name}} + {{if ne .Visibility "PUBLIC"}} + {{if eq .Visibility "UNLISTED"}}unlisted{{else}}private{{end}} + {{end}} +

    + {{if .Description}} +

    {{.Description}}

    + {{end}} +
    {{end}} -
+
{{else}}

You have no repositories yet.

{{end}} @@ -31,6 +46,11 @@ {{else}}
+

{{.SiteName}} compare

+

+ Compare two references — branches, tags or commits — of any git repository + on this instance, and review the diff file by file. +

Log in to list your own repositories, or jump directly to any repository below. diff --git a/web/templates/layout.html b/web/templates/layout.html index 78cd0b40b616e2bceb9ebeee5b73df0cfbfb1a85..1a53b79f089260a7e1cf993aaefbf716592dbb4c 100644 --- a/web/templates/layout.html +++ b/web/templates/layout.html @@ -43,18 +43,13 @@

{{end}}