summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sass/parts/_archive.scss40
-rw-r--r--source/_includes/archive_post.html28
-rw-r--r--source/_layouts/category_index.html15
-rw-r--r--source/blog/archives/index.html11
4 files changed, 37 insertions, 57 deletions
diff --git a/sass/parts/_archive.scss b/sass/parts/_archive.scss
index 4d06f08..1a2009c 100644
--- a/sass/parts/_archive.scss
+++ b/sass/parts/_archive.scss
@@ -1,24 +1,15 @@
-section.archive{
+.archives{
position: relative;
- &:first-of-type{
- border-top: 1px solid $color-gray05;
- article.archive{
- border-top: none;
- }
- h1.archive-title{
- border-top: none;
- &:before{
- border-top: none;
- }
- }
- }
&:last-of-type{
- border-bottom: 1px solid $color-gray04;
- article.archive{
- border-bottom: none;
+ &:before{
+ content: "";
+ position: absolute;
+ bottom: 0;
+ width: 200px;
+ border-top: 1px solid $color-gray04;
}
}
- h1.archive-title{
+ .year{
line-height: 35px;
width: 200px;
position: absolute;
@@ -35,21 +26,18 @@ section.archive{
@media screen and (max-width: 600px){
position: relative;
width: 100%;
- & + article.archive{
- border-top: none;
- h1{
- padding-top: 15px;
- }
- }
}
}
- article.archive{
+ article{
margin-left: 200px;
@media screen and (max-width: 600px){
margin-left: 0;
- padding: 15px 0;
+ &:first-of-type{
+ border-top: none;
+ padding-top: 30px;
+ }
}
- h1{
+ .title{
margin-bottom: 0;
}
.meta{
diff --git a/source/_includes/archive_post.html b/source/_includes/archive_post.html
index 8ceae91..2b006f6 100644
--- a/source/_includes/archive_post.html
+++ b/source/_includes/archive_post.html
@@ -1,9 +1,19 @@
-{% capture category %}{{ post.categories | size }}{% endcapture %}
-<h1 class="title"><a href="{{ root_url }}{{ post.url }}">{{post.title}}</a></h1>
-<div class="meta">
- <span class="date">{{ post.date | date: "%b %e" }}</span>
- <span class="tags">{% include post/categories.html %}</span>
- {% if site.disqus_short_name and post.comments == true %}
- <span class="comments"><a href="{{ root_url }}{{ post.url }}#disqus_thread">Comments</a></span>
- {% endif %}
-</div> \ No newline at end of file
+{% capture date %}{{ post.date }}{% endcapture %}
+{% capture this_year %}{{ date | date: "%Y" }}{% endcapture %}
+{% unless year == this_year %}
+ {% assign year = this_year %}
+ {% unless forloop.first %}
+ </section>
+ {% endunless %}
+ <section class="archives"><h1 class="year">{{ date | date: "%Y" }}</h1>
+{% endunless %}
+<article>
+ <h1 class="title"><a href="{{ root_url }}{{ post.url }}">{{post.title}}</a></h1>
+ <div class="meta">
+ <span class="date">{{ date | date: "%b %e" }}</span>
+ <span class="tags">{% include post/categories.html %}</span>
+ {% if site.disqus_short_name and post.comments == true and site.disqus_show_comment_count == true %}
+ <span class="comments"><a href="{{ root_url }}{{ post.url }}#disqus_thread">Comments</a></span>
+ {% endif %}
+ </div>
+</article> \ No newline at end of file
diff --git a/source/_layouts/category_index.html b/source/_layouts/category_index.html
index 7e64ebe..0c16ef3 100644
--- a/source/_layouts/category_index.html
+++ b/source/_layouts/category_index.html
@@ -2,15 +2,6 @@
layout: default
---
-{% for post in site.categories[page.category] %}
-<section class="archive">
- {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
- {% unless year == this_year %}
- {% assign year = this_year %}
- <h1 class="archive-title">{{ year }}</h1>
- {% endunless %}
- <article class="archive">
- {% include archive_post.html %}
- </article>
-</section>
-{% endfor %}
+{% for post in site.posts reverse %}
+ {% include archive_post.html %}
+{% endfor %} \ No newline at end of file
diff --git a/source/blog/archives/index.html b/source/blog/archives/index.html
index 8c58fea..e4bc23c 100644
--- a/source/blog/archives/index.html
+++ b/source/blog/archives/index.html
@@ -4,14 +4,5 @@ title: Blog Archives
---
{% for post in site.posts reverse %}
-<section class="archive">
- {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
- {% unless year == this_year %}
- {% assign year = this_year %}
- <h1 class="archive-title">{{ year }}</h1>
- {% endunless %}
- <article class="archive">
- {% include archive_post.html %}
- </article>
-</section>
+ {% include archive_post.html %}
{% endfor %} \ No newline at end of file