Skip to content

Commit

Permalink
Merge branch 'trade' into feature/SHOPBASE-16
Browse files Browse the repository at this point in the history
  • Loading branch information
ChelseyRiewerTrellis authored Aug 8, 2024
2 parents 931a6a5 + ee75f0f commit 3d3cd21
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 3 deletions.
21 changes: 21 additions & 0 deletions assets/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,23 @@ video {
--tw-contain-style: ;
}

.twcss-relative {
position: relative;
}

.twcss-z-0 {
z-index: 0;
}

.twcss-z-10 {
z-index: 10;
}

.twcss-my-8 {
margin-top: 2rem;
margin-bottom: 2rem;
}

.twcss-mb-8 {
margin-bottom: 2rem;
}
Expand Down Expand Up @@ -599,6 +616,10 @@ video {
line-height: 1.5rem;
}

.twcss-gap-3 {
gap: 0.75rem;
}

.twcss-capitalize {
text-transform: capitalize;
}
Expand Down
4 changes: 2 additions & 2 deletions layout/theme.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@
}
}
{% endstyle %}

{{ 'app.css' | asset_url | stylesheet_tag }}

{{ 'base.css' | asset_url | stylesheet_tag }}
{{ 'app.css' | asset_url | stylesheet_tag }}

<link rel='stylesheet' href='{{ 'component-cart-items.css' | asset_url }}' media='print' onload="this.media='all'">

Expand Down
2 changes: 2 additions & 0 deletions sections/collection-list.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
endif
-%}

{% render 'breadcrumb' %}

<div class="color-{{ section.settings.color_scheme }} gradient">
<div class="collection-list-wrapper page-width isolate{% if show_mobile_slider %} page-width-desktop{% endif %}{% if section.settings.title == blank %} no-heading{% endif %}{% if section.settings.show_view_all == false or section.blocks.size > collections.size %} no-mobile-link{% endif %} section-{{ section.id }}-padding">
{%- unless section.settings.title == blank -%}
Expand Down
4 changes: 4 additions & 0 deletions sections/header.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@
</script>
{%- endif -%}

{%- unless request.page_type == 'index' -%}
{%- render 'breadcrumb' -%}
{%- endunless -%}

{% schema %}

Check failure on line 459 in sections/header.liquid

View workflow job for this annotation

GitHub Actions / Theme Check Report

sections/header.liquid#L459

[ValidSchema] unexpected token at '{ in JSON
{
"name": "t:sections.header.name",
Expand Down
2 changes: 2 additions & 0 deletions sections/main-collection-product-grid.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
}
{%- endstyle -%}

{% render 'breadcrumb' %}

<div class="section-{{ section.id }}-padding gradient color-{{ section.settings.color_scheme }}">
{%- paginate collection.products by section.settings.products_per_page -%}
{% comment %} Sort is the first tabbable element when filter type is vertical {% endcomment %}
Expand Down
226 changes: 226 additions & 0 deletions snippets/breadcrumb.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
{% comment %}
Renders breadcrumbs
Usage:
{% render 'breadcrumb' %}
{% endcomment %}

