Skip to content

Instantly share code, notes, and snippets.

View kellyvaughn's full-sized avatar
👀
lookin at ur code

Kelly Vaughn kellyvaughn

👀
lookin at ur code
View GitHub Profile
@kellyvaughn
kellyvaughn / account.liquid
Created March 28, 2016 18:54
Shopify - Reset Password on Account Page
{% form 'recover_customer_password' %}
<label for="RecoverEmail" class="hidden-label">{{ 'customer.recover_password.email' | t }}</label>
<input style="display: none;" type="email" name="email" id="RecoverEmail" class="input-full" value="{{ customer.email }}" autocorrect="off" autocapitalize="off">
<p>
<input type="submit" class="btn" value="Reset Password">
</p>
{% endform %}
@kellyvaughn
kellyvaughn / product.liquid
Last active May 16, 2018 10:57
Back in Stock
{% if product.tags contains "bis-hidden" %}
<p class="out-of-stock">{{ settings.out-of-stock-message }}</p>
{% else %}
<div class="product-reorder">
<h3>{{ settings.restock-notify-heading }}</h3>
<p>{{ settings.restock-notify-message }}</p>
<div class="restock-notify-form">
<input type="email" id="notify_email"{% if customer.email != blank %} value="{{ customer.email }}"{% endif %}>
<button id="notify_button">{{ settings.notify-me-button }}</button>
</div>
<script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/unique-methods/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">window.dojoRequire(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us19.list-manage.com","uuid":"6c6f6b53043be89a677038ad9","lid":"0c57a234a7","uniqueMethods":true}) })</script>
@kellyvaughn
kellyvaughn / css-variables.liquid
Created December 9, 2020 16:37
CSS Variables
/* ===== CSS-VARIABLES.LIQUID (snippets/css-variables.liquid)
======================= */
<style>
{{ settings.headline__font | font_face }}
{{ settings.regular__font | font_face }}
{%- assign font_body_bold = settings.regular__font | font_modify: 'weight', 'bolder' -%}
{%- assign font_body_bold_italic = font_body_bold | font_modify: 'style', 'italic' -%}
{{ font_body_bold | font_face }}
{{ font_body_bold_italic | font_face }}
@kellyvaughn
kellyvaughn / taproom-workflow.md
Created November 11, 2020 20:23
Taproom Workflow

Git & Github Process

Git and Gihub provide several benefits to the team and is an essential tool to The Taproom for collaboration and flexibility. Here are some of the guidelines we aim to follow:

  1. Utilize branches - While working on master, branches allow for more collaboration, conversation, and control around changes being made to the code. Commits directly to master should be limited to settings_data updates, client theme updates, typo fixes and emergency bug fixes.
@kellyvaughn
kellyvaughn / general-header.liquid
Created February 17, 2017 18:52
Sections/Snippets - Page Headers
<div class="page-header" style="background-image: url({{ settings.general-header | img_url: 'master' }})">
{{ settings.general-header | img_url: 'master' | img_tag }}
<h1>{{ page_title }}</h1>
</div>
@kellyvaughn
kellyvaughn / gist:b22c3f8f2d4f28264a44eac5ad632594
Created October 27, 2017 14:59
Order confirmation email: See lines 196-204
{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
Hi {{ customer.first_name }}, 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>
@kellyvaughn
kellyvaughn / index-hero.liquid
Created September 13, 2019 17:56
Hero Video (with fallback image)
<div class="video-holder">
<video autoplay muted loop playsinline poster="{{ section.settings.image | img_url: '2000x', scale: 2 }}">
{% unless section.settings.video-mp4 == blank %}<source src="{{ section.settings.video-mp4 }}" type="video/mp4" />{% endunless %}
{% unless section.settings.video-ogg == blank %}<source src="{{ section.settings.video-ogg }}" type="video/ogg" />{% endunless %}
<img src="{{ section.settings.image | img_url: '2000x', scale: 2 }}" />
</video>
</div>
<div class="overlay"></div>
<div class="hero-content">
@kellyvaughn
kellyvaughn / shopifybreadcrumb.txt
Created October 13, 2015 20:34
Shopify Product Breadcrumb (Home > Category > Subcategory > Product)
<span aria-hidden="true">&rsaquo;</span>
{% if current_tags %}
{% capture url %}/collections/{{ collection.handle }}{% endcapture %}
{{ collection.title | link_to: url }}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ current_tags | join: " + " | replace: 'custom', 'Custom Built by Midwestern Craftsman' | replace: 'chalk/clay paint', 'Junk Gypsy™ Chalk/Clay Paint' | replace: "Milk Paint", "Miss Mustard Seed's Milk Paint" }}</span>
{% else %}
<span>{{ collection.title }}</span>
{% endif %}
<span aria-hidden="true">&rsaquo;</span>
@kellyvaughn
kellyvaughn / graphql-using-vanilla-js.js
Last active January 11, 2022 23:12
Shopify GraphQL Storefront API using Vanilla JavaScript
// This example was used to pull in variant titles and IDs dynamically
// on a custom build of the ReCharge customer portal.
//
// Feel free to send me an email if you have any questions.
//
// Kelly Vaughn -- The Taproom Agency
// kelly@thetaproom.com
// 1. Retrieve product ID in any format
const productId = <pathToProductId>;