/
index.html.ep
34 lines (32 loc) · 940 Bytes
/
index.html.ep
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
% for my $page ( @$pages ) {
<article>
% my $doc = $page->document;
<h1><a href="<%= $page->path %>"><%= $doc->title %></a></h1>
<span class="author"><%= $doc->author %></span>
<div class="content">
% my @sections = $page->sections;
<%= $sections[0] %>
% if ( @sections > 1 ) {
<p><a href="<%= $page->path %>#section-2">Continue reading <%= $doc->title %>...</a></p>
% }
</div>
</article>
% }
<h1>Tags</h1>
<ul class="list-inline tags">
% for my $tag ( $app->tags ) {
<li><a href="<%= $tag->href %>"><%= $tag->text %></a></li>
% }
</ul>
% if ( my @links = $self->links( 'feed' ) ) {
<h1>Feeds</h1>
<ul class="list-inline feeds">
% for my $link ( @links ) {
<li>
<a href="<%= $link->href %>" rel="alternate" type="<%= $link->type %>">
<%= $link->text %>
</a>
</li>
% }
</ul>
% }