-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnews.html
50 lines (49 loc) · 1.34 KB
/
news.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
---
layout: main
menu: news
corners: orange
---
<div id="precontentbar" class="bar">
<a href="/feed.xml" target="_blank">
<div id="rss"></div>
</a>
</div>
<article class="intro">
{% for post in site.posts %}
{% if post.categories contains "intro" %}
<header>{{ post.title }}</header>
{{ post.content }}
{% endif %}
{% endfor %}
</article>
{% capture current_year %}{{site.time | date: "%Y"}}{% endcapture %}
{% capture current_year %}2012{% endcapture %}
{% for post in site.posts %}
{% capture post_age %}{{post.date | date: "%Y" | minus: current_year}}{% endcapture %}
{% if ((post.categories contains "news") and (post_age == "0")) or (post.categories contains "noarchive") %}
{% include smallpost.html %}
{% endif %}
{% endfor %}
<dl class="accordion closed">
<dt>
<div>Archiv</div>
</dt>
<dd>
<dl class="accordion">
{% capture last_year %}{{site.time | date: "%Y" | minus: 1}}{% endcapture %}
{% for year in (2010..last_year) %}
<dt>
<div>{{year}}</div>
</dt>
<dd>
{% for post in site.posts %}
{% capture post_age %}{{ post.date | date: "%Y" | minus: year }}{% endcapture %}
{% if (post_age == "0") and ((post.categories contains "news") or post.categories contains "archiv")) %}
{% include smallpost.html %}
{% endif %}
{% endfor %}
</dd>
{% endfor %}
</dl>
</dd>
</dl>