-
Notifications
You must be signed in to change notification settings - Fork 0
/
head-config.liquid
153 lines (136 loc) · 5.49 KB
/
head-config.liquid
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<meta charset='UTF-8'>
<meta
http-equiv='X-UA-Compatible'
content='IE=edge'
>
<meta
name='viewport'
content='width=device-width, initial-scale=1.0'
>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family={{ settings.font_family }}:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap">
{%- style -%}
:root {
/* main */
--yc-font-family:
{{ settings.font_family }},
sans-serif;
--yc-inputs-shadow: 0 0 0 1px var(--yc-primary-color);
--yc-main-shadow: rgba(0, 0, 0, 0.04) 0 0 0 1px, rgba(0, 0, 0, 0.03) 0 1px 1px, rgba(0, 0, 0, 0.03) 0 2px 2px, rgba(0, 0, 0, 0.03) 0 4px 4px, rgba(0, 0, 0, 0.03) 0 8px 8px, rgba(0, 0, 0, 0.03) 0 16px 16px;
--yc-theme-direction: {{ settings.theme_direction }};
/* colors */
--yc-primary-color: {{ settings.primary_color.hex }};
--yc-success-color: {{ settings.success_color.hex }};
--yc-error-color: {{ settings.error_color.hex }};
--yc-warning-color: {{ settings.warning_color.hex }};
--yc-neutral-color: {{ settings.neutral_color.hex }};
--yc-neutral-light-color: {{ settings.neutral_light_color.hex }};
/* Borders */
--yc-main-border: 1px solid var(--yc-neutral-light-color);
/* Navbar */
--yc-nav-height: {{ settings.navbar_height }}px;
--yc-nav-background: {{ settings.navbar_background_color.hex }};
--yc-nav-links-color: {%- if settings.navbar_links_color -%}
{{ settings.navbar_links_color.hex }}
{%- else -%}
var(--yc-neutral-color){%- endif -%};
--yc-nav-links-font-weight: {{ settings.navbar_links_font_weight }};
--yc-nav-links-hover-transparency: {{ settings.navbar_links_hover_transparency }};
--yc-nav-font-family: {%- if settings.navbar_font_family -%}
{{ settings.navbar_font_family }}, sans-serif{%- else -%}
var(--yc-font-family){%- endif -%};
--yc-nav-font-size: {{ settings.navbar_font_size }}px;
/* Sliders */
/* -- Desktop */
--yc-slider-arrows-background: {{ settings.slider_mobile_arrows_background_color.hex }};
--yc-slider-arrows-size: {{ settings.slider_arrows_size }}px;
--yc-slider-arrows-content-size: {{ settings.slider_arrows_size }}px;
/* -- Mobile */
--yc-slider-mobile-arrows-background: {{ settings.slider_mobile_desktop_arrows_background_color.hex }};
--yc-slider-mobile-arrows-size: {{ settings.slider_mobile_arrows_size }}px;
--yc-slider-mobile-arrows-content-size: {{ settings.slider_mobile_arrows_content_size }}px;
/* Notification toast */
--yc-notification-toast-height: {{ settings.notification_toast_height }}px;
--yc-notification-toast-font-weight: {{ settings.notification_toast_font_weight }};
--yc-notification-toast-font-size: {{ settings.notification_toast_font_size }}px;
--yc-notification-toast-background-color: {{ settings.notification_toast_background_color.hex }};
--yc-notification-toast-text-color: {{ settings.notification_toast_text_color.hex }};
--yc-notification-toast-border-radius: {{ settings.notification_toast_border_radius }}px;
--yc-notification-toast-border-width: {{ settings.notification_toast_border_width }}px;
--yc-notification-toast-border-color: {{ settings.notification_toast_border_color.hex }};
{%- if settings.notification_toast_position == 'top-left' -%}
--yc-notification-toast-top: 0;
--yc-notification-toast-left: 0;
{%- endif -%}
{%- if settings.notification_toast_position == 'top-right' -%}
--yc-notification-toast-top: 0;
--yc-notification-toast-right: 0;
{%- endif -%}
{%- if settings.notification_toast_position == 'bottom-left' -%}
--yc-notification-toast-bottom: 0;
--yc-notification-toast-left: 0;
{%- endif -%}
{%- if settings.notification_toast_position == 'bottom-right' -%}
--yc-notification-toast-bottom: 0;
--yc-notification-toast-right: 0;
{%- endif -%}
}
{%- endstyle -%}
{%- if settings.favicon %}
<link
rel='shortcut icon'
href='{{ settings.favicon.src }}'
>
{% endif %}
{%- if settings.meta_description %}
<meta
name='description'
content='{{ settings.meta_description }}'
>
{% endif %}
{%- if settings.meta_keywords %}
<meta
name='keywords'
content='{{ settings.meta_keywords }}'
>
{% endif %}
{%- if settings.og_image %}
<meta
property='og:image'
content='{{ settings.og_image.src }}'
>
{% endif %}
<script
type='module'
src='https://unpkg.com/ionicons@latest/dist/ionicons/ionicons.esm.js'
></script>
{% javascript %}
const defaultAvatar = "{{ 'avatar.png' | asset_url }}";
const ratings = "{{ 'reviews.ratings' | t }}";
{% endjavascript %}
{{ 'main.css' | asset_url | stylesheet_tag }}
{{ 'utils.css' | asset_url | stylesheet_tag }}
{% assign store_title = store.title | default: store.name %}
<title>
{% if page %}
{{ store_title }} | {{ page.name }}
{% elsif product %}
{{ store_title }} | {{ product.name }}
{% elsif category %}
{{ store_title }} | {{ category.name }}
{% elsif template %}
{% case template.name %}
{% when 'index' %}
{{ store_title }}
{% when 'list-collections' %}
{{ store_title }} | {{ 'head_metadata.collections' | t }}
{% when 'cart' %}
{{ store_title }} | {{ 'head_metadata.cart' | t }}
{% when 'thankyou' %}
{{ store_title }} | {{ 'head_metadata.thankyou' | t }}
{% else %}
{{ store_title }} | {{ template.name }}
{% endcase %}
{% endif %}
</title>