-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tt
126 lines (123 loc) · 4.64 KB
/
index.tt
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
[% MACRO panel_body(source, entry) BLOCK;
IF source == 'twitter' or source == 'cpan' or source == 'last.fm';
'';
ELSE;
' <div class="card-body">' _
entry.content.body _
' </div><!-- card-body -->';
END;
END -%]
<!DOCTYPE html>
<html>
<head>
[% IF config.google_ga -%]
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-L9WV4KKVGH"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-L9WV4KKVGH');
</script>
[% END -%]
<title>[% feed.title %]</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN"
crossorigin="anonymous">
<link rel="alternate" type="application/atom+xml" title="Atom" href="[% config.url %][% config.feed.fil.split('/').last %]" />
<style type="text/css">
body {
padding-top: 75px;
}
.card img {
max-width: 100%;
object-fit: scale-down;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top">
<div class="container">
<div class="d-flex justify-content-between">
<button type="button" class="navbar-toggler collapsed" data-bs-toggle="collapse" data-bs-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="visually-hidden">Toggle navigation</span>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand mb-0 h1" href="#">[% feed.title | html %]</a>
</div>
<!-- div id="navbar" class="collapse navbar-collapse justify-content-end">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div --><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-2">
<h2>sources</h2>
<ul>
[% FOR f IN config.feeds;
bits = f.title.split(':\s*') -%]
<li><a href="[% f.web | html %]">[% bits.0 %]</a></li>
[% END -%]
</ul>
<p><a href="/atom.xml"><img alt="Feed" src="feed.gif" /> Subscribe</a>
<br />
<a href="/opml.xml"><img alt="OPML" src="opml.png" /> OPML</a></p>
<p>Powered by <a href="https://metacpan.org/release/Perlanet">Perlanet</a></p>
</div><!-- col-2 -->
<div class="col-8">
[% FOREACH entry IN feed.entries -%]
<div class="card mb-3">
[% feedname = entry.feed.title; -%]
<div class="card-header">
<h2><a href="[% entry.link %]">[% entry.title | html %]</a></h2>
</div><!-- card-header -->
[% panel_body(feedname, entry) %]
[% IF feedname OR entry.author OR entry.issued OR entry.modified;
entry_date = entry.issued OR entry.modified; -%]
<div class="card-footer">
[% IF feedname %]<span class="badge bg-secondary me-2" style="float: left">[% feedname %]</span>[% END %]
[% IF entry.author OR entry.issued OR entry.modified;
entry_date = entry.issued OR entry.modified; %]
<p class="text-end"><small>Published[% IF entry.author %] by [% entry.author | html; END %]
[% IF entry_date %] on [% entry_date.strftime('%A %d %B %Y %H:%M'); END %]</small></p>
[% END -%]
</div><!-- card-footer -->
[% END -%]
</div><!-- card -->
[% END %]
</div><!-- col-8 -->
<div id="col-1">
<script type="text/javascript"><!--
google_ad_client = "pub-3663319204757145";
/* planet */
google_ad_slot = "8413744374";
google_ad_width = 120;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div><!-- col-1 -->
</div><!-- row -->
<div class="row">
<div class="col-10">
<address><a href="mailto:[% config.author.email %]">[% config.author.name | html %]</a> / [% feed.modified.strftime('%A %d %B %Y %H:%M') %]</address>
</div><!-- col-10 -->
</div><!-- row -->
</div><!-- container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js"
integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+"
crossorigin="anonymous"></script>
</body>
</html>