Skip to content

Instantly share code, notes, and snippets.

@teammixture
teammixture / layout.liquid
Created June 30, 2014 10:23
Setting a global variable block at the top of the page, allows any page to inject variables that are available globally...
<!doctype html>
{% block _vars %}{% endblock %}
<html lang="en">
<head>
<title>title</title>
</head>
<body class="{{ _bodyClass }}">
{% block content %}{% endblock %}
</body>
</html>
{
"convertHtmlOutput": null,
"customRubyPath": null,
"debug": false,
"domain": null,
"followLeader": false,
"lintScripts": false,
"modelSource": null,
"optimiseImages": true,
"optimiseSVG": true,
Suzy in Mixture.io:
If you start a new project or select a boilerplate (the compass boilerplate is a good example).
1. Just make sure in the "mixture.json" settings file "useCompass" is set to true.
2. this will create "compass/config.rb"
3. edit "compass/congif.rb" - you should see some comments at the top - uncomment: require 'suzy'
Thats it, suzy will now be available to your sass files as per the suzy docs.
{% collection "shows" by 1 order desc %}
<p>{{ collection.items.first.title }}</p>
{% endcollection %}
@teammixture
teammixture / layout.liquid
Created November 20, 2013 19:51
Example adding a class dynamically to a body tag based on the url in http://mixture.io
<!doctype html>
<html lang="en">
<head>
<title>{% block title %}Example{% endblock %}</title>
</head>
<body class="{{ mixture.url | slugify }}">
{% block content %}{% endblock %}
</body>
</html>
@teammixture
teammixture / gist:7569803
Created November 20, 2013 19:48
Simple example - dynamically adding a class to navigation based on the url in http://mixture.io
<ul>
<li><a href="/" {% if mixture.url == "index" %}class="selected"{% endif %}>Home</a></li>
<li><a href="/about" {% if mixture.url == "about" %}class="selected"{% endif %}>About</a></li>
<li><a href="/contact" {% if mixture.url == "contact" %}class="selected"{% endif %}>Contact</a></li>
</ul>