This file contains 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
<header class="header"> | |
<h1>Black Friday, Cyber Monday</h1> | |
<h2>Discounts on all products!</h2> | |
</header> | |
<div class="separator"></div> | |
<section class="footer"></section> |
This file contains 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
.header{ | |
box-sizing: border-box; | |
background: linear-gradient(to left,#ff2952,#ce1e3f);; | |
} | |
.separator{ | |
height: 125px; | |
margin-top:calc(125px * -1); | |
background-image: linear-gradient(to bottom right, transparent, transparent 50%, #f3efe4 50%, #f3efe4); | |
/* Using transparent for top of the gradient allows for a background image on the header. Alternatively you can just use a solid color that matches the header color. */ |
This file contains 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
{% layout none %} | |
{ | |
"first_name": "{{customer.first_name}}", | |
"last_name": "{{customer.last_name}}", | |
"email": "{{customer.email}}", | |
"id": {{customer.id}}, | |
"name": "{{customer.name}}", | |
"orders_count": {{customer.orders_count}} | |
} |
This file contains 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
$.getJSON('/search?q=shirt&view=json', function(response) { | |
console.log(response) | |
}); |
This file contains 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
{% layout none %} | |
{% paginate search.results by 50 %} | |
{ | |
"results": {{ search.results | json }} | |
} | |
{% endpaginate %} |
This file contains 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
<html> | |
<head> | |
{{ content_for_header }} | |
{% include 'head' %} | |
</head> | |
<body> | |
{% include 'header' %} | |
<main id="main"> | |
{{ content_for_layout }} | |
</main> |
This file contains 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
<script> | |
Shopify.currentProduct = {{ product | json }}; | |
if (Shopify.currentProduct) { | |
console.log(Shopify.currentProduct.variants); | |
} | |
</script> |
This file contains 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
// Escaping Liquid in SCSS. | |
// | |
// Expected output: | |
// a{ | |
// color: {{ settings.link-color }}; | |
// } | |
a{ | |
color: #{'{{ settings.link-color }}'}; | |
} |
This file contains 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
<code> | |
clicking on "ul.feature li, ul.feature li img" removes class "open" on "ul.feature li" | |
clicking on "ul.feature li" adds class "open" on "target" | |
</code> |
This file contains 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
<code> | |
clicking on "ul.feature li" adds class "open" on "target" | |
</code> |