package templates
import "gitgud/internal/domain"
templ Explore(user *domain.User, repos []*domain.Repository) {
@Layout("Explore · gitgud", user) {
Public repositories
{ itoa(len(repos)) } public { plural(len(repos), "repository", "repositories") } on this instance.
if user != nil {
+ New repository
}
if len(repos) == 0 {
if user != nil {
@emptyState("No public repositories yet", "Create a public repository and it will show up here for everyone.", "/new", "Create repository")
} else {
@emptyState("No public repositories yet", "When someone creates a public repository, it will appear here.", "", "")
}
} else {
@repoList(repos)
}
}
}
templ repoList(repos []*domain.Repository) {