summaryrefslogtreecommitdiff
path: root/templates/layout
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anata@darapsa.co.id>2021-07-05 19:05:47 +0700
committerAnatasof Wirapraja <anata@darapsa.co.id>2021-07-05 19:05:47 +0700
commit46189d68509638ec45b1624ccc6be60943d5231e (patch)
tree0aabe984109d8afa3617db9cd22d71c720f9fd8e /templates/layout
parent7e9971c2aa2a6623ee4bf2cb37a19f9ab543d7b9 (diff)
trying to put badge inside the cart icon
Diffstat (limited to 'templates/layout')
-rw-r--r--templates/layout/noleft24
1 files changed, 12 insertions, 12 deletions
diff --git a/templates/layout/noleft b/templates/layout/noleft
index 332e907..0814bcc 100644
--- a/templates/layout/noleft
+++ b/templates/layout/noleft
@@ -43,19 +43,19 @@
<a class="navbar-icon-link" href="[area ord/basket]">
<span class="material-icons-outlined">
shopping_bag
+ [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]
</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>