Skip to content

Commit

Permalink
Archive styles
Browse files Browse the repository at this point in the history
  • Loading branch information
hanju-jo committed Oct 6, 2017
1 parent 7856c04 commit 6d7b32b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
16 changes: 6 additions & 10 deletions archive/index.html
Expand Up @@ -8,31 +8,27 @@
<h2>No post found</h2>
{% endif %}

<ul class="archive-list">
<ul class="archive">
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
<h2>{{ post.date | date: '%Y' }}</h2>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }}</h3>
<h2>{{ post.date | date: '%Y' }}</h2>
{% endif %}
{% endunless %}

<li class="archive-list-post">
<li>
{% if post.link %}
<a href="{{ post.link }}">
{% else %}
<a href="{{ site.baseurl }}{{ post.url }}">
{% endif %}
<span class="archive-list-post-title">
{{ post.title }}
</span>
{{ post.title }}
</a>
<span class="archive-list-post-date">
<time>{{ post.date | date:"%b %d" }}</time>
</span>
<time>{{ post.date | date: "%Y-%m-%d" }}</time>
</li>
{% endfor %}
</ul>
13 changes: 13 additions & 0 deletions style.scss
Expand Up @@ -462,6 +462,19 @@ nav {
}
}

// Archive
.archive {
a {
color: $base-color;
}
time {
color: $base-lighten-color;
font-size: $small-font-size;
font-weight: 300;
margin-left: 3px;
}
}

// Tags
.tags > .label {
> li:before {
Expand Down

0 comments on commit 6d7b32b

Please sign in to comment.