package components
import "go.alanpearce.eu/searchix/internal/nix"
templ OptionDetail(option nix.Option) {
{ option.Name }
@markdown(option.Description)
if option.Type != "" {
- Type
{ option.Type }
}
if option.Default != nil {
if option.Default.Text != "" || option.Default.Markdown != "" {
- Default
-
if option.Default.Markdown != "" {
@markdown(option.Default.Markdown)
} else {
{ option.Default.Text }
}
}
}
if option.Example != nil {
if option.Example.Text != "" || option.Example.Markdown != "" {
- Example
-
if option.Example.Markdown != "" {
@markdown(option.Example.Markdown)
} else {
{ option.Example.Text }
}
}
}
if option.RelatedPackages != "" {
- Related Packages
-
@markdown(option.RelatedPackages)
}
if len(option.Declarations) > 0 {
- Declared
for _, d := range option.Declarations {
-
{ d.Name }
}
}
}
templ OptionDetailPage(tdata TemplateData, option nix.Option) {
@Page(tdata) {
@OptionDetail(option)
}
}