{{ 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 }}
{{ icon .EmptyIcon "size-12 mx-auto mb-4" }}

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

{{ if .EmptySubtext }}

{{ .EmptySubtext }}

{{ end }} {{ else }}

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

{{ end }}
{{ end }} {{ end }}