package templates
import pscatalog "git.ma-al.com/goc_marek/ps_shop/internal/prestashop/catalog"
templ Layout(title string, cssPath string, jsPath string, menu []pscatalog.MenuItem, locale pscatalog.HeaderLocaleData, cartItems int64) {
{ title }
{ children... }
}
templ LocalePicker(title string, current pscatalog.LocaleOption, options []pscatalog.LocaleOption, navigable bool, showMeta bool) {
if current.Label != "" {
{ current.Label }
} else {
{ title }
}
if showMeta && current.Code != "" {
{ current.Code }
}
⌄
if len(options) > 0 {
}
}
templ MenuTree(items []pscatalog.MenuItem, depth int) {
}
templ MegaMenuBar(items []pscatalog.MenuItem) {
for _, item := range items {
- 0) }>
if len(item.Children) > 0 {
} else {
{ item.Name }
}
if len(item.Children) > 0 {
@MegaMenu(item.ID, item.URL, item.Name, item.Children)
}
}
}
templ MegaMenu(id int64, href string, label string, columns []pscatalog.MenuItem) {
}