package components import ( "go.alanpearce.eu/searchix/internal/nix" ) func licenseName(l nix.License) string { if l.FullName != "" { return l.FullName } else { return l.Name } } templ PackageDetail(pkg nix.Package) {

if pkg.Broken { { pkg.Attribute } } else { { pkg.Attribute } }

if pkg.LongDescription != "" { @markdown(pkg.LongDescription) } else {

{ pkg.Description }

}
if pkg.MainProgram != "" {
Main Program
{ pkg.MainProgram }
} if len(pkg.Homepages) > 0 {
Homepage
} if pkg.Version != "" {
Version
{ pkg.Version }
} if len(pkg.Licenses) > 0 {
License
} if len(pkg.Maintainers) > 0 {
Maintainers
} if pkg.Definition != "" {
Defined
Source
}
} templ PackageDetailPage(tdata TemplateData, pkg nix.Package) { @Page(tdata) { @PackageDetail(pkg) } }