almost all ready
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user