Skip to content

Instantly share code, notes, and snippets.

View reeceballano's full-sized avatar
🏠
Working from home

Reece Ballano reeceballano

🏠
Working from home
View GitHub Profile
@reeceballano
reeceballano / custom-product-lists.liquid
Created April 30, 2026 09:50
Custom Product List - Section
<div class="custom-product-lists">
{% if collections['custom-products'].products.size > 0 %}
{% for product in collections['custom-products'].products %}
{% render 'custom-product-card', product: product %}
{% endfor %}
{% else %}
<h1>No available products!</h1>
{% endif %}
</div>
@reeceballano
reeceballano / custom-product-card.liquid
Last active April 30, 2026 14:07
Custom Product Card - Snippet
{% assign swatches = product.metafields.custom.swatches.value %}
{% assign materials = product.metafields.custom.materials.value %}
<div class="custom-product-card">
<a href="{{ product.url }}">
<img class="custom-product-image" width="auto" height="auto" loading="lazy" />
</a>
{% form 'product', product %}
<input type="hidden" name="id" value="{{ product.variants.first.id }}">
@reeceballano
reeceballano / custom-slider.js
Created December 10, 2021 02:51
Custom Slider
const sliderBtn = document.querySelectorAll('.slider__button'),
sliderHolder = document.querySelector('.slider__holder'),
slides = document.querySelectorAll('[data-bstr-slide] .slide');
let slideWidth = Number(sliderHolder.offsetWidth),
currentSlide = 0,
currentSlideWidth = slideWidth;
for(const[i,s] of sliderBtn.entries()) {
if(s.getAttribute('data-bstr-slider-button') == '+') {
s.addEventListener('click', () => {
@reeceballano
reeceballano / findElement.js
Created November 11, 2021 12:53
Accessing DOM created elements
/**
* Accessing DOM created elements
* RBallano
* @params el = classname or id
*/
const findElement = (el) => {
const check = setInterval(() => {
const element = document.querySelector(`${el}`);
if(element !== null) {