From 2d7d2fd5ca738092790efa9f6f38e2d61460f12d Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Fri, 16 Jan 2026 14:36:11 -0600 Subject: [PATCH] update search results page --- .tangled/workflows/lint.yaml | 1 + .tangled/workflows/tests.yml | 1 + .../templates/components/card-grid.html | 51 +++++++++++++++++++ pkg/appview/templates/pages/home.html | 6 +-- pkg/appview/templates/pages/privacy.html | 8 +-- pkg/appview/templates/pages/user.html | 10 +--- .../templates/partials/search-results.html | 38 ++++---------- pkg/appview/ui.go | 2 +- 8 files changed, 71 insertions(+), 46 deletions(-) create mode 100644 pkg/appview/templates/components/card-grid.html diff --git a/.tangled/workflows/lint.yaml b/.tangled/workflows/lint.yaml index ae512e2..24af4c9 100644 --- a/.tangled/workflows/lint.yaml +++ b/.tangled/workflows/lint.yaml @@ -15,6 +15,7 @@ steps: command: | go mod download go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.2 + go generate ./... - name: Run Linter environment: diff --git a/.tangled/workflows/tests.yml b/.tangled/workflows/tests.yml index 45c30e4..a17423f 100644 --- a/.tangled/workflows/tests.yml +++ b/.tangled/workflows/tests.yml @@ -14,6 +14,7 @@ steps: CGO_ENABLED: 1 command: | go mod download + go generate ./... - name: Run Tests environment: diff --git a/pkg/appview/templates/components/card-grid.html b/pkg/appview/templates/components/card-grid.html new file mode 100644 index 0000000..af59aff --- /dev/null +++ b/pkg/appview/templates/components/card-grid.html @@ -0,0 +1,51 @@ +{{ define "card-grid" }} +{{/* + Card grid component - displays repository cards in a responsive grid + + Required: + - .Repositories: []db.RepoCardData - list of repositories to display + + Optional: + - .Columns: int - number of columns on xl screens (3 or 4, default 3) + - .EmptyMessage: string - message when no repositories (default: "No repositories found.") + - .EmptyIcon: string - lucide icon name for empty state + - .EmptySubtext: string - secondary text for empty state + - .LoadMoreURL: string - URL for Load More button (HTMX) + - .TargetID: string - HTMX target ID for Load More + - .HasMore: bool - whether to show Load More button +*/}} +{{ if .Repositories }} +
+ {{ range .Repositories }} + {{ template "repo-card" . }} + {{ end }} +
+{{ if and .HasMore .LoadMoreURL }} +
+ +
+{{ end }} +{{ else }} +
+ {{ if .EmptyIcon }} +
+ +

{{ or .EmptyMessage "No repositories found." }}

+
+ {{ if .EmptySubtext }} +

{{ .EmptySubtext }}

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

{{ or .EmptyMessage "No repositories found." }}

+ {{ end }} +
+{{ end }} +{{ end }} diff --git a/pkg/appview/templates/pages/home.html b/pkg/appview/templates/pages/home.html index 2517036..0cc668a 100644 --- a/pkg/appview/templates/pages/home.html +++ b/pkg/appview/templates/pages/home.html @@ -56,11 +56,7 @@ {{ if .RecentRepos }}

What's New

-
- {{ range .RecentRepos }} - {{ template "repo-card" . }} - {{ end }} -
+ {{ template "card-grid" (dict "Repositories" .RecentRepos) }}
{{ end }} diff --git a/pkg/appview/templates/pages/privacy.html b/pkg/appview/templates/pages/privacy.html index ce19fba..c4316f4 100644 --- a/pkg/appview/templates/pages/privacy.html +++ b/pkg/appview/templates/pages/privacy.html @@ -89,14 +89,14 @@

If you are located in the European Economic Area (EEA), you have the following rights:

Right to Access

-

You may request a copy of all personal data we store about you. This includes:

+

You may export a copy of all personal data we store about you via the "Export Data" button in your account settings. This export includes:

+

For data not included in the self-service export (such as server logs), contact us and we will respond within 30 days.

Note: Data stored on your own PDS is already under your control and accessible to you directly.

Right to Erasure ("Right to be Forgotten")

@@ -156,12 +156,13 @@

If you are a California resident, you have the following rights under the California Consumer Privacy Act:

Right to Know

-

You may request disclosure of:

+

You may export a copy of your personal data via the "Export Data" button in your account settings. You may also request disclosure of:

+

For data not included in the self-service export (such as server logs), contact us and we will respond within 30 days.

Right to Delete

You may delete your personal information via the account settings page, subject to the same technical limitations described in the GDPR section above. For data not accessible through self-service, we will respond to requests within 45 days, except where retention is necessary for:

@@ -305,6 +306,7 @@

Self-Service (via Settings)

Most data management can be done directly through your account settings at {{ .RegistryURL }}: