-
Notifications
You must be signed in to change notification settings - Fork 32
/
templates_tabs.html
61 lines (44 loc) · 1.3 KB
/
templates_tabs.html
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
<template name="basicTabs">
<div class="basicTabs-container {{name}}">
<!-- Allow for the active tab to be specified in a parent helper -->
{{#if activeTab}}
{{trackActiveTab activeTab}}
{{/if}}
<ul class="tabs-list">
{{#each tabs}}
<li class="tab-item {{isActiveTab slug}} {{class}}">{{name}}</li>
{{/each}}
</ul>
<div class="tabs-content-container">
<!-- Pass interface context to tab instances -->
{{> UI.contentBlock
context=__context__
}}
</div>
</div>
</template>
<template name="dynamicTabs">
<div class="dynamicTabs-container {{name}}">
<!-- These keep the instance synced with the parent's reactive data -->
{{#if activeTab}}
{{trackActiveTab activeTab}}
{{/if}}
{{trackTabs tabs}}
<ul class="tabs-list">
{{#each tabs}}
<li class="tab-item {{isActiveTab slug}} {{class}}">{{name}}</li>
{{/each}}
</ul>
<div class="tabs-content-container">
<!-- Pass interface context to tab instances -->
{{> UI.contentBlock
context=__context__
}}
</div>
</div>
</template>
<template name="tabContent">
<section style="display:none" class="tabs-content {{isActiveTab slug}}" data-tab={{slug}}>
{{> UI.contentBlock}}
</section>
</template>