forked from postachio/theme-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.html
281 lines (262 loc) · 11 KB
/
theme.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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" xmlns:og="http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<title>
{% if is_login %}Login
{% elif is_home %}{{ site.author }}
{% elif is_tag %}{{ tag }}
{% elif post %}{{ post.title }}
{% endif %}
| {{ site.name }}
</title>
{{ header_meta }}
<link href="{{ assets('css/style.css') }}" rel="stylesheet" />
{% if site.analytics %}
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.analytics }}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
</head>
<body>
{% if is_login %}
{{ login_form }}
{% else %}
<div class="container">
<div class="row">
<div class="twelve columns">
<div class="site-header">
<div class="header-top">
<a href="/">
<img src="{{ site.cover_photo }}">
</a>
</div>
<nav class="site-nav">
<ul class="nav-menu">
<li><a href="/">Home</a></li>
{% if pages %}
{% for page in pages %}
<li><a href="{{ page.permalink }}" class="{{ set_active(page.permalink) }}">{{ page.title }}</a></li>
{% endfor %}
{% endif %}
</ul>
</nav>
</div>
<div class="site-content">
{% if is_home or is_tag %}
{% if is_tag %}
<h2 class="tag-header">Showing all posts tagged {{ tag }}:</h2>
{% endif %}
{% if posts %}
<section itemscope itemtype="http://schema.org/Blog" class="blog-feed">
{% for post in posts %}
<article itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting" class="blog-post feed-item">
<header class="post-header">
<h2 class="post-title">
<a href="{{ post.permalink }}">{{ post.title }}</a>
</h2>
<div class="post-metadata">
<div class="left">
<p class="post-byline">Published by {{ site.author }}</p>
<p><time datetime="{{ post.created_at }}" class="post-date">{{ post.created_at|date_format }}</time></p>
</div>
<div class="right">
<p class="post-comment-count">
<a href="{{ post.permalink }}{% if site.disqus %}{% endif %}" class='dsq-comment-count comment-link commentslink'></a>
</p>
<p><a href="{{ post.permalink }}" class="post-permalink">Permalink</a></p>
</div>
</div>
</header>
<div class="post-body">
<div class="post-content">
<div data-type-cleanup="true">
{{ post.content }}
</div>
{% if post.type == 'link' or post.type == 'webclip' %}
<span class="post-link-url"><i class="icon-share"></i> <a href="{{ post.url }}" target="_blank">{{ post.url }}</a></span>
{% endif %}
</div>
{% if post.tags %}
<div class="post-tags">
{{ post.tags }}
{{- post.tags|format_tags(humanize=True) -}}
</div>
{% endif %}
</div>
</article>
{% endfor %}
</section>
{% if site.disqus %}
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
{% endif %}
{% else %}
<div class="blog-feed">
<h2 class="title"><em>No posts yet :(</em></h2>
</div>
{% endif %}
{% if not is_tag and posts %}
{% if pagination.prev or pagination.next %}
<div class="blog-pagination">
{% if pagination.prev %}<a href="{{ pagination.prev }}" title="Newer Posts" class="pagination-newer">← Newer Posts</a>{% endif %}
{% if pagination.next %}<a href="{{ pagination.next }}" title="Previous Posts" class="pagination-older">Previous Posts →</a>{% endif %}
</div>
{% endif %}
{% endif %}
{% elif post %}
<article itemscope itemtype="http://schema.org/BlogPosting" class="blog-post post-single">
<section class="post-body">
<header class="post-header">
<div class="header-top">
<h1 class="post-title">{{ post.title }}</h1>
</div>
<div class="post-metadata">
<p class="post-byline left">Published by {{ site.author }}</p>
<p class="right"><time datetime="{{ post.created_at }}" class="post-date">{{ post.created_at|date_format }}</time></p>
</div>
</header>
<div class="post-content">
<div data-type-cleanup="true">
{{ post.content }}
</div>
{% if post.type == 'link' or post.type == 'webclip' %}
<span class="post-link-url"><i class="icon-share"></i> <a href="{{ post.url }}" target="_blank">{{ post.url }}</a></span>
{% endif %}
</div>
{{ theme.social.bar }}
{% if post.tags %}
<div class="post-tags">
{{- post.tags|format_tags(humanize=True) -}}
</div>
{% endif %}
</section>
{% if site.disqus %}
<section class="comments">
<hr class="large" />
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus }}';
var disqus_url = '{{site.base_url}}{{ post.permalink }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
{% endif %}
</article>
{% elif post.type == 'page' %}
<div class="blog-page">
<h1 class="page-title">{{ page.title }}</h1>
<div class="page-content" data-type-cleanup="true">
{{ page.content }}
</div>
</div>
{% endif %}
</div>
<div class="site-footer">
<p>All rights Reserved © <a href="/">{{ site.name }}</a>.</p>
<br />
<p>Theme inspired by <a href="http://www.fabthemes.com/binary/" target="_blank">Fabthemes</a> | Powered by <a href="http://postach.io/">Postach.io</a></p>
</div>
</div>
<div class="four columns">
<div class="sidebar">
<div class="widget widget-about">
<h2 class="widget-title"><a href="/">{{ site.author }}</a></h2>
<div class="widget-content">
<div class="avatar">
<img src="{{ site.avatar }}" alt="{{ site.author }}" />
</div>
<p>{{ site.bio }}</p>
<ul class="social-links">
{% if site.twitter %}
<li>
<a href="{{ site.twitter }}" title="Twitter" target="_blank">
<i class="icon-twitter"></i>
</a>
</li>
{% endif %}
{% if site.facebook %}
<li>
<a href="{{ site.facebook }}" title="Facebook" target="_blank">
<i class="icon-facebook"></i>
</a>
</li>
{% endif %}
{% if site.googleplus %}
<li>
<a href="{{ site.googleplus }}?rel=author" title="Google+" target="_blank">
<i class="icon-google-plus"></i>
</a>
</li>
{% endif %}
{% if site.linkedin %}
<li>
<a href="{{ site.linkedin }}" title="LinkedIn" target="_blank">
<i class="icon-linkedin"></i>
</a>
</li>
{% endif %}
<li>
<a href="{{ site.atom_url }}" title="RSS" target="_blank">
<i class="icon-rss"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="widget widget-latestposts">
<h2 class="widget-title">Latest Posts</h2>
<div class="widget-content popular-posts">
{% if posts_recent %}
<ul>
{% for post in posts_recent %}
{% if loop.index <= 5 and loop.index > 0 %}
<li><a href="{{ post.permalink }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<div class="widget widget-tagcloud">
<h2 class="widget-title">Tag Cloud</h2>
<div class="widget-content tag-cloud">
{% if site.tags %}
{{ site.tags }}
<ul>
{% for tag in site.tags %}
<li><a href="/tag/{{ tag.name }}">#{{ tag.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{{ footer_meta }}
</body>
</html>