Uncomplicate the sidebar

This commit is contained in:
Adam Hollett
2016-03-15 19:36:23 -04:00
committed by Tetsuro
parent 2790e8c339
commit 4d1378b4b3
41 changed files with 49 additions and 55 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<header class="home--banner">
<h1>Liquid</h1>
<p>Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.</p>
<p>Safe, customer facing template language for flexible web apps.</p>
<p class="btn-row">
<a href="https://github.com/Shopify/liquid/archive/master.zip" target="_blank" class="btn"><i class="icon fa fa-2x fa-arrow-circle-down"></i>Download</a>
<a href="https://github.com/Shopify/liquid" target="_blank" class="btn"><i class="icon fa fa-2x fa-github"></i>View on Github</a>
+7 -17
View File
@@ -2,25 +2,15 @@
<div class="sidebar--logo">
<a href="/">Liquid</a>
</div>
<nav class="sidebar--nav">
{% capture folders %}basics,tags,filters{% endcapture %}
{% assign sections = folders | split: "," %}
<nav class="sidebar--nav"> {% assign sections = "basics, tags, filters" | split: ", " %}
{% for section in sections %}
<ul class="section">
<li>
<h3 class="section__header">{{ section | capitalize }}</h3>
<ul class="section__links">
{% for page in site.pages %}
{% if page.path contains section/ %}
{% unless page.path contains "index.html" %}
<li><a href="{{ page.url | prepend: site.baseurl }}" class="section__link">{{ page.title }}</a></li>
{% endunless %}
{% endif %}
{% endfor %}
</ul>
</li>
<h3 class="section__header">{{ section | capitalize }}</h3>
<ul class="section__links">
{% for page in site.pages %}{% if page.url contains section/ %}{% unless page.path contains "index" %}
<li><a href="{{ page.url | prepend: site.baseurl }}" class="section__link">{{ page.title }}</a></li>
{% endunless %}{% endif %}{% endfor %}
</ul>
{% endfor %}