-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
custom-kusi-doc.hbs
69 lines (59 loc) · 2.87 KB
/
custom-kusi-doc.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{{!-- Layout --}}
{{!< default}}
{{!-- Class for <body> --}}
{{#contentFor "special_body_class"}}is-doc is-canvas-full{{/contentFor}}
{{#post}}
<div class="kusi-doc max-w-extreme mx-auto px-4 relative grid gap-2 md:grid-cols-kusi2 lg:grid-cols-kusi3">
{{!-- Navigating the documentation --}}
<nav class="sidebar sticky top-16 py-vmin8 overflow-auto hidden scroll-transparent md:block lg:max-h-(screen-16)">
<div class="uppercase font-medium text-sm mb-3 px-2">{{t "Getting Started"}}</div>
<ul itemscope itemtype="http://www.schema.org/SiteNavigationElement" role="menu" class="leading-tight text-base">
{{#get "posts" filter="tags:{{tags.[0].slug}}" limit="all" order="published_at asc"}}
{{!-- {{#get "posts" filter="tags:{{primary_tag.slug}}" limit="all" order="published_at asc"}} --}}
{{#foreach posts}}
<li itemprop="name" role="menuitem" >
{{#link
href=(url absolute="true")
class="p-2 text-gray-500 hover:text-primary block"
activeClass="text-primary font-medium"
itemprop="url"}}
{{title}}
{{/link}}
</li>
{{/foreach}}
{{/get}}
</ul>
</nav>
{{!-- content of the documentation --}}
<article class="max-w-3xl mx-auto py-vmin8 md:px-4">
<section class="post-body godo-canvas pt-0 font-sans has-sidebar text-base js-kusi-doc">
<h1 id="{{slug}}" class="text-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="post-excerpt text-xl text-gray-500">{{custom_excerpt}}</p>
<hr>
{{/if}}
{{content}}
{{!-- Button to edit on GitHub - add link on Facebook description --}}
{{#if og_description}}
<p class="mt-10">
<a class="edit-on-github godo-tracking button"
href="{{og_description}}"
data-event-category="Kusi Doc"
data-event-action="{{tags.[0].name}}"
data-event-label="{{title}}"
data-event-non-interaction="true">
<svg class="icon mr-2"><use xlink:href="#icon-github"></use></svg>
<span>Edit this page on GitHub</span>
</a>
</p>
{{/if}}
</section>
</article>
{{!-- Table of Contents --}}
<aside class="js-sidebar-right hidden py-vmin8 sticky top-16 overflow-auto scroll-transparent lg:max-h-(screen-16)">
<div class="uppercase font-medium text-sm mb-3">{{t "On this page"}}</div>
<ul class="text-sm js-table-content leading-tight text-gray-500"></ul>
</aside>
</div>
{{/post}}
{{#contentFor "scripts"}}<script src="{{asset "scripts/kusi-doc-post.js"}}"></script>{{/contentFor}}