forked from HaxeFoundation/code-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout-page-snippet.mtt
146 lines (135 loc) · 9.91 KB
/
layout-page-snippet.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
::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">
::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"::><a href="::page.outputPath::">::page.title::</a>
<ol ::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"::><a href="::page.outputPath::">::page.title::</a></li>
::end::
</ol>
</li>
::end::
</ul>
</li>
<br ::cond !category.isSerie::/>
::end::
</ul>
</nav>
<nav class="span4 sidebar-tags" id="sidebar" ::cond currentPage.customData.tag!=null::>
<h3>All tags</h3>
<ul class="unstyled">
::foreach tag getSortedTags()::
<li ::attr class if(tag==currentPage.customData.tag) "active"::><i class="fa fa-tag"></i> <a href="tag/::tag::.html"><span>::getTagTitle(tag)::</span></a> <small class="category-count">(::tags.get(tag).length::)</small></li>
::end::
</ul>
</nav>
<article class="span8" itemscope="itemscope" itemtype="https://schema.org/Article">
<big class="pull-right"><a href="::currentPage.editUrl::?message=Update:%20::currentPage.title::&description=%0A%0ASources:%0A*%20::currentPage.absoluteUrl::%0A%0A::foreach author currentPage.authors::%40::author.username:: ::end::" title="Edit '::currentPage.title::' on GitHub" rel="external"><i class="fa fa fa-edit"></i></a></big>
<small class="crumb" itemscope="itemscope" itemtype="https://schema.org/BreadcrumbList">
::set isSeriePage = (currentPage.category.isSerie && !currentPage.isSerieHome() && currentPage.category.parent!=null)::
<span itemprop="itemListElement" itemscope="itemscope" itemtype="https://schema.org/ListItem"><a itemprop="name" href="/">Haxe programming cookbook</a><meta itemprop="position" content="1" /></span>
<span itemprop="itemListElement" itemscope="itemscope" itemtype="https://schema.org/ListItem" ::cond isSeriePage ::><a itemprop="name" href="::currentPage.category.parent.outputPath::">::currentPage.category.parent.title::</a><meta itemprop="position" content="1" /></span>
<span itemprop="itemListElement" itemscope="itemscope" itemtype="https://schema.org/ListItem"><a itemprop="name" href="::currentPage.category.outputPath::">::currentPage.category.title::</a><meta itemprop="position" content="::if isSeriePage::3::else::2::end::" /></span>
<span itemprop="itemListElement" itemscope="itemscope" itemtype="https://schema.org/ListItem"><a itemprop="name" href="::currentPage.outputPath::">::currentPage.title::</a><meta itemprop="position" content="::if isSeriePage::4::else::3::end::" /></span>
</small>
<h1><a href="::currentPage.absoluteUrl::" itemprop="url" class="anchorjs-icons"></a> <span itemprop="name">::currentPage.title::</span></h1>
<p class="reading-time" ::cond (readingTime != 0)::>Reading time: ::readingTime:: minute::if (readingTime>1.5)::s::end::</p>
<div itemprop="articleBody">::raw pageContent::</div>
<hr/>
<blockquote class="blockquote author-info">
<div ::cond currentPage.authors.length>0:: class="authors row" itemprop="author" itemscope="itemscope" itemtype="https://schema.org/Person">
<span class="span2">Author:</span>
<div class="span4">::foreach author currentPage.authors::
<a href="::author.profileLink::" rel="external noopener nofollow"><img src="https://github.com/::author.username::.png?size=80" loading="lazy" width="40" height="40" title="::author.name::" /></a>
<a href="::author.profileLink::" itemprop="url" rel="external noopener nofollow" class="author-name"><span itemprop="name">::author.name::</span></a><br/>
::end::
</div>
</div>
<div ::cond currentPage.contributors.length>0:: class="contributors row">
<span class="span2">Contributors:</span>
<div class="span4">::foreach author currentPage.contributors::
::if author.profileLink != null::
<a href="::author.profileLink::" rel="external">
<img src="https://github.com/::author.username::.png?size=40" loading="lazy" width="20" height="20" title="::author.name::" ::cond author.username != null:: />
<img src="https://www.gravatar.com/avatar/::author.hash::.jpg?s=40" loading="lazy" width="20" height="20" title="::author.name::" ::cond author.username == null:: />
</a>
::else::
<img src="https://github.com/::author.username::.png?size=40" loading="lazy" width="20" height="20" title="::author.name::" ::cond author.username != null:: />
<img src="https://www.gravatar.com/avatar/::author.hash::.jpg?s=40" loading="lazy" width="20" height="20" title="::author.name::" ::cond author.username == null:: />
::end::
::if author.profileLink != null::
<a href="::author.profileLink::" rel="external nofollow noopener" class="author-name">::author.name::</a>
::else::
<span class="author-name">::author.name::</span>
::end::
<br/>
::end::
</div>
</div>
<div class="row" ::cond currentPage.dates.modified !=null::><span class="span2">Last modified:</span><time class="span4" datetime="::currentPage.dates.modified::" itemprop="dateModified"><span class="fa fa-clock-o"></span> <a href="::currentPage.commitHistoryUrl::" rel="external">::DateTools.format(currentPage.dates.modified, "%b %d, %Y")::</a></time></div>
<div class="row semantic" ::cond currentPage.dates.created !=null::><span class="span2">Created:</span> <time class="span4" datetime="::currentPage.dates.created::" itemprop="datePublished"><span class="fa fa-clock-o"></span> ::DateTools.format(currentPage.dates.created, "%b %d, %Y")::</time></div>
<div ::cond !currentPage.category.isSerie:: class="row semantic">
<span class="span2">Category:</span>
<span class="span4" itemprop="articleSection"><i class="fa fa-book"></i> <a href="::currentCategory.outputPath::">::currentCategory.title::</a></span>
</div>
<div class="row tags" ::cond currentPage.visible && currentPage.tags!=null && currentPage.tags.length>0::>
<span class="span2">Tags:</span>
<div class="span4">
<span itemprop="keywords">
::foreach tag currentPage.tags::
<span class="tag"><i class="fa fa-tag"></i> <a href="tag/::tag::.html" rel="tag">::tag::</a><i class="semantic" ::cond !repeat.tag.last::>,</i></span>
::end::
</span>
</div>
</div>
</blockquote>
<div ::cond (currentPage.next!=null || currentPage.prev!=null)::>
<hr/>
<ul class="pager">
<li class="previous" ::cond currentPage.prev!=null::><a href="::currentPage.prev.outputPath::">← ::currentPage.prev.title::</a></li>
<li class="previous" ::cond currentPage.prev==null::><a href="::currentPage.category.outputPath::">← ::currentPage.category.title::</a></li>
<li class="next" ::cond currentPage.next!=null::><a href="::currentPage.next.outputPath::">::currentPage.next.title:: →</a></li>
</ul>
</div>
<hr/>
<div class="contribution">
<span><i class="fa fa fa-edit"></i> <a href="::currentPage.editUrl::?message=Update:%20::currentPage.title::&description=%0A%0ASources:%0A*%20::currentPage.absoluteUrl::%0A%0A::foreach author currentPage.authors::%40::author.username:: ::end::" title="Edit '::currentPage.title::' on GitHub" rel="external nofollow noopener">Edit page</a></span>
::if false::<span>| <i class="fa fa-lightbulb-o"></i> <a href="https://github.com/HaxeFoundation/code-cookbook/issues/new?title=Suggestion:%20::currentPage.title::&body=%0A%0ASources:%0A*%20::currentPage.absoluteUrl::%0A*%20::currentPage.contributionUrl::%0A%0A::foreach author currentPage.authors::%40::author.username:: ::end::" title="Create issue about '::currentPage.title::' on GitHub" rel="external nofollow noopener">Suggest improvement / Report issue</a></span> ::end::
<span ::cond !currentPage.category.isSerie::>| <i class="fa fa-plus-circle"></i> <a href="::currentPage.addLinkUrl::" rel="external" title="Add new page in '::currentPage.category.title::' on Github">Add new page</a></span>
</div>
<hr/>
<script src="https://utteranc.es/client.js" repo="HaxeFoundation/haxe.org-comments" branch="master" issue-term="[code.haxe.org] ::currentPage.category.title:: - ::currentPage.title::" async="async"></script>
<center class="share-buttons">
<a href="https://twitter.com/share" class="twitter-share-button" data-hashtags="haxe" data-size="large" rel="external nofollow noopener">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root" style="display:inline-block"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- FB like button code -->
<div class="fb-like" data-href="::currentPage.absoluteUrl::" style="display:inline-block" data-layout="button_count" data-action="like" data-show-faces="true" data-size="large"></div>
</center>
</article>
</section>
</main>
::end::