Commits

Andrey Vlasovskikh committed 0d005d2

Blog posts archive

Comments (0)

Files changed (3)

+---
+layout: default
+title: Archive
+---
+
+<section id="news" class="hfeed">
+  <h1>{{ page.title }} <a href="/feed.atom"><img src="/media/feed.png" alt="(feed)"/></a></h1>
+  {% for year, year_posts in site.posts|groupby('date.year')|reverse %}
+    <h2>{{ year }}</h2>
+    {% for month, month_posts in year_posts|groupby('date.month')|reverse %}
+      <h3>{{ site.time.strptime(month|string, '%m').strftime('%B') }}</h3>
+      {% for post in month_posts %}
+        <section class="hentry">
+          <div class="published">{{ post.date.strftime('%Y-%m-%d') }}</div>
+          <h4><a href="{{ post.url }}">{{ post.title }}</a></h4>
+        </section>
+      {% endfor %}
+    {% endfor %}
+  {% endfor %}
+</section>
           {% endif %}
         </section>
     {% endfor %}
+    <p><a href="/archive.html">Archive...</a></p>
   </section>
   <div class="break"></div>
   <section>

doc/media/default.css

     margin: 2em auto 1em auto;
 }
 
-h1, h2, h3 {
+h1, h2, h3, h4 {
     font-family: "Ubuntu", "Arial", sans-serif;
     font-weight: normal;
 }
     font-size: 16pt;
 }
 
+h4 {
+    font-size: 14pt;
+}
+
 pre {
     line-height: 1em;
     color: #555544;
     color: #666666;
 }
 
-.hentry h3 {
+.hentry h3, .hentry h4 {
     margin: 0.5em 0;
 }