Skip to content

Instantly share code, notes, and snippets.

View BryanSchuetz's full-sized avatar
🎧
"Got a blank space where my mind should be, a Cliff Bar and some cold green tea"

Bryan Schuetz BryanSchuetz

🎧
"Got a blank space where my mind should be, a Cliff Bar and some cold green tea"
View GitHub Profile
@BryanSchuetz
BryanSchuetz / gist:639af638a36eb5eaa5f2
Last active October 13, 2016 07:19
Liquid: Siteleaf Next Navigation
{% if next.pages == empty %}
<p class="next">Next: <a href="{{ next.url }}">{{ next.title }}</a></p>
{% elsif next.pages.size > 0 %}
{% for page in next.pages limit:1 %}
<p class="next">Next: <a href="{{ page.url }}">{{ page.title }}</a></p>
{% endfor %}
{% elsif parent.next.pages == empty %}
<p class="next">Next: <a href="{{ parent.next.url }}">{{ parent.next.title }}</a></p>
{% elsif parent.next.pages.size > 0 %}
{% for page in parent.next.pages limit:1 %}
{% comment %}
* Loop through all site tags
* For each tag, create a container with the tag title, and all posts containing that tag
* Hide the container by default and use the tag slug as an ID for the container
{% endcomment %}
{% assign sorted_tags = site.tags | sort %}
{% for tag in sorted_tags %}
<div class="tag-archive--block" id="{{ tag | first | slugify }}">
<h2>{{ tag | first }}</h2>
@BryanSchuetz
BryanSchuetz / gist:df9d5c764c6f43366dcb
Last active October 13, 2016 07:18
Liquid: Siteleaf Related Posts
<ul>
{% for related_post in parent.posts %}
{% for tag in current.taxonomy['tags'].values %}
{% if related_post.taxonomy['tags'][tag.slug] and related_post.id != current.id %}
<li><a href="{{related_post.url}}">{{related_post.title}}</a></li>
{% break %}
{% endif %}
{% endfor %}
{% if forloop.index == 3 %}{% break %}{% endif %}
{% endfor %}
@BryanSchuetz
BryanSchuetz / filter.json
Last active May 17, 2016 19:38
Game of Thrones Filter Keyword List
{
"IGNORE_LIST": ["#got", "game of thrones", "gameofthrones", "john snow", "tyrion", "arya", "stark", "winterfell", "georgerrmartin", "george martin", "george r. r. martin", "daenerystargaryen", "targaryen", "daenerys", "baratheon", "martell", "lannister", "florent", "tully", "white walkers", "umber", "greyjoy", "whitewalkers", "winter is coming", "winteriscomming", "sansa", "brandon", "rickon", "theon", "asha", "euron", "victarion", "kings landing", "castle black", "cold hands", "westeros", "nights watch", "tyrell", "jorah", "mormont", "samwell", "tarly", "petyr", "baelish", "brienne", "the mountain", "clegane", "davos", "seaworth", "drogo", "khal", "braavos", "asshai", "red priestess", "volantis", "qarth", "valyria", "meereen", "dothrak", "pentos", "astapor", "yunkai", "lys", "sunspear", "lorath", "elyria", "ghis", "iron islands", "the arbor", "redwyne", "pyke", "skagos", "tarth", "dragonstone", "dragon glass", "dragonglass", "myr", "tyrosh", "bolton", "roose"],
}
@BryanSchuetz
BryanSchuetz / adaptive-fixed-width-grid.scss
Created March 18, 2016 15:44
Sass Adaptive Fixed Width Grid
//
// Configuration
//
$font-size: 10px; // Your base font-size in pixels
$column: 48px; // The column-width of your grid in pixels
$gutter: 24px; // The gutter-width of your grid in pixels
//
// Column-widths in variables
ul > li:not(:last-child)::after {
content: ",";
}
@BryanSchuetz
BryanSchuetz / SVG-DEFS include
Created August 17, 2015 18:59
Load all SVG data once using a partial. Then call each one as you want inline—basically, an SVG sprite.
<svg style="display: none;">
<defs>
<g></g>
</defs>
</svg>
@BryanSchuetz
BryanSchuetz / Inline SVG
Last active August 29, 2015 14:27
Inline SVG for use with SVG definitions loaded as a separate include
<svg class="search" viewBox="0 0 0 0" preserveAspectRatio="xMinYMax meet"><use xlink:href="#SVGGroupID"></use></svg>
// 🎌 🎌