-
Notifications
You must be signed in to change notification settings - Fork 0
/
section_page.hbs
84 lines (76 loc) · 2.64 KB
/
section_page.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<section class="section hero hero-small">
<header class="hero-inner">
<div class="hero-inner-search">
{{search submit=false scoped=settings.scoped_kb_search class="search search-full" placeholder="Search knowledge base..."}}
</div>
</header>
</section>
<div class="container">
<nav class="sub-nav">
{{breadcrumbs}}
</nav>
<div class="section-container">
<section class="section-content">
<header class="section-header page-header">
<h1>
{{#is section.name 'Getting started'}}
<i class=" fas fa-rocket" style="color:#74BF95;"></i>
{{/is}}
{{section.name}}
</h1>
{{#if settings.show_follow_section}}
{{subscribe}}
{{/if}}
{{#if section.description}}
<p class="page-header-description">{{section.description}}</p>
{{/if}}
</header>
{{#if section.sections}}
<ul class="section-list section-list--collapsed">
{{#each section.sections}}
<li class="section-list-item">
<a href="{{url}}">
<span>{{name}}</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16"
aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2"
d="M5 14.5l6.1-6.1c.2-.2.2-.5 0-.7L5 1.5" />
</svg>
</a>
</li>
{{/each}}
<a tabindex="0" class="see-all-sections-trigger" aria-hidden="true" id="see-all-sections-trigger"
title="{{t 'see_all_sections'}}">{{t 'see_all_sections'}}</a>
</ul>
{{/if}}
{{#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}}
<i class="section-empty">
<a href="{{section.url}}">{{t 'empty'}}</a>
</i>
{{/if}}
{{pagination}}
</section>
</div>
</div>
{{!-- get category name and add to search bar placeholder --}}
{{#if settings.scoped_kb_search}}
<script>
var breadcrumbs = document.getElementsByClassName("breadcrumbs");
var categoryName = breadcrumbs[0].children[1].title;
document.getElementById("query").placeholder = "Search " + categoryName + "...";
</script>
{{/if}}