Skip to content

Instantly share code, notes, and snippets.

@basturzoiu
Last active April 25, 2019 08:03
Show Gist options
  • Save basturzoiu/35f54f6d942aab27a38730ffb0a823ce to your computer and use it in GitHub Desktop.
Save basturzoiu/35f54f6d942aab27a38730ffb0a823ce to your computer and use it in GitHub Desktop.
Section page example with sub-sections presented as blocks
<div class="container-divider"></div>
<div class="container">
<nav class="sub-nav">
{{breadcrumbs}}
{{search submit=false scoped=true}}
</nav>
<div class="section-container">
<section class="section-content">
<header>
<h1>
{{section.name}}
{{#if section.internal}}
<span class="icon-lock" title="{{t 'internal'}}"></span>
{{/if}}
</h1>
{{subscribe}}
{{#if section.description}}
<p class="page-header-description">{{section.description}}</p>
{{/if}}
</header>
{{#if section.articles}}
<ul class="article-list">
{{#each section.articles}}
<li class="article-list-item {{#if promoted}} article-promoted{{/if}}">
{{#if promoted}}
<span data-title="{{t 'promoted'}}" class="icon-star"></span>
{{/if}}
<a href="{{url}}" class="article-list-link">{{title}}</a>
{{#if internal}}
<span class="icon-lock" title="{{t 'internal'}}"></span>
{{/if}}
</li>
{{/each}}
</ul>
{{else}}
{{#if section.sections}}
{{else}}
<i class="section-empty">
<a href="{{section.url}}">{{t 'empty'}}</a>
</i>
{{/if}}
{{/if}}
<br/>
<section class="categories blocks">
<ul class="blocks-list">
{{#each section.sections}}
<li class="blocks-item">
<a href='{{url}}' class="blocks-item-link">
<h4 class="blocks-item-title">{{name}}</h4>
<p class="blocks-item-description">{{excerpt description}}</p>
</a>
{{#if internal}}
<span class="icon-lock" title="{{t 'internal'}}"></span>
{{/if}}
</li>
{{/each}}
</ul>
</section>
{{pagination}}
</section>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment