bifocal/post.hbs

49 lines
1.8 KiB
Handlebars

{{!< default}}
<main class="gh-main gh-outer">
<div class="gh-inner">
{{#post}}
<article class="gh-article {{post_class}}">
<div class="post-card-tags">
{{> "get-meta-tags"}}
</div>
{{#if feature_image}}
<header class="gh-article-header gh-canvas">
<h1 class="gh-article-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="gh-article-excerpt">{{custom_excerpt}}</p>
{{/if}}
</header>
{{/if}}
<section class="gh-content gh-canvas">
<aside class="gh-sidebar"><div class="gh-toc"></div></aside> {{! Table of contents }}
{{content}}
{{#unless feature_image}}
<header class="gh-article-header">
<h1 class="gh-article-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="gh-article-excerpt">{{custom_excerpt}}</p>
{{/if}}
</header>
{{/unless}}
</section>
</article>
{{!-- Adds table of contents unless instructed not to --}}
{{^has tag="#hide toc"}}
<script src="{{asset "js/lib/tocbot.min.js"}}"></script>
<script>
tocbot.init({
tocSelector: '.gh-toc',
contentSelector: '.gh-content',
headingSelector: 'h1, h2',
hasInnerContainers: true,
});
</script>
{{/has}}
{{/post}}
</div>
</main>