almost all ready

This commit is contained in:
2026-05-14 01:48:15 +02:00
parent 1b53c1c199
commit 2e1bec0e8b
29 changed files with 5442 additions and 642 deletions
+7 -2
View File
@@ -2,7 +2,7 @@ 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) {
templ Layout(title string, cssPath string, jsPath string, menu []pscatalog.MenuItem, locale pscatalog.HeaderLocaleData, cartItems int64) {
<!doctype html>
<html lang={ pageLanguage(locale) }>
<head>
@@ -57,7 +57,12 @@ templ Layout(title string, cssPath string, jsPath string, menu []pscatalog.MenuI
}
<div class="header-actions">
<a class="nav-icon" href="#" aria-label="Search">⌕</a>
<a class="nav-icon" href="#" aria-label="Cart">🛒</a>
<a class="nav-icon relative" href={ localizedCartPath(locale) } aria-label="Cart">
🛒
if cartItems > 0 {
<span class="absolute -right-2 -top-2 inline-flex min-h-5 min-w-5 items-center justify-center rounded-full bg-amber-300 px-1.5 text-[0.65rem] font-semibold leading-none text-stone-950">{ cartItems }</span>
}
</a>
</div>
</div>
</div>