Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
lookin at ur code

Kelly Vaughn kellyvaughn

👀
lookin at ur code
View GitHub Profile
View js-variables.liquid
/* ===== JS-VARIABLES.LIQUID (snippets/js-variables.liquid)
======================= */
{% capture js_variables %}
Shopify = window.Shopify || {};
{% comment %} /* # Theme settings
================================================== */ {% endcomment %}
Shopify.theme_settings = {};
View css-variables.liquid
/* ===== 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 }}
View taproom-workflow.md

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 / shipping-bar.liquid
Created Oct 1, 2020
KellyxKelly - Shipping Bar
View shipping-bar.liquid
{% assign threshold = section.settings.free-shipping-threshold | times: 100 %}
{% assign amount_remaining = threshold | minus: cart.items_subtotal_price %}
{% assign amount_remaining_money = amount_remaining | money %}
<div class="shipping-bar">
{% if amount_remaining <= 0 %}
<p>{{ section.settings.free-shipping-message }}</p>
{% else %}
<p>{{ section.settings.approaching-message | replace: '*', amount_remaining_money }}</p>
{% endif %}
@kellyvaughn
kellyvaughn / index-hero.liquid
Created Sep 13, 2019
Hero Video (with fallback image)
View index-hero.liquid
<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 / graphql-using-vanilla-js.js
Last active Mar 17, 2021
Shopify GraphQL Storefront API using Vanilla JavaScript
View graphql-using-vanilla-js.js
// 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>;
View mailchimp-popup.js
<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 / gist:b22c3f8f2d4f28264a44eac5ad632594
Created Oct 27, 2017
Order confirmation email: See lines 196-204
View gist:b22c3f8f2d4f28264a44eac5ad632594
{% 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 / general-header.liquid
Created Feb 17, 2017
Sections/Snippets - Page Headers
View general-header.liquid
<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 / custom-fees.liquid
Created Dec 3, 2016
(Shopify) Snippet to auto add product to cart based on Bold Product Options selection (one-time fee)
View custom-fees.liquid
{% assign totes_addon = all_products['custom-tote-new-order-fee'] %}
{% assign pouches_addon = all_products['custom-pouches-new-order-fee'] %}
{% assign cards_addon = all_products['custom-cards-new-order-fee'] %}
{% unless cart.item_count == 0 %}
{% assign totes_id = totes_addon.variants.first.id %}
{% assign pouches_id = pouches_addon.variants.first.id %}
{% assign cards_id = cards_addon.variants.first.id %}