Skip to content

Instantly share code, notes, and snippets.

View seandogg's full-sized avatar

Sean Orfila seandogg

View GitHub Profile
# Sample Config
title: Site Title
description: Hi this is your description
keywords: drop, some, hot, keywords, here
author: devvartpoddar
baseurl: "" # the subpath of your site, e.g. /blog/
url: "https://your-url-here.com" # the base hostname & protocol for your site
# Build settings
@seandogg
seandogg / asset_svg.liquid
Created April 12, 2018 00:01
A nice way to organize SVGs within a Shopify project
{% comment %}
Use like this in liquid: {% include 'asset_svg' with 'cart_icon' %}
{% endcomment %}
{% assign icon_name = asset_svg %}
{% if icon_name == 'cart_icon' %}
<svg version="1.1" class="svg cart" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 27" style="enable-background:new 0 0 24 27; width: 24px; height: 27px;" xml:space="preserve"><g><path d="M0,6v21h24V6H0z M22,25H2V8h20V25z"/></g><g><path d="M12,2c3,0,3,2.3,3,4h2c0-2.8-1-6-5-6S7,3.2,7,6h2C9,4.3,9,2,12,2z"/></g></svg>
{% elsif icon_name == 'facebook_icon' %}
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve"><g><path d="M16.4,1l-3.1,0C9.8,1,9.6,3.3,9.6,6.8v1.7H6.5C6.2,8.5,6,8.8,6,9v1.9c0,0.3,0.2,0.5,0.5,0.5h3.1v9.9c0,0.3,0.2,0.5,0.5,0.5h2c0.3,0,0.5-0.2,0.5-0.5v-9.9h3.6c0.3,0,0.5-0.2,0.5-0.5l0-1.9c0-0.1-0.1-0.3-0.1-0.3c-0.1-0.1-0.2-0.1-0.3-0.1h-3.6V5.3c0-1.1,0.3-1.7,1.7-1.7l2.1,0c0.3,0,0.5-0.2,0.5-0.5V1.5C16.8,1.2,16.6,1,1
{% if line_item.fulfillment %}
<div class="note">
{% assign date = line_item.fulfillment.created_at | date: format: "month_date_year" %}
{% if fulfillment.item_count == line_item.quantity %}
{{ 'customer.order.fulfilled_at' | t: date: date }}
{% elsif fulfillment.item_count != line_item.quantity and line_item.fulfillment.item_count > 0 %}
Fulfilled {{ date }}
{% else %}
Unfulfilled
</div>
// hide the hidden-input
$('.hidden-input').hide();
// attach an ID to the checkbox so it's toggleable
$('#infiniteoptions-container > div.conditional > span > fieldset > label > input').attr('id', 'hidden');
// if the checkbox is checked, toggle the hidden input to show it
$('#hidden').click(function() {
$(".hidden-input").toggle(this.checked);
});
@seandogg
seandogg / IO-hidden-checkbox.liquid
Created September 29, 2017 23:11
IO-hidden-checkbox.liquid
{% comment %}
Conditional logic checking if the class "conditional" is checked on a checkbox,
if so, then show the text input. If not, hide it.
{% endcomment %}
<script>
window.Shoppad.apps.infiniteoptions = {
ready: function() {
$('.hidden-input').hide();

sudo chmod -R 777 app/cache

sudo chmod -R 777 app/logs

php app/console debug:router

from project dir: sudo chown -R [user].apache [project-folder]

sudo ./deploy-test.sh

{% if page.metafields.c_f.b1_image != blank %}
<!-- Horizontal Image-->
<div class="long">
{% if page.metafields.c_f.b1_image_link != blank %}<a href="{{ page.metafields.c_f.b1_image_link }}" alt="Shop This Look">{% endif %}
<img class="lazy" data-original="{{ page.metafields.c_f.b1_image }}" src="{{ 'Placeholder.png' | asset_url }}" alt="Shop This Look" />
{% if page.metafields.c_f.b1_image_link != blank %}
<div class="long-over">
<div class="long-double">
{% if page.metafields.c_f.b1_image_title != blank %}
@seandogg
seandogg / frontend-experiments.html.twig
Created July 14, 2016 22:16
Frontend Scratch Paper
{# Frontend Experiments #}
<div class="row">
<div class="col-xs-12 text-center">
<canvas id="drawing"></canvas>
</div>
</div>
<div class="row">
/*
Error: File to import not found or unreadable: util/util.
Load paths:
/Users/juan_pedro/Documents/Websites/www.highlandparkplace.dev/wp-content/themes/grizzlypoppy/stylesheets
/Users/juan_pedro/Documents/Websites/www.highlandparkplace.dev/bower_components/foundation/scss
/Users/juan_pedro/Documents/Websites/www.highlandparkplace.dev/bower_components/foundation-sites/scss
/Users/juan_pedro/Documents/Websites/www.highlandparkplace.dev/bower_components/foundation-sites
/Users/juan_pedro/Documents/Websites/www.highlandparkplace.dev/bower_components/motion-ui
Sass::Globbing::Importer
on line 11 of /Users/juan_pedro/Documents/Websites/www.highlandparkplace.dev/wp-content/themes/grizzlypoppy/stylesheets/foundation.scss
<?php //Posts Loop
$args=array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => get_option( 'posts_per_page' ),
'orderby' => 'menu_order',
'order' => 'ASC'
);
$blog_query = new WP_Query($args);