-
Notifications
You must be signed in to change notification settings - Fork 404
Expand file tree
/
Copy pathheader.liquid
More file actions
77 lines (71 loc) · 1.58 KB
/
header.liquid
File metadata and controls
77 lines (71 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<header>
<h2 class="header__title">
{{ shop.name | link_to: routes.root_url }}
</h2>
<div class="header__menu">
{% for link in section.settings.menu.links %}
{{ link.title | link_to: link.url }}
{% endfor %}
</div>
<div class="header__icons">
{% if shop.customer_accounts_enabled %}
<shopify-account menu="{{ section.settings.customer_account_menu }}">
{{ 'icon-account.svg' | inline_asset_content }}
</shopify-account>
{% endif %}
<a href="{{ routes.cart_url }}">
{% if cart.item_count > 0 %}
<sup>{{ cart.item_count }}</sup>
{% endif %}
{{ 'icon-cart.svg' | inline_asset_content }}
</a>
</div>
</header>
{% stylesheet %}
header {
height: 5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
header a {
position: relative;
text-decoration: none;
color: var(--color-foreground);
display: flex;
align-items: center;
justify-content: center;
}
header a sup {
position: absolute;
left: 100%;
overflow: hidden;
max-width: var(--page-margin);
}
header svg {
width: 2rem;
}
header .header__menu,
header .header__icons {
display: flex;
gap: 1rem;
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.header",
"settings": [
{
"type": "link_list",
"id": "menu",
"label": "t:labels.menu"
},
{
"type": "link_list",
"id": "customer_account_menu",
"label": "t:labels.customer_account_menu",
"default": "customer-account-main-menu"
}
]
}
{% endschema %}