Skip to content

Instantly share code, notes, and snippets.

View panoply's full-sized avatar
🥛
Rich in the hood

ΝΙΚΟΛΑΣ panoply

🥛
Rich in the hood
View GitHub Profile
@panoply
panoply / readme.md
Last active October 10, 2023 20:28
VSCode Liquid v4.0.0

UPGRADE GUIDE   –   vscode-liquid v4.0.0

Update the relating files to the structures found below, adjust where necessary. This update should not take longer than 1 minute for most users, it is just copy/paste unless you have some custom beautification rules, in that case you will need to re-apply them where required. Refer to the Release Notes for additional information and understanding.

Get support in the Discord Server if you run into any issues, I am here and I am human!

Updating the .liquidrc File

@panoply
panoply / carousel.ts
Created October 20, 2022 23:41
2kb Carousel
@panoply
panoply / component.ts
Last active September 6, 2023 09:16
Shopify Size Charts
import { LiteralUnion } from 'type-fest';
import { Controller } from '@hotwired/stimulus';
import * as customer from 'application/customer';
export class Sizing extends Controller {
/**
* Stimulus Values
*/
static values = {
var f=(e,t,r)=>new Promise((o,i)=>{var s=R=>{try{H(r.next(R))}catch(ge){i(ge)}},y=R=>{try{H(r.throw(R))}catch(ge){i(ge)}},H=R=>R.done?o(R.value):Promise.resolve(R.value).then(s,y);H((r=r.apply(e,t)).next())});var T=window.history,z=window.location.origin,He=Object.getOwnPropertyNames,E=Object.assign,c=Object.create,te=Array.isArray,S=Array.from,G="";function qe(e){let t=c(e);return t.targets=["body"],t.timeout=3e4,t.poll=15,t.schema="pjax",t.async=!0,t.cache=!0,t.reverse=!0,t.limit=50,t.preload=null,t.persist=!1,t.hover=c(null),t.hover.trigger="attribute",t.hover.threshold=250,t.intersect=c(null),t.intersect.rootMargin="0px 0px 0px 0px",t.intersect.threshold=0,t.proximity=c(null),t.proximity.distance=75,t.proximity.threshold=250,t.proximity.throttle=500,t.progress=c(null),t.progress.background="#111",t.progress.height="3px",t.progress.minimum=.8,t.progress.easing="linear",t.progress.speed=300,t.progress.trickle=!0,t.progress.threshold=350,t.progress.trickleSpeed=300,t}var n=qe(null),a=c(null),p=c(null),l=c(nu
{%- comment -%}
DISPLAY
{%- endcomment -%}
{%- liquid
assign buttons = 0
assign visible = nil
unless section.settings.mobile
assign visible = 'd-none d-sm-block'
endunless
@panoply
panoply / final.js
Last active February 25, 2022 00:10
export default {
input: 'src', // src path
output: 'theme', // dist path
export: 'export', // packed .zip theme location
import: 'import', // downloaded theme location
scripts: '.', // external config script locations, eg: postcss.config.js or webpack.config.js
// path mappings (src to dist)
paths: {
assets: 'assets/**/*', // file paths to be written to assets directory
config: 'schema/config/*.json', // file paths to be written to config directory
<article class="article-card{% if article.image == blank or show_image == false %} article-card--no-image{% endif %}" aria-labelledby="Article-{{ article.id }}"><a href="{{ article.url }}" class="article-content motion-reduce">{% if show_image == true and article.image %}<div class="article-card__image-wrapper"><div class="article-card__image media {% if image_height %}article-card__image--{{ image_height }}{% else %} media--landscape{% endif %}" {% if section.settings.image_height == 'adapt' %} style="padding-bottom: {{ 1 | divided_by: article.image.aspect_ratio | times: 100 }}%;"{% endif %}> <img srcset="{% if article.image.src.width >= 165 -%}{{ article.image.src | img_url: '165x' }} 165w,{% endif %}{% if article.image.src.width >= 360 -%}{{ article.image.src | img_url: '360x' }} 360w,{% endif %}{% if article.image.src.width >= 533 -%}{{ article.image.src | img_url: '533x' }} 533w,{% endif %}{% if article.image.src.width >= 720 -%}{{ article.image.src | img_url: '720x' }} 720w,{% endif %}{% if article.imag
@panoply
panoply / accordion.scss
Last active February 5, 2022 01:10
Accordion Component
$color_1: inherit;
$background_color_1: #fff;
$accordion-border-color: #eee !default;
$accordion-border-width: 1px !default;
$accordion-header-button-bg: #fff !default;
$accordion-header-button-bg-open: #eee !default;
$accordion-header-button-bg-focus: #dfdfdf !default;
@panoply
panoply / readme.md
Created January 21, 2022 12:09
Siema TypeScript

Siema

Hard forked TypeScript version of Siema forked sqwk variation which applies passive listeners and various other fixes.