| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
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
| {% comment %} | |
| If all product images of your Shopify store share the same aspect ratio, | |
| you can use the following snippet to generate the correct srcset without | |
| having to use Javascript to detect their widths. | |
| The aspect ratio of an image is equal to its width divided by its height. | |
| Example: for an image that is 1536px wide by 2048px tall, | |
| the aspect ratio will be 1536 / 2048 = 0.75; | |
| The `default` variable corresponds to the default size that older browsers |
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
| <!-- Facebook Conversion code --> | |
| {% assign fb_pixel_id = 'yourpixelid' %} | |
| <script>(function() { | |
| var _fbq = window._fbq || (window._fbq = []); | |
| if (!_fbq.loaded) { | |
| var fbds = document.createElement('script'); | |
| fbds.async = true; | |
| fbds.src = '//connect.facebook.net/en_US/fbds.js'; | |
| var s = document.getElementsByTagName('script')[0]; |
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
| {% comment %} | |
| Shopify responsive product images with srcset. | |
| Example: | |
| Include this snippet on a product page or within a products loop: | |
| {% include 'product-image-srcset', | |
| sizes: '(max-width: 640px) 50vw, (min-width: 641px) and (max-width: 960px) 33vw, 25vw' %} |
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
| {% comment %} | |
| Input | |
| {% endcomment %}{% capture _content %}{{ content }}{% endcapture %}{% comment %} | |
| Remove redundant closing tags | |
| {% endcomment %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% for _element in _endings %} | |
| {% capture _end %}</{{ _element }}>{% endcapture %} |
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
| (function() { | |
| var FaviconAwesome = function(icon, color, bg) { | |
| 'use strict'; | |
| var | |
| container = document.createElement('div'), | |
| span = document.createElement('span'), | |
| body = document.body, | |
| content, | |
| canvas = document.createElement('canvas'), | |
| getContext = function(w) { |
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 template contains 'product' %} | |
| <meta property="og:type" content="product"> | |
| <meta property="og:title" content="{{ product.title | strip_html | escape }}"> | |
| <meta property="og:category" content="{{ product.type }}" /> | |
| {% for image in product.images limit:3 %} | |
| <meta property="og:image" content="http:{{ image.src | product_img_url: 'master' }}"> | |
| <meta property="og:image:secure_url" content="https:{{ image.src | product_img_url: 'master' }}"> | |
| {% endfor %} | |
| <meta property="og:price:amount" content="{{ product.price | money_without_currency | stip_html | escape | remove: ',' }}"> | |
| <meta property="og:price:currency" content="{{ shop.currency }}"> |
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 hosts file is brought to you by Dan Pollock and can be found at | |
| # http://someonewhocares.org/hosts/ | |
| # You are free to copy and distribute this file for non-commercial uses, | |
| # as long the original URL and attribution is included. | |
| #<localhost> | |
| 127.0.0.1 localhost | |
| 127.0.0.1 localhost.localdomain | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost |
NewerOlder