diff options
author | Anatasof Wirapraja <anata@darapsa.co.id> | 2021-07-05 19:01:40 +0700 |
---|---|---|
committer | Anatasof Wirapraja <anata@darapsa.co.id> | 2021-07-05 19:01:40 +0700 |
commit | 7e9971c2aa2a6623ee4bf2cb37a19f9ab543d7b9 (patch) | |
tree | 127ed91c7bc36ddad71e8cab0b19b65c15bc1d78 /templates/layout/noleft | |
parent | 1a2bed0c1200998b6557ae6e8cb64b1d51995f83 (diff) |
add badge counter on cart
Diffstat (limited to 'templates/layout/noleft')
-rw-r--r-- | templates/layout/noleft | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/layout/noleft b/templates/layout/noleft index ca01d60..332e907 100644 --- a/templates/layout/noleft +++ b/templates/layout/noleft @@ -44,6 +44,18 @@ <span class="material-icons-outlined"> shopping_bag </span> + [calc] + if ([nitems] ne '0') { + return q( + <div> + <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger"> + [nitems] + </span> + <span class="visually-hidden">items in cart</span> + </span> + </div>); + } + [/calc] </a> </div> </div> |