Update style and pages of blog
[blog.git] / _layouts / year-archive.html
index de8d7da..0caebfe 100644 (file)
@@ -4,11 +4,18 @@ title: Archive of posts
 ---
 <h1>Archive of posts from {{ page.date | date: "%Y" }}</h1>
 
-<ul class="posts">
+<table>
+  <tbody>
   {% for post in page.posts %}
-  <li>
-    <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
-    <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title | markdownify }}</a>
-  </li>
+  {% assign loopindex = forloop.index | modulo: 2 %}
+    {% if loopindex == 1 %}
+      <tr class="odd">
+    {% else %}
+      <tr class="even">
+    {% endif %}
+        <td class="postdate"><time datetime="{{post.date | date_to_xmlschema}}">{{ post.date | date: "%d. %B" }}</time></td>
+        <td class="postlink"><a href="{{ post.url }}">{{ post.title | markdownify }}</a></td>
+      </tr>
   {% endfor %}
-</ul>
\ No newline at end of file
+  </tbody>
+</table>