Instantly share code, notes, and snippets.
-
Blueprint Marketing
- Winter Park Florida
- https://www.blueprintmarketing.com
blueprintmrk
/ accessible-breadcrumbs-case-statement.liquid
Created
September 11, 2020 17:44
— forked from shopifypartners/accessible-breadcrumbs-case-statement.liquid
Initial case statement for various template types for accessible breadcrumbs - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% assign t = template | split: '.' | first %} | |
<nav class="breadcrumbs" aria-label="breadcrumbs"> | |
<ol> | |
<li> | |
<a href="/" title="Home">Home</a> | |
</li> | |
{% case t %} | |
{% when 'page' %} |
blueprintmrk
/ settings_schema.json
Created
September 11, 2020 17:34
— forked from shopifypartners/settings_schema.json
Theme settings to show and hide accessible breadcrumb snippet - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{ | |
"name": "Navigation", | |
"settings": [ | |
{ | |
"type": "checkbox", | |
"id": "show_breadcrumb_nav", | |
"label": "Show breadcrumb navigation" | |
} | |
] | |
}, |
blueprintmrk
/ accessible-breadcrumbs-include.liquid
Created
September 11, 2020 17:34
— forked from shopifypartners/accessible-breadcrumbs-include.liquid
Conditional rule to include breadcrumbs based on settings - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% if settings.show_breadcrumb_nav %} | |
{% include 'breadcrumbs' %} | |
{% endif %} |
blueprintmrk
/ breadcrumbs.css
Created
September 11, 2020 17:34
— forked from shopifypartners/breadcrumbs.css
Simple CSS styles for accessible breadcrumbs - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
.breadcrumbs { | |
font-size: .85em; | |
margin: 0 0 2em; | |
} | |
.breadcrumbs ol { | |
list-style-type: none; | |
margin: 0; | |
padding: 0; | |
} |
blueprintmrk
/ accessible-breadcrumbs.liquid
Created
September 11, 2020 17:34
— forked from shopifypartners/accessible-breadcrumbs.liquid
Full snippet of accessible breadcrumbs using Liquid - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% unless template == 'index' or template == 'cart' or template == 'list-collections' or template == '404' %} | |
{% assign t = template | split: '.' | first %} | |
<nav class="breadcrumbs" role="navigation" aria-label="breadcrumbs"> | |
<ol> | |
<li> | |
<a href="/" title="Home">Home</a> | |
</li> |
blueprintmrk
/ accessible-breadcrumbs-unless.liquid
Created
September 11, 2020 17:34
— forked from shopifypartners/accessible-breadcrumbs-unless.liquid
Exclude breadcrumb snippet from rendering on specific templates using unless statement - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% unless template == 'index' or template == 'cart' or template == 'list-collections' or template == '404' %} | |
{% comment %} snippet code goes here {% endcomment %} | |
{% endunless %} |
blueprintmrk
/ accessible-breadcrumbs-case-article.liquid
Created
September 11, 2020 17:33
— forked from shopifypartners/accessible-breadcrumbs-case-article.liquid
Case statement for article template to build accessible breadcrumbs - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% when 'article' %} | |
<li>{{ blog.title | link_to: blog.url }}</li> | |
<li> | |
<a href="{{ article.url }}" aria-current="page">{{ article.title }}</a> | |
</li> |
blueprintmrk
/ accessible-breadcrumbs-case-blog.liquid
Created
September 11, 2020 17:33
— forked from shopifypartners/accessible-breadcrumbs-case-blog.liquid
Case statement for blog template to build accessible breadcrumbs - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% when 'blog' %} | |
{% if current_tags %} | |
<li>{{ blog.title | link_to: blog.url }}</li> | |
<li> | |
{% capture tag_url %}{{blog.url}}/tagged/{{ current_tags | join: "+" }}{% endcapture %} | |
<a href="{{ tag_url }}" aria-current="page">{{ current_tags | join: " + " }}</a> | |
</li> | |
{% else %} | |
<li> |
blueprintmrk
/ accessible-breadcrumbs-case-collection.liquid
Created
September 11, 2020 17:33
— forked from shopifypartners/accessible-breadcrumbs-case-collection.liquid
Case statement for collection template to build accessible breadcrumbs - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% when 'collection' and collection.handle %} | |
{% if current_tags %} | |
<li>{{ collection.title | link_to: collection.url }}</li> | |
<li> | |
{% capture tag_url %}{{ collection.url }}/{{ current_tags | join: "+"}}{% endcapture %} | |
<a href="{{ tag_url }}" aria-current="page">{{ current_tags | join: " + "}}</a> | |
</li> | |
{% else %} | |
<li> |
blueprintmrk
/ accessible-breadcrumbs-case-product.liquid
Created
September 11, 2020 17:33
— forked from shopifypartners/accessible-breadcrumbs-case-product.liquid
Case statement for product template to build accessible breadcrumbs - https://www.shopify.com/partners/blog/breadcrumb-navigation
This file contains hidden or 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
{% when 'product' %} | |
{% if collection.url %} | |
<li> | |
{{ collection.title | link_to: collection.url }} | |
</li> | |
{% endif %} | |
<li> | |
<a href="{{ product.url }}" aria-current="page">{{ product.title }}</a> |