Skip to content

Instantly share code, notes, and snippets.

View loughlincodes's full-sized avatar

Loughlin McSweeney loughlincodes

View GitHub Profile
@loughlincodes
loughlincodes / gist:d774bdd9ac121a1e2d554ec855c0632c
Last active March 25, 2021 19:33
Section schema for blocks in Pages
<div class="some-div">
{% for block in section.blocks %}
{% case block.type %}
{% when 'image' %}
image
{% when 'headline' %}
headline
// To get list of themes
theme get --list -p=[your-api-password] -s=[your-store.myshopify.com]
theme get -l -p=[your-api-password] -s=[your-store.myshopify.com]
// To download the theme
theme get --password=[your-api-password] --store=[your-store.myshopify.com] --themeid=[your-theme-id]
theme get -p=[your-api-password] -s=[your-store.myshopify.com] -t=[your-theme-id]
// To watch for changes on host
theme watch
@loughlincodes
loughlincodes / gist:7496ff59fa3788a979c4c27c463041d2
Created May 22, 2019 14:50
Hide <br/> tags and replace with a space
br{
content:' ';
}
br:after{
content:' ';
}
@loughlincodes
loughlincodes / tabs | tabbed-description.liquid
Last active April 11, 2022 17:53 — forked from tairli/tabbed-description.liquid
Tabs / Tabbed Product description snippet for Shopify
{% comment %}
if combine_pretext is false, the text before the first <h6> will be shown above all tabs, otherwise added to the first tab
{% endcomment %}
{% assign combine_pretext = false %}
{% assign description = tabbed-description | default: product.description %}
{% if description contains "<h6>" %}
{% assign tab_heads = '' %}
{% assign tab_texts = '' %}
{% assign pretext = '' %}
{% for block in section.blocks %}
<div class="list">
<h4>{{ linklists[block.settings.footer_menu].title }}</h4>
<ul>
{% for link in linklists[block.settings.footer_menu].links %}
<li><a href="{{ link.url }}">{{ link.title }}</a></li>
{% endfor %}
</ul>
</div> <!-- end list -->
{% assign product_tags = product.tags | join: ' ' %}
{% if product_tags contains 'whatever' %}
...do stuff...
{% endif %}
@loughlincodes
loughlincodes / conversio-newsletter.liquid
Created April 29, 2019 07:59
Add Conversio newsletter form as a section [Shopify]
{% comment %}
** Conversio Newsletter - homepage partial **
- Draggable section
{% endcomment %}
{% assign image = section.settings.image %}
{% assign newsletter_section_text_align = section.settings.newsletter_section_text_align %}
<style>
@loughlincodes
loughlincodes / google-reviews.liquid
Last active March 29, 2020 14:36
Shopify Section Boilerplate (Feb2018)
<div class="google-reviews"></div>
{% schema %}
{
"name": "Google Reviews",
"class": "google-reviews",
"settings": [
],
@loughlincodes
loughlincodes / nav.html
Created January 29, 2019 14:03
Hide Nav on Scroll Down and Show on Scroll Up
<header class="nav-down">
This is your menu.
</header>
<main>
This is your body.
</main>
<footer>
This is your footer.
</footer>
@loughlincodes
loughlincodes / gist:7ed18f4fb44ff23938a958762ddb2599
Created January 14, 2019 23:57
macOS Sierra - Show/Hide Hidden Files shortcut
Since the release of macOS Sierra, when in Finder, it is now possible to use the shortcut:
CMD + SHIFT + .
Press once to show hidden files and again to hide them.