Created
February 10, 2017 19:04
-
-
Save l3aconator/12d8225c9df1bd5ab2bfa076964a5bc9 to your computer and use it in GitHub Desktop.
Modular document help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if page.header.documentSection == 'resources' %} | |
{% set documentCollection = taxonomy.findTaxonomy({'documentSection': 'resources' }) %} | |
{% elseif page.header.documentSection == 'materials' %} | |
{% set documentCollection = taxonomy.findTaxonomy({'documentSection': 'materials' }) %} | |
{% elseif page.header.documentSection == 'governance' %} | |
{% set documentCollection = taxonomy.findTaxonomy({'documentSection': 'governance' }) %} | |
{% elseif page.header.documentSection == 'deliverables' %} | |
{% set documentCollection = taxonomy.findTaxonomy({'documentSection': 'deliverables' }) %} | |
{% else %} | |
{% set documentCollection = taxonomy.findTaxonomy({'category': 'document' }) %} | |
{% endif %} | |
{% set taxlist = taxonomylist.get() %} | |
{% set taxonomy = 'documentTags' %} | |
<section class="documents"> | |
<div class="container"> | |
<div class="row"> | |
<div class="column column-66"> | |
{% for tax,value in taxlist[taxonomy] %} | |
<div class="document-accordion" id="{{ tax }}"> | |
<h4 class="section-header">{{ tax }}<span class="expand">+</span></h4> | |
{% for document in documentCollection %} | |
<div class="content"> | |
<div class="row"> | |
<div class="column column-33"> | |
<div class="document-preview"> | |
<a href="{{ document.media[document.header.document].url }}"> | |
{{ document.media.images|first.html }} | |
</a> | |
</div> | |
</div> | |
<div class="column colum-66"> | |
<h5><a href="{{ document.media[document.header.document].url }}">{{ loop.index }} {{ document.title }}</a></h5> | |
{{ document.content }} | |
</div> | |
</div> | |
</div> | |
{% endfor %} | |
</div> | |
{% endfor %} | |
</div> | |
<div class="column column-33"> | |
<div id="sidebar"> | |
<h4>{{ page.title }} Tags</h4> | |
{% if taxlist %} | |
<span class="tags"> | |
<ul> | |
{% for tax,value in taxlist[taxonomy] %} | |
{% set active = uri.param(taxonomy) == tax ? 'active' : '' %} | |
<li> | |
<a class="{{ active }}" href="#{{ tax }}">{{ tax }}</a> | |
</li> | |
{% endfor %} | |
</ul> | |
</span> | |
{% endif %} | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment