-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added product grid and product card, updated rendering of error pages…
…, updated header overlay functionality
- Loading branch information
Sayat
committed
May 15, 2024
1 parent
28d6462
commit fb09994
Showing
9 changed files
with
96 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
{ | ||
"general": { | ||
"error": { | ||
"404": { | ||
"title": "Not found", | ||
"subtext_html": "The page you were looking for does not exist" | ||
"description": "The page you were looking for does not exist", | ||
"btn_text": "Return home" | ||
}, | ||
"no_products" : { | ||
"title": "No products available" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,16 @@ | ||
<!-- Getting store_url variable --> | ||
{% if section.settings.btn_url == blank %} | ||
{% assign store_url = routes.root_url %} | ||
{% else %} | ||
{% assign store_url = section.settings.btn_url %} | ||
{% endif %} | ||
|
||
<!-- SECTION 404 --> | ||
<section class="section-404"> | ||
<div class="img-container-404">{{ section.settings.render_icon }}</div> | ||
<h1 class="title-404 font-40 bold">{{ section.settings.title }}</h1> | ||
<p class="description-404">{{ section.settings.description }}</p> | ||
<div class="btn-container-404"> | ||
<a class="tmp-btn tmp-btn_main tmp-btn_404 bold" href="{{ store_url }}">{{ section.settings.btn_text }}</a> | ||
<!-- SECTION ERROR 404 --> | ||
<section class="section-error"> | ||
<div class="error-img-container"> | ||
{% render 'icon-error', size: '24rem' %} | ||
</div> | ||
<h1 class="error-title font-40 bold">{{ 'error.404.title' | t }}</h1> | ||
<p class="error-description">{{ 'error.404.description' | t }}</p> | ||
<div class="error-btn-container"> | ||
<a | ||
class="tmp-btn tmp-btn_main tmp-btn_error bold" | ||
href="{{ routes.root_url }}" | ||
> | ||
{{ 'error.404.btn_text' | t }} | ||
</a> | ||
</div> | ||
</section> | ||
|
||
<!-- SCHEMA --> | ||
{% schema %} | ||
{ | ||
"name": "404", | ||
"settings": [ | ||
{ | ||
"type": "text", | ||
"id": "title", | ||
"label": "Error title", | ||
"default": "Not found" | ||
}, | ||
{ | ||
"type": "text", | ||
"id": "description", | ||
"label": "Error description", | ||
"default": "The page you were looking for does not exist" | ||
}, | ||
{ | ||
"type": "text", | ||
"id": "btn_text", | ||
"label": "Button text content", | ||
"default": "Return home" | ||
}, | ||
{ | ||
"type": "url", | ||
"id": "btn_url", | ||
"label": "Button URL" | ||
}, | ||
{ | ||
"type": "liquid", | ||
"id": "render_icon", | ||
"label": "Icon", | ||
"default": "{% render 'icon-error', size: '24rem' %}" | ||
} | ||
] | ||
} | ||
{% endschema %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,22 @@ | ||
<!-- COLLECTION STYLES --> | ||
{{ 'collection.css' | asset_url | stylesheet_tag }} | ||
|
||
<section class="section-collection"> | ||
<div class="container"> | ||
{% paginate collection.products by 6 %} | ||
<ul class="product-list grid grid-3-col"> | ||
{% for product in collection.products %} | ||
<li class="product-item relative"> | ||
{% if product.images[1] %} | ||
<div class="product-img-container"> | ||
<img | ||
class="product-img" | ||
name="img-back" | ||
src="{{ product.images[1] | image_url }}" | ||
width="120" | ||
height="150" | ||
alt="Back side of a shirt" | ||
/> | ||
</div> | ||
<img | ||
class="product-img" | ||
name="img-front" | ||
src="{{ product.featured_image | image_url }}" | ||
width="120" | ||
height="150" | ||
alt="{{ product.featured_image.alt}}" | ||
/> | ||
{% endif %} | ||
<h3 class="product-name bold">{{ product.title }}</h3> | ||
<p class="product-price">{{ product.price | money }}</p> | ||
<a class="product-link" href="{{ product.url }}"></a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endpaginate %} | ||
</div> | ||
</section> | ||
<!-- VARIABLES --> | ||
{% assign products_size = collection.products | size %} | ||
|
||
{% if products_size > 0 %} | ||
<!-- SECTION COLLECTION --> | ||
<section class="section-collection"> | ||
<div class="container"> | ||
{% paginate collection.products by 6 %} | ||
<ul class="product-list grid grid-3-col"> | ||
{% for product in collection.products %} | ||
{% render 'product-card', product: product %} | ||
{% endfor %} | ||
</ul> | ||
{% endpaginate %} | ||
</div> | ||
</section> | ||
{% else %} | ||
{% render 'error-no-products' %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- SECTION ERROR NO PRODUCTS --> | ||
<div class="section-error"> | ||
<div class="error-img-container"> | ||
{% render 'icon-error', size: '24rem' %} | ||
</div> | ||
<h1 class="error-title font-40 bold">{{ 'error.no_products.title' | t }}</h1> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<li class="product-item relative"> | ||
{% if product.images[1] %} | ||
<div class="product-img-container"> | ||
<img | ||
class="product-img" | ||
name="img-back" | ||
src="{{ product.images[1] | image_url }}" | ||
width="120" | ||
height="150" | ||
alt="Back side of a shirt" | ||
/> | ||
</div> | ||
<img | ||
class="product-img" | ||
name="img-front" | ||
src="{{ product.featured_image | image_url }}" | ||
width="120" | ||
height="150" | ||
alt="{{ product.featured_image.alt}}" | ||
/> | ||
{% else %} | ||
{{ 'image' | placeholder_svg_tag }} | ||
{% endif %} | ||
<h3 class="product-name bold">{{ product.title }}</h3> | ||
<p class="product-price">{{ product.price | money }}</p> | ||
<a class="product-link" href="{{ product.url }}"></a> | ||
</li> |