create-easel-theme 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/cli.js +8 -5
- package/dist/templates/js/base/config/settings_schema.json +1 -1
- package/dist/templates/js/base/layout/password.liquid +19 -0
- package/dist/templates/js/base/locales/en.default.json +53 -0
- package/dist/templates/js/base/locales/en.default.schema.json +30 -0
- package/dist/templates/js/base/sections/contact-form.liquid +23 -0
- package/dist/templates/js/base/sections/main-article.liquid +15 -0
- package/dist/templates/js/base/sections/main-blog.liquid +28 -0
- package/dist/templates/js/base/sections/main-cart.liquid +31 -0
- package/dist/templates/js/base/sections/main-collection.liquid +25 -0
- package/dist/templates/js/base/sections/main-list-collections.liquid +27 -0
- package/dist/templates/js/base/sections/main-page.liquid +11 -0
- package/dist/templates/js/base/sections/main-password.liquid +17 -0
- package/dist/templates/js/base/sections/main-product.liquid +25 -0
- package/dist/templates/js/base/sections/main-search.liquid +28 -0
- package/dist/templates/js/base/snippets/product-card.liquid +15 -0
- package/dist/templates/js/base/src/style.css +74 -1
- package/dist/templates/js/base/templates/article.json +8 -0
- package/dist/templates/js/base/templates/blog.json +8 -0
- package/dist/templates/js/base/templates/cart.json +8 -0
- package/dist/templates/js/base/templates/collection.json +8 -0
- package/dist/templates/js/base/templates/gift_card.liquid +35 -0
- package/dist/templates/js/base/templates/list-collections.json +8 -0
- package/dist/templates/js/base/templates/page.contact.json +11 -0
- package/dist/templates/js/base/templates/page.json +8 -0
- package/dist/templates/js/base/templates/password.json +9 -0
- package/dist/templates/js/base/templates/product.json +8 -0
- package/dist/templates/js/base/templates/search.json +8 -0
- package/dist/templates/ts/base/config/settings_schema.json +1 -1
- package/dist/templates/ts/base/layout/password.liquid +19 -0
- package/dist/templates/ts/base/locales/en.default.json +53 -0
- package/dist/templates/ts/base/locales/en.default.schema.json +30 -0
- package/dist/templates/ts/base/sections/contact-form.liquid +23 -0
- package/dist/templates/ts/base/sections/main-article.liquid +15 -0
- package/dist/templates/ts/base/sections/main-blog.liquid +28 -0
- package/dist/templates/ts/base/sections/main-cart.liquid +31 -0
- package/dist/templates/ts/base/sections/main-collection.liquid +25 -0
- package/dist/templates/ts/base/sections/main-list-collections.liquid +27 -0
- package/dist/templates/ts/base/sections/main-page.liquid +11 -0
- package/dist/templates/ts/base/sections/main-password.liquid +17 -0
- package/dist/templates/ts/base/sections/main-product.liquid +25 -0
- package/dist/templates/ts/base/sections/main-search.liquid +28 -0
- package/dist/templates/ts/base/snippets/product-card.liquid +15 -0
- package/dist/templates/ts/base/src/style.css +74 -1
- package/dist/templates/ts/base/templates/article.json +8 -0
- package/dist/templates/ts/base/templates/blog.json +8 -0
- package/dist/templates/ts/base/templates/cart.json +8 -0
- package/dist/templates/ts/base/templates/collection.json +8 -0
- package/dist/templates/ts/base/templates/gift_card.liquid +35 -0
- package/dist/templates/ts/base/templates/list-collections.json +8 -0
- package/dist/templates/ts/base/templates/page.contact.json +11 -0
- package/dist/templates/ts/base/templates/page.json +8 -0
- package/dist/templates/ts/base/templates/password.json +9 -0
- package/dist/templates/ts/base/templates/product.json +8 -0
- package/dist/templates/ts/base/templates/search.json +8 -0
- package/package.json +22 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
"name": "theme_info",
|
|
4
4
|
"theme_name": "__THEME_NAME__",
|
|
5
|
-
"theme_version": "0.1
|
|
5
|
+
"theme_version": "0.2.1",
|
|
6
6
|
"theme_author": "Billy Noyes",
|
|
7
7
|
"theme_documentation_url": "https://github.com/BillyNoyes/Easel",
|
|
8
8
|
"theme_support_url": "https://github.com/BillyNoyes/Easel/issues"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="{{ request.locale.iso_code }}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<link rel="canonical" href="{{ canonical_url | escape }}">
|
|
7
|
+
<link rel="icon" type="image/svg+xml" href="{{ 'easel.svg' | asset_url }}">
|
|
8
|
+
<title>{{ shop.name | escape }}</title>
|
|
9
|
+
<style>
|
|
10
|
+
:root { --theme-background: {{ settings.background }}; --theme-foreground: {{ settings.foreground }}; }
|
|
11
|
+
</style>
|
|
12
|
+
{% render 'easel-assets' %}
|
|
13
|
+
{{ content_for_header }}
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<a class="skip-link" href="#MainContent">{{ 'accessibility.skip_to_content' | t }}</a>
|
|
17
|
+
<main id="MainContent" tabindex="-1">{{ content_for_layout }}</main>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
"accessibility": {
|
|
3
3
|
"skip_to_content": "Skip to content"
|
|
4
4
|
},
|
|
5
|
+
"article": {
|
|
6
|
+
"back_to_blog": "Back to {{ blog }}"
|
|
7
|
+
},
|
|
8
|
+
"blog": {
|
|
9
|
+
"empty": "No articles found."
|
|
10
|
+
},
|
|
11
|
+
"cart": {
|
|
12
|
+
"title": "Cart",
|
|
13
|
+
"empty": "Your cart is empty.",
|
|
14
|
+
"continue_shopping": "Continue shopping",
|
|
15
|
+
"quantity": "Quantity",
|
|
16
|
+
"subtotal": "Subtotal",
|
|
17
|
+
"update": "Update cart",
|
|
18
|
+
"checkout": "Checkout"
|
|
19
|
+
},
|
|
20
|
+
"collection": {
|
|
21
|
+
"empty": "No products found."
|
|
22
|
+
},
|
|
23
|
+
"collections": {
|
|
24
|
+
"title": "Collections",
|
|
25
|
+
"empty": "No collections found."
|
|
26
|
+
},
|
|
27
|
+
"contact": {
|
|
28
|
+
"title": "Contact us",
|
|
29
|
+
"success": "Thanks for contacting us. We'll get back to you soon.",
|
|
30
|
+
"name": "Name",
|
|
31
|
+
"email": "Email",
|
|
32
|
+
"phone": "Phone number",
|
|
33
|
+
"message": "Message",
|
|
34
|
+
"send": "Send"
|
|
35
|
+
},
|
|
5
36
|
"general": {
|
|
6
37
|
"not_found": "Page not found",
|
|
7
38
|
"return_home": "Return home",
|
|
@@ -9,5 +40,27 @@
|
|
|
9
40
|
"decrease": "Decrease count",
|
|
10
41
|
"increase": "Increase count"
|
|
11
42
|
}
|
|
43
|
+
},
|
|
44
|
+
"gift_card": {
|
|
45
|
+
"disabled": "This gift card is disabled.",
|
|
46
|
+
"expired": "This gift card has expired.",
|
|
47
|
+
"expires_on": "Expires {{ date }}.",
|
|
48
|
+
"code": "Gift card code",
|
|
49
|
+
"continue_shopping": "Continue shopping"
|
|
50
|
+
},
|
|
51
|
+
"password": {
|
|
52
|
+
"password": "Store password",
|
|
53
|
+
"enter": "Enter store"
|
|
54
|
+
},
|
|
55
|
+
"product": {
|
|
56
|
+
"add_to_cart": "Add to cart",
|
|
57
|
+
"sold_out": "Sold out"
|
|
58
|
+
},
|
|
59
|
+
"search": {
|
|
60
|
+
"title": "Search",
|
|
61
|
+
"label": "Search the store",
|
|
62
|
+
"submit": "Search",
|
|
63
|
+
"results": "{{ count }} results for “{{ terms }}”",
|
|
64
|
+
"empty": "No results found."
|
|
12
65
|
}
|
|
13
66
|
}
|
|
@@ -3,12 +3,42 @@
|
|
|
3
3
|
"not_found_name": "404 page"
|
|
4
4
|
},
|
|
5
5
|
"sections": {
|
|
6
|
+
"contact_form": {
|
|
7
|
+
"name": "Contact form"
|
|
8
|
+
},
|
|
6
9
|
"hero": {
|
|
7
10
|
"name": "Hero",
|
|
8
11
|
"heading": "Heading",
|
|
9
12
|
"default_heading": "__THEME_NAME__",
|
|
10
13
|
"text": "Text",
|
|
11
14
|
"default_text": "<p>Build the storefront experience here.</p>"
|
|
15
|
+
},
|
|
16
|
+
"main_article": {
|
|
17
|
+
"name": "Article"
|
|
18
|
+
},
|
|
19
|
+
"main_blog": {
|
|
20
|
+
"name": "Blog"
|
|
21
|
+
},
|
|
22
|
+
"main_cart": {
|
|
23
|
+
"name": "Cart"
|
|
24
|
+
},
|
|
25
|
+
"main_collection": {
|
|
26
|
+
"name": "Collection"
|
|
27
|
+
},
|
|
28
|
+
"main_list_collections": {
|
|
29
|
+
"name": "Collection list"
|
|
30
|
+
},
|
|
31
|
+
"main_page": {
|
|
32
|
+
"name": "Page"
|
|
33
|
+
},
|
|
34
|
+
"main_password": {
|
|
35
|
+
"name": "Password page"
|
|
36
|
+
},
|
|
37
|
+
"main_product": {
|
|
38
|
+
"name": "Product"
|
|
39
|
+
},
|
|
40
|
+
"main_search": {
|
|
41
|
+
"name": "Search"
|
|
12
42
|
}
|
|
13
43
|
},
|
|
14
44
|
"settings": {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<section class="page contact">
|
|
2
|
+
<h2>{{ 'contact.title' | t }}</h2>
|
|
3
|
+
{% form 'contact' %}
|
|
4
|
+
{% if form.posted_successfully? %}<p>{{ 'contact.success' | t }}</p>{% endif %}
|
|
5
|
+
{{ form.errors | default_errors }}
|
|
6
|
+
<label for="ContactName-{{ section.id }}">{{ 'contact.name' | t }}</label>
|
|
7
|
+
<input id="ContactName-{{ section.id }}" type="text" name="contact[name]" value="{{ form.name | escape }}" autocomplete="name">
|
|
8
|
+
<label for="ContactEmail-{{ section.id }}">{{ 'contact.email' | t }}</label>
|
|
9
|
+
<input id="ContactEmail-{{ section.id }}" type="email" name="contact[email]" value="{{ form.email | escape }}" autocomplete="email" required>
|
|
10
|
+
<label for="ContactPhone-{{ section.id }}">{{ 'contact.phone' | t }}</label>
|
|
11
|
+
<input id="ContactPhone-{{ section.id }}" type="tel" name="contact[phone]" value="{{ form.phone | escape }}" autocomplete="tel">
|
|
12
|
+
<label for="ContactMessage-{{ section.id }}">{{ 'contact.message' | t }}</label>
|
|
13
|
+
<textarea id="ContactMessage-{{ section.id }}" name="contact[body]" rows="8" required>{{ form.body | escape }}</textarea>
|
|
14
|
+
<button type="submit">{{ 'contact.send' | t }}</button>
|
|
15
|
+
{% endform %}
|
|
16
|
+
</section>
|
|
17
|
+
|
|
18
|
+
{% schema %}
|
|
19
|
+
{
|
|
20
|
+
"name": "t:sections.contact_form.name",
|
|
21
|
+
"settings": []
|
|
22
|
+
}
|
|
23
|
+
{% endschema %}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<article class="page article">
|
|
2
|
+
<a href="{{ blog.url }}">{{ 'article.back_to_blog' | t: blog: blog.title }}</a>
|
|
3
|
+
<header>
|
|
4
|
+
<h1>{{ article.title | escape }}</h1>
|
|
5
|
+
<p>{{ article.published_at | time_tag: format: 'date' }}</p>
|
|
6
|
+
</header>
|
|
7
|
+
<div class="rte">{{ article.content }}</div>
|
|
8
|
+
</article>
|
|
9
|
+
|
|
10
|
+
{% schema %}
|
|
11
|
+
{
|
|
12
|
+
"name": "t:sections.main_article.name",
|
|
13
|
+
"settings": []
|
|
14
|
+
}
|
|
15
|
+
{% endschema %}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<section class="page">
|
|
2
|
+
<h1>{{ blog.title | escape }}</h1>
|
|
3
|
+
{% paginate blog.articles by 12 %}
|
|
4
|
+
{% if blog.articles_count > 0 %}
|
|
5
|
+
<ul class="resource-list" role="list">
|
|
6
|
+
{% for article in blog.articles %}
|
|
7
|
+
<li>
|
|
8
|
+
<article class="card">
|
|
9
|
+
<h2><a href="{{ article.url }}">{{ article.title | escape }}</a></h2>
|
|
10
|
+
<p>{{ article.published_at | time_tag: format: 'date' }}</p>
|
|
11
|
+
{% if article.excerpt != blank %}<div class="rte">{{ article.excerpt }}</div>{% endif %}
|
|
12
|
+
</article>
|
|
13
|
+
</li>
|
|
14
|
+
{% endfor %}
|
|
15
|
+
</ul>
|
|
16
|
+
{{ paginate | default_pagination }}
|
|
17
|
+
{% else %}
|
|
18
|
+
<p>{{ 'blog.empty' | t }}</p>
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% endpaginate %}
|
|
21
|
+
</section>
|
|
22
|
+
|
|
23
|
+
{% schema %}
|
|
24
|
+
{
|
|
25
|
+
"name": "t:sections.main_blog.name",
|
|
26
|
+
"settings": []
|
|
27
|
+
}
|
|
28
|
+
{% endschema %}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<section class="page">
|
|
2
|
+
<h1>{{ 'cart.title' | t }}</h1>
|
|
3
|
+
{% if cart.item_count == 0 %}
|
|
4
|
+
<p>{{ 'cart.empty' | t }}</p>
|
|
5
|
+
<a href="{{ routes.all_products_collection_url }}">{{ 'cart.continue_shopping' | t }}</a>
|
|
6
|
+
{% else %}
|
|
7
|
+
{% form 'cart', cart %}
|
|
8
|
+
<ul class="cart-items" role="list">
|
|
9
|
+
{% for item in cart.items %}
|
|
10
|
+
<li class="cart-item">
|
|
11
|
+
<a href="{{ item.url }}">{{ item.product.title | escape }}</a>
|
|
12
|
+
{% unless item.product.has_only_default_variant %}<p>{{ item.variant.title | escape }}</p>{% endunless %}
|
|
13
|
+
<label for="CartQuantity-{{ forloop.index }}">{{ 'cart.quantity' | t }}</label>
|
|
14
|
+
<input id="CartQuantity-{{ forloop.index }}" type="number" name="updates[]" value="{{ item.quantity }}" min="0">
|
|
15
|
+
<p>{{ item.final_line_price | money }}</p>
|
|
16
|
+
</li>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
</ul>
|
|
19
|
+
<p>{{ 'cart.subtotal' | t }}: {{ cart.total_price | money }}</p>
|
|
20
|
+
<button type="submit" name="update">{{ 'cart.update' | t }}</button>
|
|
21
|
+
<button type="submit" name="checkout">{{ 'cart.checkout' | t }}</button>
|
|
22
|
+
{% endform %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
</section>
|
|
25
|
+
|
|
26
|
+
{% schema %}
|
|
27
|
+
{
|
|
28
|
+
"name": "t:sections.main_cart.name",
|
|
29
|
+
"settings": []
|
|
30
|
+
}
|
|
31
|
+
{% endschema %}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<section class="page">
|
|
2
|
+
<header>
|
|
3
|
+
<h1>{{ collection.title | escape }}</h1>
|
|
4
|
+
{% if collection.description != blank %}<div class="rte">{{ collection.description }}</div>{% endif %}
|
|
5
|
+
</header>
|
|
6
|
+
{% paginate collection.products by 24 %}
|
|
7
|
+
{% if collection.products_count > 0 %}
|
|
8
|
+
<div class="resource-grid">
|
|
9
|
+
{% for product in collection.products %}
|
|
10
|
+
{% render 'product-card', product: product %}
|
|
11
|
+
{% endfor %}
|
|
12
|
+
</div>
|
|
13
|
+
{{ paginate | default_pagination }}
|
|
14
|
+
{% else %}
|
|
15
|
+
<p>{{ 'collection.empty' | t }}</p>
|
|
16
|
+
{% endif %}
|
|
17
|
+
{% endpaginate %}
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
{% schema %}
|
|
21
|
+
{
|
|
22
|
+
"name": "t:sections.main_collection.name",
|
|
23
|
+
"settings": []
|
|
24
|
+
}
|
|
25
|
+
{% endschema %}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<section class="page">
|
|
2
|
+
<h1>{{ 'collections.title' | t }}</h1>
|
|
3
|
+
{% paginate collections by 24 %}
|
|
4
|
+
<div class="resource-grid">
|
|
5
|
+
{% for collection in collections %}
|
|
6
|
+
<article class="card">
|
|
7
|
+
<a href="{{ collection.url }}">
|
|
8
|
+
{% if collection.featured_image %}
|
|
9
|
+
{{ collection.featured_image | image_url: width: 720 | image_tag: loading: 'lazy', widths: '240, 360, 540, 720', sizes: '(min-width: 64rem) 20rem, 50vw', alt: collection.featured_image.alt | default: collection.title }}
|
|
10
|
+
{% endif %}
|
|
11
|
+
<h2>{{ collection.title | escape }}</h2>
|
|
12
|
+
</a>
|
|
13
|
+
</article>
|
|
14
|
+
{% else %}
|
|
15
|
+
<p>{{ 'collections.empty' | t }}</p>
|
|
16
|
+
{% endfor %}
|
|
17
|
+
</div>
|
|
18
|
+
{{ paginate | default_pagination }}
|
|
19
|
+
{% endpaginate %}
|
|
20
|
+
</section>
|
|
21
|
+
|
|
22
|
+
{% schema %}
|
|
23
|
+
{
|
|
24
|
+
"name": "t:sections.main_list_collections.name",
|
|
25
|
+
"settings": []
|
|
26
|
+
}
|
|
27
|
+
{% endschema %}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<section class="page password">
|
|
2
|
+
<h1>{{ shop.name | escape }}</h1>
|
|
3
|
+
{% if shop.password_message != blank %}<div class="rte">{{ shop.password_message }}</div>{% endif %}
|
|
4
|
+
{% form 'storefront_password' %}
|
|
5
|
+
{{ form.errors | default_errors }}
|
|
6
|
+
<label for="StorefrontPassword-{{ section.id }}">{{ 'password.password' | t }}</label>
|
|
7
|
+
<input id="StorefrontPassword-{{ section.id }}" type="password" name="password" autocomplete="current-password" required>
|
|
8
|
+
<button type="submit">{{ 'password.enter' | t }}</button>
|
|
9
|
+
{% endform %}
|
|
10
|
+
</section>
|
|
11
|
+
|
|
12
|
+
{% schema %}
|
|
13
|
+
{
|
|
14
|
+
"name": "t:sections.main_password.name",
|
|
15
|
+
"settings": []
|
|
16
|
+
}
|
|
17
|
+
{% endschema %}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<section class="page product">
|
|
2
|
+
<div class="product__media">
|
|
3
|
+
{% if product.featured_image %}
|
|
4
|
+
{{ product.featured_image | image_url: width: 1200 | image_tag: widths: '360, 540, 720, 960, 1200', sizes: '(min-width: 48rem) 50vw, 100vw', alt: product.featured_image.alt | default: product.title }}
|
|
5
|
+
{% endif %}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="product__details">
|
|
8
|
+
<h1>{{ product.title | escape }}</h1>
|
|
9
|
+
<p>{{ product.selected_or_first_available_variant.price | money }}</p>
|
|
10
|
+
{% if product.description != blank %}<div class="rte">{{ product.description }}</div>{% endif %}
|
|
11
|
+
{% form 'product', product %}
|
|
12
|
+
<input type="hidden" name="id" value="{{ product.selected_or_first_available_variant.id }}">
|
|
13
|
+
<button type="submit" name="add"{% unless product.selected_or_first_available_variant.available %} disabled{% endunless %}>
|
|
14
|
+
{% if product.selected_or_first_available_variant.available %}{{ 'product.add_to_cart' | t }}{% else %}{{ 'product.sold_out' | t }}{% endif %}
|
|
15
|
+
</button>
|
|
16
|
+
{% endform %}
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
{% schema %}
|
|
21
|
+
{
|
|
22
|
+
"name": "t:sections.main_product.name",
|
|
23
|
+
"settings": []
|
|
24
|
+
}
|
|
25
|
+
{% endschema %}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<section class="page">
|
|
2
|
+
<h1>{{ 'search.title' | t }}</h1>
|
|
3
|
+
<form action="{{ routes.search_url }}" method="get" role="search">
|
|
4
|
+
<label for="SearchInput-{{ section.id }}">{{ 'search.label' | t }}</label>
|
|
5
|
+
<input id="SearchInput-{{ section.id }}" type="search" name="q" value="{{ search.terms | escape }}">
|
|
6
|
+
<button type="submit">{{ 'search.submit' | t }}</button>
|
|
7
|
+
</form>
|
|
8
|
+
{% if search.performed %}
|
|
9
|
+
{% paginate search.results by 24 %}
|
|
10
|
+
<p>{{ 'search.results' | t: count: search.results_count, terms: search.terms }}</p>
|
|
11
|
+
<ul class="resource-list" role="list">
|
|
12
|
+
{% for item in search.results %}
|
|
13
|
+
<li><a href="{{ item.url }}">{{ item.title | escape }}</a></li>
|
|
14
|
+
{% else %}
|
|
15
|
+
<li>{{ 'search.empty' | t }}</li>
|
|
16
|
+
{% endfor %}
|
|
17
|
+
</ul>
|
|
18
|
+
{{ paginate | default_pagination }}
|
|
19
|
+
{% endpaginate %}
|
|
20
|
+
{% endif %}
|
|
21
|
+
</section>
|
|
22
|
+
|
|
23
|
+
{% schema %}
|
|
24
|
+
{
|
|
25
|
+
"name": "t:sections.main_search.name",
|
|
26
|
+
"settings": []
|
|
27
|
+
}
|
|
28
|
+
{% endschema %}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{% doc %}
|
|
2
|
+
Renders a product link with its featured image and price.
|
|
3
|
+
|
|
4
|
+
@param {product} product - The product to render.
|
|
5
|
+
{% enddoc %}
|
|
6
|
+
|
|
7
|
+
<article class="card">
|
|
8
|
+
<a href="{{ product.url }}">
|
|
9
|
+
{% if product.featured_image %}
|
|
10
|
+
{{ product.featured_image | image_url: width: 720 | image_tag: loading: 'lazy', widths: '240, 360, 540, 720', sizes: '(min-width: 64rem) 20rem, 50vw', alt: product.featured_image.alt | default: product.title }}
|
|
11
|
+
{% endif %}
|
|
12
|
+
<h2>{{ product.title | escape }}</h2>
|
|
13
|
+
</a>
|
|
14
|
+
<p>{{ product.price | money }}</p>
|
|
15
|
+
</article>
|
|
@@ -54,8 +54,81 @@ output {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.hero,
|
|
57
|
-
.not-found
|
|
57
|
+
.not-found,
|
|
58
|
+
.page {
|
|
58
59
|
margin-inline: auto;
|
|
59
60
|
max-width: 64rem;
|
|
60
61
|
padding: 4rem 1.5rem;
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
.page > :first-child,
|
|
65
|
+
.card > :first-child {
|
|
66
|
+
margin-block-start: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.page > :last-child,
|
|
70
|
+
.card > :last-child {
|
|
71
|
+
margin-block-end: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.resource-grid,
|
|
75
|
+
.resource-list,
|
|
76
|
+
.cart-items {
|
|
77
|
+
display: grid;
|
|
78
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
|
|
79
|
+
gap: 1.5rem;
|
|
80
|
+
padding: 0;
|
|
81
|
+
list-style: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.card img,
|
|
85
|
+
.product__media img {
|
|
86
|
+
display: block;
|
|
87
|
+
width: 100%;
|
|
88
|
+
height: auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.product {
|
|
92
|
+
display: grid;
|
|
93
|
+
gap: 2rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
form {
|
|
97
|
+
display: grid;
|
|
98
|
+
gap: 0.75rem;
|
|
99
|
+
max-width: 40rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
input:not([type='hidden']),
|
|
103
|
+
textarea {
|
|
104
|
+
width: 100%;
|
|
105
|
+
border: 1px solid currentColor;
|
|
106
|
+
background: transparent;
|
|
107
|
+
color: inherit;
|
|
108
|
+
font: inherit;
|
|
109
|
+
padding: 0.75rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.rte,
|
|
113
|
+
.rte img,
|
|
114
|
+
.rte iframe {
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.gift-card__balance {
|
|
119
|
+
font-size: 2rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.gift-card__code {
|
|
123
|
+
display: block;
|
|
124
|
+
width: fit-content;
|
|
125
|
+
margin-block: 1rem;
|
|
126
|
+
border: 1px solid currentColor;
|
|
127
|
+
padding: 0.75rem;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media (min-width: 48rem) {
|
|
131
|
+
.product {
|
|
132
|
+
grid-template-columns: 1fr 1fr;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{% layout none %}
|
|
2
|
+
|
|
3
|
+
<!doctype html>
|
|
4
|
+
<html lang="{{ request.locale.iso_code }}">
|
|
5
|
+
<head>
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
8
|
+
<link rel="canonical" href="{{ canonical_url | escape }}">
|
|
9
|
+
<link rel="icon" type="image/svg+xml" href="{{ 'easel.svg' | asset_url }}">
|
|
10
|
+
<title>{{ gift_card.product.title | default: shop.name | escape }}</title>
|
|
11
|
+
<style>
|
|
12
|
+
:root { --theme-background: {{ settings.background }}; --theme-foreground: {{ settings.foreground }}; }
|
|
13
|
+
</style>
|
|
14
|
+
{% render 'easel-assets' %}
|
|
15
|
+
{{ content_for_header }}
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<main class="page gift-card">
|
|
19
|
+
<h1>{{ gift_card.product.title | default: shop.name | escape }}</h1>
|
|
20
|
+
<p class="gift-card__balance">{{ gift_card.balance | money_with_currency }}</p>
|
|
21
|
+
{% unless gift_card.enabled %}
|
|
22
|
+
<p>{{ 'gift_card.disabled' | t }}</p>
|
|
23
|
+
{% endunless %}
|
|
24
|
+
{% if gift_card.expired %}
|
|
25
|
+
<p>{{ 'gift_card.expired' | t }}</p>
|
|
26
|
+
{% elsif gift_card.expires_on %}
|
|
27
|
+
{% assign expiration_date = gift_card.expires_on | date: format: 'date' %}
|
|
28
|
+
<p>{{ 'gift_card.expires_on' | t: date: expiration_date }}</p>
|
|
29
|
+
{% endif %}
|
|
30
|
+
<p>{{ 'gift_card.code' | t }}</p>
|
|
31
|
+
<code class="gift-card__code">{{ gift_card.code | format_code }}</code>
|
|
32
|
+
<a href="{{ shop.url }}">{{ 'gift_card.continue_shopping' | t }}</a>
|
|
33
|
+
</main>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|