mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Highlight latest post when link is clicked
This commit is contained in:
@@ -13,3 +13,31 @@
|
|||||||
footer {
|
footer {
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.updated {
|
||||||
|
-webkit-animation: fadeIt 3s ease-in-out;
|
||||||
|
-moz-animation: fadeIt 3s ease-in-out;
|
||||||
|
-o-animation: fadeIt 3s ease-in-out;
|
||||||
|
animation: fadeIt 3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes fadeIt {
|
||||||
|
0% { background-color: #FFFFFF; }
|
||||||
|
15% { background-color: #ff7; }
|
||||||
|
100% { background-color: #FFFFFF; }
|
||||||
|
}
|
||||||
|
@-moz-keyframes fadeIt {
|
||||||
|
0% { background-color: #FFFFFF; }
|
||||||
|
15% { background-color: #ff7; }
|
||||||
|
100% { background-color: #FFFFFF; }
|
||||||
|
}
|
||||||
|
@-o-keyframes fadeIt {
|
||||||
|
0% { background-color: #FFFFFF; }
|
||||||
|
15% { background-color: #ff7; }
|
||||||
|
100% { background-color: #FFFFFF; }
|
||||||
|
}
|
||||||
|
@keyframes fadeIt {
|
||||||
|
0% { background-color: #FFFFFF; }
|
||||||
|
15% { background-color: #ff7; }
|
||||||
|
100% { background-color: #FFFFFF; }
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ title: Home
|
|||||||
---
|
---
|
||||||
<div class="newest-post">
|
<div class="newest-post">
|
||||||
<emph>Latest Post</emph>: {% for post in site.categories.rust-os limit:1 %}
|
<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 %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user