Skip to content

Instantly share code, notes, and snippets.

View james-zedd's full-sized avatar
🏠
Working Hybrid

James Zedd james-zedd

🏠
Working Hybrid
View GitHub Profile
@james-zedd
james-zedd / index--hero-full-screen-slider.liquid
Created May 16, 2018 15:04
Shopify Index Section -- Hero Full Screen Slider
{% assign text_color = section.settings.text_color %}
{% assign overlay = section.settings.opacity | times: 0.01 %}
<div id="sliderContainer" class="slider-container" style="color:{{ text_color }};">
{% for block in section.blocks %}
<div class="hero-slide" style="background-image:url({{ block.settings.slide_bg | img_url: 'original' }});">
<div class="page-width hero-slide-content">
<h2>{{ block.settings.main_title }}</h2>
<p style="color:{{ text_color }};">{{ block.settings.sub_title }}</p>
<a style="color:{{ text_color }};border-color:{{ text_color }};" href="{{ block.settings.slide_url}}">{{ block.settings.slide_url_text }}</a>
@james-zedd
james-zedd / index--flickity-item.liquid
Created May 16, 2018 13:07
Shopify Index Section -- Flickity Item Slider
{% comment %}
* Make sure you have the Flickity plugin installed and the proper license for this to function on your store
* Plugin, licensing and documentation at https://flickity.metafizzy.co/
{% endcomment %}
{% assign cell_align = section.settings.cell_align %}
{% assign wrap_around = section.settings.wrap_around %}
{% assign img_width = section.settings.img_width | append: 'x' %}
<div class="flickity-section-{{ section.id }} flickity-index-slider item" style="background-color: {{ section.settings.bg }}">
@james-zedd
james-zedd / index--blog-insta.liquid
Created May 16, 2018 16:06
Shopify Index Section -- Blog/Instagram Section
{% comment %}
* Requires instafeed.js to function on your store
* Files and documentation at http://instafeedjs.com/
{% endcomment %}
<div id="blog-insta-section">
<div class="page-width">
<div class="grid">
<div class="grid__item large-up--three-tenths blog-carousel">
<div id="main-carousel" data-flickity='{ "cellAlign": "left", "contain": true, "wrapAround": true, "pageDots": false }'>
@james-zedd
james-zedd / settings.json
Last active July 16, 2022 23:42
VS Code Settings
{
"explorer.compactFolders": false,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.fontSize": 14,
"debug.console.fontSize": 14,
"markdown.preview.fontSize": 14,
"terminal.integrated.fontSize": 14,
"editor.defaultFormatter": "esbenp.prettier-vscode",
@james-zedd
james-zedd / DocumentFragment.js
Last active August 18, 2022 14:02
Creating elements in DOM using DocumentFragment()
const USER_DATA_URL = 'https://jsonplaceholder.typicode.com/users';
const main = document.getElementById('main');
async function init() {
const fetchUsers = await fetch(USER_DATA_URL);
const users = await fetchUsers.json();
users.forEach(user => {
const fragment = userFragment(user);
main.appendChild(fragment);
@james-zedd
james-zedd / index.js
Created September 15, 2022 00:07
You should try json
const axios = require('axios').default;
const URL = 'https://letsrevolutionizetesting.com/challenge.json';
function call(url) {
return axios.get(url).then((res) => {
return res.data;
});
}
@james-zedd
james-zedd / index--flickity-products.liquid
Last active February 1, 2023 15:52
Shopify Index Section -- Flickity Product Slider
{% comment %}
* Make sure you have the Flickity plugin installed and the proper license for this to function on your store
* Plugin, licensing and documentation at https://flickity.metafizzy.co/
{% endcomment %}
{% assign cell_align = section.settings.cell_align %}
{% assign wrap_around = section.settings.wrap_around %}
{% assign img_width = section.settings.img_width | append: 'x' %}
<div class="flickity-section-{{ section.id }} flickity-index-slider product" style="background-color: {{ section.settings.bg }}">
@james-zedd
james-zedd / index--flickity-collection.liquid
Created May 16, 2018 12:29
Shopify Index Section -- Flickity Collection Slider
{% comment %}
* Make sure you have the Flickity plugin installed and the proper license for this to function on your store
* Plugin, licensing and documentation at https://flickity.metafizzy.co/
{% endcomment %}
{% assign collection_main = collections[section.settings.collection_main] %}
{% assign collection_limit = section.settings.collection_limit %}
{% assign cell_align = section.settings.cell_align %}
{% assign wrap_around = section.settings.wrap_around %}