add v5.0.1
[qemu-web.git] / _includes / sidebar.html
1
2 <!-- Sidebar -->
3 <div id="sidebar">
4 <div class="container">
5 <section>
6 <header>
7 <h1>Recent Posts</h1>
8 </header>
9 <ul class="style">
10 {% for post in site.posts offset: 0 limit: 2 %}
11 <li>
12 <a href="{{ site.prefix }}{{ post.url }}">{{ post.title }}</a><br/>
13 <span class="posted">{{ post.date | date_to_string }}</span>
14 </li>
15 {% endfor %}
16 </ul>
17 </section>
18
19
20 <section>
21 <header>
22 <h1>Archives</h1>
23 </header>
24 <ul class="style">
25 {% assign counter = 0 %}
26 {% assign thisurl = "" %}
27 {% assign thisdate = "" %}
28 {% for post in site.posts %}
29 {% assign prevurl = thisurl %}
30 {% assign prevdate = thisdate %}
31 {% assign thisurl = post.date | date: "%Y/%m" %}
32 {% assign thisdate = post.date | date: "%B %Y" %}
33 {% if thisurl != prevurl and prevurl != "" %}
34 <li><a href="/blog/{{ prevurl }}/">{{ prevdate }} ({{ counter }})</a></li>
35 {% assign counter = 0 %}
36 {% endif %}
37 {% assign counter = counter | plus: 1 %}
38 {% endfor %}
39 <li><a href="/blog/{{ thisurl }}/">{{ thisdate }} ({{ counter }})</a></li>
40 </ul>
41 </section>
42 </div>
43 </div>