<nav aria-label="breadcrumbs" class="page-width twcss-my-8 twcss-z-0 twcss-relative">
<ol class="breadcrumbs twcss-flex twcss-gap-3" itemscope itemtype="https://schema.org/BreadcrumbList">
{%- for link in section.settings.menu.links -%}
{%- if link.links != blank -%}
{%- if link.current %}
{% comment %}
First level of navigation menu items
{% endcomment %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='/' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="/">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ link.url }}' aria-current="page" itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ link.url }}">
<span itemprop="name">{{ link.title | escape }}</span>
</a>
<meta itemprop="position" content="2" />
</li>
{%- else -%}
{%- for childlink in link.links -%}
{%- if childlink.current %}
{% comment %}
Second level of navigation menu items
{% endcomment %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='/' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="/">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ link.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ link.url }}">
<span itemprop="name">{{ link.title | escape }}</span>
</a>
<meta itemprop="position" content="2" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ childlink.url }}' aria-current="page" itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ childlink.url }}">
<span itemprop="name">{{ childlink.title | escape }}</span>
</a>
<meta itemprop="position" content="3" />
</li>
{%- else -%}
{%- for grandchildlink in childlink.links -%}
{%- if grandchildlink.current %}
{% comment %}
Third level of navigation menu items
{% endcomment %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='/' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="/">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ link.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ link.url }}">
<span itemprop="name">{{ link.title | escape }}</span>
</a>
<meta itemprop="position" content="2" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ childlink.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ childlink.url }}">
<span itemprop="name">{{ childlink.title | escape }}</span>
</a>
<meta itemprop="position" content="3" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ grandchildlink.url }}' aria-current="page" itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ grandchildlink.url }}">
<span itemprop="name">{{ grandchildlink.title | escape }}</span>
</a>
<meta itemprop="position" content="4" />
</li>
{% else %}
{%- for greatgrandchildlink in grandchildlink.links -%}
{%- if greatgrandchildlink.current %}
{% comment %}
Fourth level of navigation menu items
{% endcomment %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='/' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="/">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ link.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ link.url }}">
<span itemprop="name">{{ link.title | escape }}</span>
</a>
<meta itemprop="position" content="2" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ childlink.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ childlink.url }}">
<span itemprop="name">{{ childlink.title | escape }}</span>
</a>
<meta itemprop="position" content="3" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ grandchildlink.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ grandchildlink.url }}">
<span itemprop="name">{{ grandchildlink.title | escape }}</span>
</a>
<meta itemprop="position" content="4" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ greatgrandchildlink.url }}' aria-current="page" itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ greatgrandchildlink.url }}">
<span itemprop="name">{{ greatgrandchildlink.title | escape }}</span>
</a>
<meta itemprop="position" content="5" />
</li>
{%- else -%}
{%- for greatgreatgrandchildlink in greatgrandchildlink.links -%}
{%- if greatgreatgrandchildlink.current %}
{% comment %}
Fifth level of navigation menu items
{% endcomment %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='/' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="/">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ link.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ link.url }}">
<span itemprop="name">{{ link.title | escape }}</span>
</a>
<meta itemprop="position" content="2" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ childlink.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ childlink.url }}">
<span itemprop="name">{{ childlink.title | escape }}</span>
</a>
<meta itemprop="position" content="3" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ grandchildlink.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ grandchildlink.url }}">
<span itemprop="name">{{ grandchildlink.title | escape }}</span>
</a>
<meta itemprop="position" content="4" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ greatgrandchildlink.url }}' itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ greatgrandchildlink.url }}">
<span itemprop="name">{{ greatgrandchildlink.title | escape }}</span>
</a>
<meta itemprop="position" content="5" />
</li>
<span aria-hidden="true" focusable="false">/</span>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
itemtype="https://schema.org/ListItem">
<a href='{{ greatgreatgrandchildlink.url }}' aria-current="page" itemscope itemtype="https://schema.org/WebPage"
itemprop="item" itemid="{{ greatgreatgrandchildlink.url }}">
<span itemprop="name">{{ greatgreatgrandchildlink.title | escape }}</span>
</a>
<meta itemprop="position" content="6" />
</li>
{%- endif -%}
{%- endfor -%}
{% endif %}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
</ol>
</nav>
2 changes: 1 addition & 1 deletion snippets/header-mega-menu.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</summary>
<div
id="MegaMenu-Content-{{ forloop.index }}"
class="mega-menu__content color-{{ section.settings.menu_color_scheme }} gradient motion-reduce global-settings-popup"
class="mega-menu__content color-{{ section.settings.menu_color_scheme }} gradient motion-reduce global-settings-popup twcss-z-10"
tabindex="-1"
>
<div class="page-width twcss-flex">
Expand Down

0 comments on commit 3d3cd21

Please sign in to comment.