We want to go from this:
... to that:
| /** | |
| Squarespace essentially doesn't really document their breakpoints. | |
| This can be quite annoying to not have when doing custom CSS. | |
| Most themes use essentially one breakpoint. Mobile and not mobile; anything 750 and below is considered mobile. | |
| You can use these to write your own CSS and simply use the "Style Editor" to inject your compiled CSS in the event | |
| you are not using "Developer Mode" in your site. | |
| Enjoy! |
| <script> | |
| jQuery(document).ready(function($){ | |
| var images = []; | |
| {% for image in product.images %} | |
| images.push({url: "{{ image | product_img_url: 'medium' }}", alt: "{{ image.alt }}"}); | |
| {% endfor %} | |
| var thumbnails = $(".thumbs"); |
| @media (max-width: 479px) { | |
| .show-on-desktop, .show-on-tablets, .hide-on-mobile { display: none; } | |
| } | |
| @media (min-width: 480px) and (max-width: 979px) { | |
| .show-on-desktop, .hide-on-tablets, .show-on-mobile { display: none; } | |
| } | |
| @media (min-width: 980px) { | |
| .hide-on-desktop, .show-on-tablets, .show-on-mobile { display: none; } | |
| } |
| var optionSelectors = new Shopify.OptionSelectors... | |
| // Grab the variant currently selected with ?variant=ID in the URL, or the first in stock variant, on page load. | |
| optionSelectors.selectVariant({{ product.selected_or_first_available_variant.id }}); |
| <div> | |
| <label for="sort-by">Sort by</label> | |
| <select id="sort-by"> | |
| <option value="manual">Featured</option> | |
| <option value="price-ascending">Price: Low to High</option> | |
| <option value="price-descending">Price: High to Low</option> | |
| <option value="title-ascending">A-Z</option> | |
| <option value="title-descending">Z-A</option> | |
| <option value="created-ascending">Oldest to Newest</option> | |
| <option value="created-descending">Newest to Oldest</option> |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases. | |
| # Much of this was originally copied from: | |
| # http://natelandau.com/my-mac-osx-bash_profile/ | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management |
| {% if cart.item_count > 0 %} | |
| <script> | |
| // Script that updates images on the cart page to show the correct thumbnail as chosen in the Variant Images app. | |
| // This works with any markup. | |
| // This works when using Line Item Properties where several items in the cart form can share the same variant ID. | |
| // Author: Caroline Schnapp. | |
| // Place at the top of your cart.liquid template. | |
| (function($) { | |
| var variantImages = {}, | |
| productHandles = []; |
| {% if article.content contains "<img" %} | |
| {% assign src = article.content | split: 'src="' %} | |
| {% assign src = src[1] | split: '"' | first | replace: '//cdn', 'http://cdn' | replace: 'http:http://', 'http://' | remove: 'https:' %} | |
| {% endif %} |
Install Package Control for easy package management.
Ctrl+`