Skip to content

Instantly share code, notes, and snippets.

@odessy
odessy / swatches.json
Created September 17, 2024 15:38
Swatches with english and Nederlands
{"colors":[
{"Demo Image": "blank.svg"},
{"stripe": "stripe.svg"},
{"ink": "#696969"},
{"ash": "#a3a3a3"},
{"sky": "#9bbaed"},
{"pop": "#e43e23"},
{"red": "#d13b38"},
{"jet": "#000000"},
{"gum": "#eb5799"},
@odessy
odessy / gist:0af4f13548aadcf333de434de0f8a7c2
Created August 28, 2024 15:43
Klaviyo backinstock javascript code
<script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script>
<script>
var klaviyo = klaviyo || [];
klaviyo.init({
account: "UU6Fvf",
list: "UGSQKU",
platform: "shopify"
});
klaviyo.enable("backinstock",{
trigger: {
@odessy
odessy / gist:54ff5f8edd3b3e239d4ee5c093ca42b1
Last active August 10, 2024 18:29
Product title with link
{% assign product = all_products[section.settings.home_product] %}
<div class="product__block__title" style="--PB: 20px;">
<div class="product__headline">
<div class="product__title__wrapper">
<h1 class="product__title heading-size-9">
<a href="{{ product.url }}">{{ product.title }}</a>
</h1>
</div>
</div>
</div>
@odessy
odessy / gist:3e95e25b1cc7bf350744c504f8bfb9eb
Created July 31, 2024 16:45
Product photoswipe zoom icons fix
.pswp__button{
height: auto;
}
.pswp__button .icon-theme {
pointer-events: none;
}
<div class="product__block__title" style="--PB: 16px;">
<div class="product__headline">
<div class="product__title__wrapper">
<h1 class="product__title heading-size-4">
{% assign title = product.title | split: "|" %}
{{ title.first }}
<br>
{% if title.size == 2 %}
{{ title.last }}
@odessy
odessy / gist:78d232f313493336d7e86b9e0f54e5a5
Last active June 14, 2024 15:17
Pages URL for author handle
{% assign author_handle = article.author | handle %}
"url": {{ shop.url | append: '/pages/' | append: author_handle | json }}
@odessy
odessy / sticky_add_to_cart_button_v2.liquid
Last active January 2, 2025 16:03
Pipeline 7 Alpine js buy it now button sticky add to cart
{%- comment -%}
Uses the shopify permalink to generate the cart link
https://help.shopify.com/en/manual/products/details/cart-permalink#creating-a-cart-permalink
Example:
https://my-shop-name.myshopify.com/cart/36485954240671:1
{%- endcomment -%}
{%- if product.selling_plan_groups.size == 0 -%}
<div x-data="{sectionId: '{{ section.id }}', productId: '{{ product.handle }}', ...handleClick}">
@odessy
odessy / gist:bca25e6479c1ecfafa014e36a93bfacf
Last active May 10, 2024 16:43
Pipeline 7 kicker underline for headings
.rte h2:not([class]) {
padding-bottom: var(--inner);
position: relative;
margin-bottom: var(--space-4);
}
.rte h2:not([class]):after {
content: "";
margin: auto;
width: 30px;
height: 3px;
@odessy
odessy / gist:944ec03820fca3a8782b709096d751c1
Last active June 11, 2024 15:39
Pipeline 7 arrows above arrows show on images
.section-without-title .flickity-force-arrows-top [data-carousel] .flickity-button{
top: var(--buttons-top);
bottom: initial;
background: #fff;
}
.section-without-title .flickity-force-arrows-top [data-carousel] .flickity-button:after{
content: '';
padding: var(--gutter)
}
.section-without-title:not(.not-moved-arrows):not(.hidden-arrows):not(.section-without-title--skip) {
@odessy
odessy / gist:6736bb8f0fbf8cdf2d5874ef23cdd1c9
Created May 8, 2024 19:14
Pipeline 7 Custom button outline style
.button.outline {
--btn-text: var(--text);
--btn-bg-hover: var(--hairline);
--btn-bg: rgb(255 255 255 / 0%);
font-family: var(--TYPE-STACK-BUTTON);
font-style: var(--TYPE-STYLE-BUTTON);
font-weight: var(--TYPE-WEIGHT-BUTTON);
text-transform: var(--FONT-BUTTON-TRANSFORM);
letter-spacing: var(--FONT-BUTTON-LETTER-SPACING);
display: inline-block;