Highlight latest post when link is clicked

This commit is contained in:
Philipp Oppermann
2015-10-04 20:21:26 +02:00
parent 445b50ce77
commit e24f30d86c
2 changed files with 31 additions and 1 deletions

View File

@@ -4,7 +4,9 @@ title: Home
---
<div class="newest-post">
<emph>Latest Post</emph>: {% for post in site.categories.rust-os limit:1 %}
<strong><a href="#{{ post.id }}">{{post.title}}</a></strong>
<strong><a href="#{{ post.id }}" onclick="
document.getElementById('{{ post.id }}').className += ' updated';
">{{post.title}}</a></strong>
{% endfor %}
</div>