-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout-page-toc.mtt
46 lines (45 loc) · 2.22 KB
/
layout-page-toc.mtt
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
::use 'layout.mtt'::
<header class="hero-unit-small">
<div class="container">
<div class="row">
<div id="title">Haxe Code Cookbook</div>
</div>
</div>
</header>
<main class="container">
<section class="row">
<nav class="span4 sidebar-toc" id="sidebar" ::cond currentPage.customData.tag==null::>
<h3>Table of contents</h3>
<ul class="unstyled" itemscope="itemscope" itemtype="http://schema.org/BreadcrumbList">
::foreach category sitemap::
<li ::cond !category.isSerie::><a href="::category.outputPath::" ::attr class if(category==currentCategory) "active"::>::category.title::</a>
<ul class="unstyled" >
::foreach page category.pages::
<li ::cond page.visible:: ::attr class if(page==currentPage) "active":: itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"><a href="::page.outputPath::" itemprop="item"><span itemprop="name">::page.title::</span></a>
<ol itemscope="itemscope" itemtype="http://schema.org/BreadcrumbList" ::cond page.category.isSerie && page.category==currentPage.category::>
::foreach page page.category.pages::
<li ::cond page.visible && !page.isSerieHome():: ::attr class if(page==currentPage) "active":: itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"><a href="::page.outputPath::" itemprop="item"><span itemprop="name">::page.title::</span></a></li>
::end::
</ol>
</li>
::end::
</ul>
</li>
<br/>
::end::
</ul>
</nav>
<nav class="span4 sidebar-tags" id="sidebar" ::cond currentPage.customData.tag!=null::>
<h3>All tags</h3>
<ul class="unstyled" itemscope="itemscope" itemtype="http://schema.org/BreadcrumbList">
::foreach tag tags.keys()::
<li ::attr class if(tag==currentPage.customData.tag) "active":: itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem"><i class="fa fa-tag"></i> <a href="tag/::tag::.html" rel="tag" itemprop="item"><span itemprop="name">::getTagTitle(tag)::</span></a> <small class="category-count">(::tags.get(tag).length::)</small></li>
::end::
</ul>
</nav>
<article class="span8">
<div itemprop="articleBody">::raw pageContent::</div>
</article>
</section>
</main>
::end::