Issue #2: Add some styling for active latest posts

This commit is contained in:
Oliver Davies 2015-04-01 00:28:53 +01:00
parent 0032e3c00d
commit a0c7381690
6 changed files with 19 additions and 7 deletions

View file

@ -1,9 +1,11 @@
{% if data.posts %} {% if data.posts %}
<h2>Latest Posts</h2> <section class="latest-posts">
<h2>Latest Posts</h2>
<ul> <ul>
{% for post in data.posts | slice(0,5) %} {% for post in data.posts | slice(0,5) %}
<li{% if page.url == post.url %} class="active"{% endif %}><a href="{{ post.url }}">{{ post.title }}</a></li> <li{% if page.url == post.url %} class="active"{% endif %}><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</section>
{% endif %} {% endif %}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
.latest-posts {
li.active a {
color: $dark-gray;
font-weight: $semibold;
}
}

View file

@ -1,5 +1,6 @@
@import 'compass'; @import 'compass';
@import 'bootstrap'; @import 'bootstrap';
@import "variables/**/*";
@import "base/**/*"; @import "base/**/*";
@import "components/**/*"; @import "components/**/*";

View file

@ -0,0 +1 @@
$dark-gray: #333;

View file

@ -0,0 +1,2 @@
// Font weights.
$semibold: 500;