-
Notifications
You must be signed in to change notification settings - Fork 39
/
theme.html
273 lines (230 loc) · 8.51 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
<!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 IE 7]>
<link href="http://postach.io/static/themes/_assets/fontawesome/css/font-awesome-ie7.min.css" rel="stylesheet">
<![endif]-->
<!--
<style>
/**
* Your custom override CSS goes here. If you wanted to override the default link colour and hover state, you would do this:
*
* a {
* color: #333; /* Override the default colour with a not-quite-black that is easy on the eyes on white screens */
* }
*
* a:hover {
* color: #545454; /* This will now change the hover state as well */
* }
*
* You can put anything you want to override in here, so be creative!
*/
</style>
-->
{% 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 %}
<h1>cur8r</h1>
<div class="wrapper">
{% if is_home or is_tag %}
{% if posts %}
<div class="post-wrapper">
{% if is_tag %}
<h4 class="tag-header">Showing all posts tagged as {{ tag }}:</h4>
{% endif %}
{% for post in posts %}
<div class="post-fragment">
{% if post.photos %}
{% for photo in post.photos %}
{% if loop.index == 1 %}
<div class="post-image">
{% if post.type == 'link' %}
<a href="{{ post.url }}" target="_blank">
{% else %}
<a href="{{ post.permalink }}">
{% endif %}
{% if photo %}
<img src="{{ photo.width_600 }}" />
{% else %}
<img src="http://placehold.it/400x300/0eafff/ffffff.png" alt="" />
{% endif %}
</a>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% if post.type == 'link' %}
<div class="post-details">
<h2><a href="{{ post.url }}" target="_blank">{{ post.title|truncate(40, False, '...') }}</a></h2>
</div>
{% else %}
<div class="post-details">
<h2><a href="{{ post.permalink }}">{{ post.title|truncate(40, False, '...') }}</a></h2>
</div>
{% endif %}
<ul class="tags">
{% if post.tags %}
{% for tag in post.tags %}
{% if loop.index <= 3 %}
<li><a href="/tag/{{ tag }}" class="tag">{{ tag }}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
<!--
<div class="post-body">
{% if post.content|striptags|wordcount > 0 %}
<p>{{ post.content|striptags|truncate(300) }}</p>
{% endif %}
</div>
-->
</div>
{% endfor %}
</div><!-- end post wrapper -->
{% endif %}
{% if not is_tag and posts|length >= 9 %}
<div class="pagination">
{% if pagination.prev %}<a href="{{ pagination.prev }}" class="post-prev">« Prev</a>{% endif %}
{% if pagination.next %}<a href="{{ pagination.next }}" class="post-next">Next »</a>{% endif %}
</div>
{% endif %}
{% elif post %}
<div class="post-wrapper">
<div class="post">
<h2>{{ post.title }}</h2>
<div class="post-body">
<div class="post-content" data-type-cleanup="true">
{{ post.content }}
</div>
{% if post.type == 'link' or post.type == 'webclip' %}
<p><a href="{{ post.url }}"><span class="typcn typcn-link"></span> {{ post.url }}</a></p>
{% endif %}
</div>
{% if post.tags %}
<ul class="tags">
{% for tag in post.tags %}
<li><a href="/tag/{{ tag }}">{{ tag }}</a></li>
{% endfor %}
</ul>
{% endif %}
<div class="post-info">
<div class="info-left">
{{ theme.social.bar }}
</div>
<div class="info-right">
<p class="date"><span class="typcn typcn-calender"></span> {{ post.created_at|format_date }}</p>
</div>
</div>
{% if site.disqus %}
<div class="post-comments">
<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>
</div>
{% endif %}
</div>
</div>
<div class="pagination">
<a href="/" class="post-prev">« Back Home</a>
</div>
{% elif post.type == 'page' %}
<div class="post-wrapper">
<div class="post">
<h2><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
<div class="post-body">
<div class="post-content" data-type-cleanup="true">
{{ page.content }}
</div>
</div>
</div>
</div>
{% endif %}
<div class="right">
<h2><img src="{{ site.avatar }}" class="avatar" /></h2>
<h3>{{ site.name }}</h3>
<p class="bio">{{ site.bio }}</p>
</div>
<div class="header">
<h1 class="logo"><a href="/">{{ site.name }}</a></h1>
<ul class="nav">
{% if pages %}
{% for page in pages %}
<li><a href="{{ page.permalink }}" class="{{ set_active(page.permalink) }}">{{ page.title }}</a></li>
{% endfor %}
{% endif %}
</ul>
<ul class="social">
{% if site.twitter %}
<li><a href="{{ site.twitter }}" target="_blank"><span class="typcn typcn-social-twitter"></span></a></li>
{% endif %}
{% if site.facebook %}
<li><a href="{{ site.facebook }}"><span class="typcn typcn-social-facebook"></span></a></li>
{% endif %}
{% if site.linkedin %}
<li><a href="{{ site.linkedin }}"><span class="typcn typcn-social-linkedin"></span></a></li>
{% endif %}
<li><a href="{{ site.atom_url }}"><span class="typcn typcn-rss"></span></a></li>
</ul>
</div>
<div class="mobile-nav">
<a href="#" class="toggle"><span class="typcn typcn-th-menu"></span></a>
<ul>
{% if pages %}
{% for page in pages %}
<li><a href="{{ page.permalink }}" class="{{ set_active(page.permalink) }}">{{ page.title }}</a></li>
{% endfor %}
{% endif %}
{% if site.twitter %}
<li><a href="{{ site.twitter }}" target="_blank"><span class="typcn typcn-social-twitter"></span> Twitter</a></li>
{% endif %}
{% if site.facebook %}
<li><a href="{{ site.facebook }}"><span class="typcn typcn-social-facebook"></span> Facebook</a></li>
{% endif %}
{% if site.linkedin %}
<li><a href="{{ site.linkedin }}"><span class="typcn typcn-social-linkedin"></span> LinkedIn</a></li>
{% endif %}
<li><a href="{{ site.atom_url }}"><span class="typcn typcn-rss"></span> RSS</a></li>
</ul>
</div>
</div><!-- end wrapper -->
{% endif %}
{{ footer_meta }}
<script>
$('a.toggle').on('click', function() {
$('div.mobile-nav ul').toggle('fast', function() {});
});
</script>
</body>
</html>