Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicole A Murray namurray

View GitHub Profile
View boilerplate
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>My Website</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/main.css">
@namurray
namurray / tag-cloud.scss
Created May 4, 2017
Shopify tag cloud CSS
View tag-cloud.scss
.word-cloud {
display: inline-block;
max-width: 630px;
li {
display: inline-block;
padding: 0 1rem;
vertical-align: middle;
}
}
@namurray
namurray / tag-cloud.liquid
Last active May 3, 2017
Shopify tag cloud
View tag-cloud.liquid
<ul class="word-cloud">
{% for tag in blogs['BLOG-HANDLE'].all_tags %}
{% assign count = 0 %}
{% for article in blogs[blog.handle].articles %}
{% if article.tags contains tag %}
{% capture count %}{{ count | plus: 1 }}{% endcapture %}
{% endif %}
{% endfor %}
{% assign count = count | plus: 0 %}
<li class="tag-{% if count <= 3 %}alpha
You can’t perform that action at this time.