This repository was archived by the owner on Aug 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 513
Reduce snippet dependency #361
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ad725a3
Combined open graph and twitter card snippet
cshold 728c805
Move nav and newsletter forms inline
cshold 53f0f2c
Inline search result markup, product list items
cshold 9ca186b
Inline collection grid/list markup
cshold 688bff4
Combine collection sorting/view snippets
cshold 8c15177
Start/end comments for old snippets
cshold b2e017d
Cleaned up search result template
cshold ffbb9ac
Syntax for liquid vars
cshold ccdda94
Empty cart markup change
cshold 778eb01
Add menu string for mobile nav trigger
cshold ec4e456
Moved strings to appropriate place in json
cshold File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,11 +23,8 @@ | |
| <meta name="description" content="{{ page_description | escape }}"> | ||
| {% endif %} | ||
|
|
||
| <!-- Product meta ================================================== --> | ||
| {% include 'open-graph-tags' %} | ||
| {% include 'twitter-card' %} | ||
|
|
||
| <!-- Helpers ================================================== --> | ||
| {% include 'social-meta-tags' %} | ||
| <link rel="canonical" href="{{ canonical_url }}"> | ||
| <meta name="viewport" content="width=device-width,initial-scale=1"> | ||
| <meta name="theme-color" content="{{ settings.color_primary }}"> | ||
|
|
@@ -37,7 +34,6 @@ | |
|
|
||
| <!-- Header hook for plugins ================================================== --> | ||
| {{ content_for_header }} | ||
|
|
||
| {% include 'oldIE-js' %} | ||
|
|
||
| {{ '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' | script_tag }} | ||
|
|
@@ -59,15 +55,86 @@ | |
|
|
||
| <div id="NavDrawer" class="drawer drawer--left"> | ||
| <div class="drawer__header"> | ||
| <div class="drawer__title h3">{{ 'general.drawers.browse' | t }}</div> | ||
| <div class="drawer__title h3">{{ 'layout.drawers.browse' | t }}</div> | ||
| <div class="drawer__close js-drawer-close"> | ||
| <button type="button" class="icon-fallback-text"> | ||
| <span class="icon icon-x" aria-hidden="true"></span> | ||
| <span class="fallback-text">{{ 'general.drawers.close_menu' | t }}</span> | ||
| <span class="fallback-text">{{ 'layout.drawers.close_menu' | t }}</span> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| {% include 'mobile-nav' %} | ||
| <!-- begin mobile-nav --> | ||
| <ul class="mobile-nav"> | ||
| <li class="mobile-nav__item mobile-nav__search"> | ||
| {% include 'search-bar' %} | ||
| </li> | ||
| {% for link in linklists.main-menu.links %} | ||
| {% comment %} | ||
| Create a dropdown menu by naming a linklist the same as a link in the parent nav | ||
|
|
||
| More info on dropdowns: | ||
| - http://docs.shopify.com/manual/your-website/navigation/create-drop-down-menu | ||
| {% endcomment %} | ||
| {% assign child_list_handle = link.title | handleize %} | ||
| {% if linklists[child_list_handle].links != blank %} | ||
| <li class="mobile-nav__item{% if link.active %} mobile-nav__item--active{% endif %}" aria-haspopup="true"> | ||
| <div class="mobile-nav__has-sublist"> | ||
| <a href="{{ link.url }}" class="mobile-nav__link">{{ link.title }}</a> | ||
| <div class="mobile-nav__toggle"> | ||
| <button type="button" class="icon-fallback-text mobile-nav__toggle-open"> | ||
| <span class="icon icon-plus" aria-hidden="true"></span> | ||
| <span class="fallback-text">See More</span> | ||
| </button> | ||
| <button type="button" class="icon-fallback-text mobile-nav__toggle-close"> | ||
| <span class="icon icon-minus" aria-hidden="true"></span> | ||
| <span class="fallback-text">{{ 'cart.general.close_cart' | t | json }}</span> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| <ul class="mobile-nav__sublist"> | ||
| {% for childlink in linklists[child_list_handle].links %} | ||
| <li class="mobile-nav__item {% if childlink.active %} mobile-nav__item--active{% endif %}"> | ||
| <a href="{{ childlink.url }}" class="mobile-nav__link">{{ childlink.title | escape }}</a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| </li> | ||
| {% else %} | ||
| <li class="mobile-nav__item{% if link.active %} mobile-nav__item--active{% endif %}"> | ||
| <a href="{{ link.url }}" class="mobile-nav__link">{{ link.title }}</a> | ||
| </li> | ||
| {% endif %} | ||
| {% endfor %} | ||
|
|
||
| {% comment %} | ||
| If customer accounts are enabled, provide login and create account links | ||
| {% endcomment %} | ||
| {% if shop.customer_accounts_enabled %} | ||
| {% if customer %} | ||
| <li class="mobile-nav__item"> | ||
| {% if customer.first_name != blank %} | ||
| {% capture first_name %}<a href="/account">{{ customer.first_name }}</a>{% endcapture %} | ||
| {{ 'layout.customer.logged_in_as_html' | t: first_name: first_name }} | ||
| {% else %} | ||
| <a href="/account">{{ 'layout.customer.account' | t }}</a> | ||
| {% endif %} | ||
| </li> | ||
| <li class="mobile-nav__item"> | ||
| {{ 'layout.customer.log_out' | t | customer_logout_link }} | ||
| </li> | ||
| {% else %} | ||
| <li class="mobile-nav__item"> | ||
| {{ 'layout.customer.log_in' | t | customer_login_link }} | ||
| </li> | ||
| {% if shop.customer_accounts_optional %} | ||
| <li class="mobile-nav__item"> | ||
| {{ 'layout.customer.create_account' | t | customer_register_link }} | ||
| </li> | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endif %} | ||
| </ul> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. // end mobile nav |
||
| <!-- //mobile-nav --> | ||
| </div> | ||
| <div id="CartDrawer" class="drawer drawer--right"> | ||
| <div class="drawer__header"> | ||
|
|
@@ -162,15 +229,52 @@ | |
| <nav class="nav-bar" role="navigation"> | ||
| <div class="wrapper"> | ||
| <div class="medium-down--hide"> | ||
| {% include 'site-nav' %} | ||
| {% comment %} | ||
| List out your main-menu linklist (default) | ||
|
|
||
| More info on linklists: | ||
| - http://docs.shopify.com/themes/liquid-variables/linklists | ||
| {% endcomment %} | ||
| <!-- begin site-nav --> | ||
| <ul class="site-nav" id="AccessibleNav"> | ||
| {% for link in linklists.main-menu.links %} | ||
| {% comment %} | ||
| Create a dropdown menu by naming a linklist the same as a link in the parent nav | ||
|
|
||
| More info on dropdowns: | ||
| - http://docs.shopify.com/manual/your-website/navigation/create-drop-down-menu | ||
| {% endcomment %} | ||
| {% assign child_list_handle = link.title | handleize %} | ||
| {% if linklists[child_list_handle].links != blank %} | ||
| <li class="site-nav--has-dropdown{% if link.active %} site-nav--active{% endif %}" aria-haspopup="true"> | ||
| <a href="{{ link.url }}" class="site-nav__link"> | ||
| {{ link.title }} | ||
| <span class="icon icon-arrow-down" aria-hidden="true"></span> | ||
| </a> | ||
| <ul class="site-nav__dropdown"> | ||
| {% for childlink in linklists[child_list_handle].links %} | ||
| <li{% if childlink.active %} class="site-nav--active"{% endif %}> | ||
| <a href="{{ childlink.url }}" class="site-nav__link">{{ childlink.title | escape }}</a> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| </li> | ||
| {% else %} | ||
| <li {% if link.active %}class="site-nav--active"{% endif %}> | ||
| <a href="{{ link.url }}" class="site-nav__link">{{ link.title }}</a> | ||
| </li> | ||
| {% endif %} | ||
| {% endfor %} | ||
| </ul> | ||
| <!-- //site-nav --> | ||
| </div> | ||
| <div class="large--hide medium-down--show"> | ||
| <div class="grid"> | ||
| <div class="grid__item one-half"> | ||
| <div class="site-nav--mobile"> | ||
| <button type="button" class="icon-fallback-text site-nav__link js-drawer-open-left" aria-controls="NavDrawer" aria-expanded="false"> | ||
| <span class="icon icon-hamburger" aria-hidden="true"></span> | ||
| <span class="fallback-text">Mobile Navigation</span> | ||
| <span class="fallback-text">{{ 'layout.navigation.menu' | t }}</span> | ||
| </button> | ||
| </div> | ||
| </div> | ||
|
|
@@ -223,8 +327,26 @@ | |
| {% endif %} | ||
| {% if settings.footer_newsletter_enable %} | ||
| <div class="grid__item large--one-quarter medium--one-half"> | ||
| {% comment %} | ||
| MailChimp is the go-to newsletter service for Shopify. | ||
| Use the link below to find your MailChimp form action | ||
| and insert it in your site settings. | ||
|
|
||
| MailChimp newsletter integration and requirement: | ||
| - http://docs.shopify.com/support/configuration/store-customization/where-do-i-get-my-mailchimp-form-action | ||
| {% endcomment %} | ||
| <h3>{{ 'layout.footer.newsletter_title' | t }}</h3> | ||
| {% include 'newsletter-form' %} | ||
| {% if settings.newsletter_form_action != blank %} | ||
| {% assign form_action = settings.newsletter_form_action %} | ||
| {% else %} | ||
| {% assign form_action = '#' %} | ||
| {% endif %} | ||
| <form action="{{ form_action }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" target="_blank" class="input-group"> | ||
| <input type="email" value="{% if customer %}{{ customer.email }}{% endif %}" placeholder="{{ 'general.newsletter_form.newsletter_email' | t }}" name="EMAIL" id="mail" class="input-group-field" aria-label="{{ 'general.newsletter_form.newsletter_email' | t }}" autocorrect="off" autocapitalize="off"> | ||
| <span class="input-group-btn"> | ||
| <input type="submit" class="btn" name="subscribe" id="subscribe" value="{{ 'general.newsletter_form.submit' | t }}"> | ||
| </span> | ||
| </form> | ||
| </div> | ||
| {% endif %} | ||
| <div class="grid__item text-center"> | ||
|
|
@@ -239,7 +361,7 @@ | |
| <li> | ||
| <span class="icon-fallback-text"> | ||
| <span class="icon icon-{{type}}" aria-hidden="true"></span> | ||
| <span class="fallback-text">{{type | replace: '_',' '}}</span> | ||
| <span class="fallback-text">{{ type | replace: '_',' '}}</span> | ||
| </span> | ||
| </li> | ||
| {% endfor %} | ||
|
|
||
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add HTML comments denoting the start/end to the old snippets? I think it would go a long way in helping ppl navigate this file.
Eg
// begin mobile nav
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