Skip to content

Instantly share code, notes, and snippets.

<header class="header">
<h1>Black Friday, Cyber Monday</h1>
<h2>Discounts on all products!</h2>
</header>
<div class="separator"></div>
<section class="footer"></section>
.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. */
{% 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}}
}
$.getJSON('/search?q=shirt&view=json', function(response) {
console.log(response)
});
{% layout none %}
{% paginate search.results by 50 %}
{
"results": {{ search.results | json }}
}
{% endpaginate %}
<html>
<head>
{{ content_for_header }}
{% include 'head' %}
</head>
<body>
{% include 'header' %}
<main id="main">
{{ content_for_layout }}
</main>
<script>
Shopify.currentProduct = {{ product | json }};
if (Shopify.currentProduct) {
console.log(Shopify.currentProduct.variants);
}
</script>
@shopifypartners
shopifypartners / a-beginners-guide-to-sass-part-3-interpolation.liquid.scss
Last active February 13, 2023 08:04 — forked from stewartknapman/style.liquid.scss
A Beginner's Guide to Sass with Shopify — Part 3: Sass interpolation, Workflow and Object Oriented CSS - https://www.shopify.com/partners/blog/a-beginners-guide-to-sass-with-shopify-part-3
// Escaping Liquid in SCSS.
//
// Expected output:
// a{
// color: {{ settings.link-color }};
// }
a{
color: #{'{{ settings.link-color }}'};
}
<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>
<code>
clicking on "ul.feature li" adds class "open" on "target"
</code>