Skip to content

Instantly share code, notes, and snippets.

View ajmalafif's full-sized avatar
💻

Ajmal Afif ajmalafif

💻
View GitHub Profile
@cargix1
cargix1 / new-order-template.liquid
Last active July 29, 2021 11:37
New Order Template
<p>Hello {{ shop_name }},</p>
<p></p>
<p>{% if customer.name %}{{ customer.name }}{% else %}Someone{% endif %} placed a new order with you today, {{ date | date: "%b %d %I:%M%p" }}:</p>
<p></p>
<ul style="list-style-type:none">{% for line in line_items %}<li> <img src="{{ line | img_url: 'thumb' }}" /> {{ line.quantity }}x {{line.title }} (sku: {{ line.sku }})<br>{% for p in line.properties %}{% if p.first == "builder_id" or p.first == "builder_info" or p.first == "master_builder" or p.last == "" or p.first == "_ZapietId" %}{% else %}{{ p.first }}: {% if p.last contains '/uploads/' %}<a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a><br>{% else %}{{ p.last }}<br>{% endif %}{% endif %}{% endfor %}</li>{% endfor %}</ul>
<a href="{{ shop.url }}/admin/orders/{{ id }}">View order {{order_name}} </a>
{% if fulfillment_aborted %}
<p>The above order was not automatically fulfilled because it was flagged as suspicious.</p>{% endif %}
<p></p><br>
@cargix1
cargix1 / order-confirmation-template.liquid
Last active May 2, 2024 19:05
Order Confirmation Template
{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}Hi {{ customer.first_name }}, {% if attributes.Checkout-Method == "pickup" %}we're getting your order ready for collection.{% elsif attributes.Checkout-Method == "delivery" %}we're getting your order ready to be delivered. We will notify you when it has been sent.{% else %}we're getting your order ready to be shipped. We will notify you when it has been sent.{% endif %}{% endcapture %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
@robertvanhoesel
robertvanhoesel / Keyboard.ts
Created August 23, 2018 19:59
Make any keyboard design in Framer interactive, using the text on the button as input onTap
import { Override, Data } from "framer";
const app = Data({ Text: "" });
export const Input: Override = props => {
return {
text: app.Text.length > 0 ? app.Text : "Type something...",
opacity: app.Text.length > 0 ? 1 : 0.6
};
};
@cargix1
cargix1 / shipping-confirmation-template.liquid
Last active April 23, 2020 20:59
Shipping confirmation template
{% if fulfillment.item_count == item_count %}
{% capture shipment_name %}Your order is{% endcapture %}
{% elsif fulfillment.item_count > 1 %}
{% if fulfillment_status == 'fulfilled' %}
{% capture shipment_name %}The last items in your order are{% endcapture %}
{% else %}
{% capture shipment_name %}Some items in your order are{% endcapture %}
{% endif %}
{% else %}
{% if fulfillment_status == 'fulfilled' %}
@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active April 1, 2022 11:19
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9
@spences10
spences10 / fontFace.js
Created June 23, 2018 16:44
Font Face helper function by mschipperheyn
/**
* Awesome helper function from Marc Schipperheyn
* https://github.com/mschipperheyn 👌
*
*/
export function fontFace(
name,
src,
fontWeight = 'normal',
@stefanjudis
stefanjudis / package.json
Last active October 2, 2019 07:36
Cached SQIP implementation on Netlify
{
"name": "sqip-cache-tryout",
"version": "1.0.0",
"description": "",
"main": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "stefan judis <[email protected]>",
#initial setup
#modules
{MapboxJS, CustomMarker, Marker, animateOnRoute} = require "mapbox-js/MapboxJS"
mapboxToken='your api key'
#MAIN_1 {
box-sizing: border-box;
color: rgb(4, 4, 2);
cursor: default;
display: flex;
height: 2526.08px;
max-width: 100%;
text-decoration: none solid rgb(4, 4, 2);
text-size-adjust: 100%;
width: 960px;
# Getting data from the CoinMarketCap API
coins = JSON.parse Utils.domLoadDataSync 'https://api.coinmarketcap.com/v1/ticker/'
# Create a Scroll componnent, that will wrap all coinRows
list = new ScrollComponent
width: Screen.width
height: Screen.height
# Set the backgrond color for the scroll content
list.content.backgroundColor = '#FFFFFF'