12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <!-- each category page -->
- {% if page.type %}
- <div class="archive">
- <p class="archive_type">{{ page.type }}</p>
- <ul>
- {% for post in site.categories[page.type] %}
- {% if post.url %}
- <li>
- <time class='archive_date' datetime='{{ post.date | date_to_xmlschema }}'>
- {{ post.date | date: "%b %-d, %Y" }}
- </time>
- <div class='archive_title'>
- <a href='{{ post.url | relative_url }}'>
- {{ post.title | escape }}
- </a>
- </div>
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- </div>
- <!-- main page -->
- {% else %}
- <div class="archive">
- {% for post in site.posts %}
- {% unless post.next %}
- <p class="archive_year">{{ post.date | date: '%Y' }}</p>
- {% else %}
- {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
- {% capture nextyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
- {% if year != nextyear %}
- <p class="archive_year">{{ post.date | date: '%Y' }}</p>
- {% endif %}
- {% endunless %}
- <ul>
- <li>
- <time class='archive_date' datetime='{{ post.date | date_to_xmlschema }}'>
- {{ post.date | date: "%b %d" }}
- </time>
- <div class='archive_title'>
- <a href='{{ post.url | relative_url }}'>
- {{ post.title | escape }}
- </a>
- </div>
- </li>
- </ul>
- {% endfor %}
- </div>
- {% endif %}
|