Hello everybody!
I am creating a super minimalist theme and one of the main distinctive features is that the entire list of posts is found on every page, wherever you go, hidden in <details>
. This means that if you open a post, you can still find a link to it in the bottom of the page, amongst other links to all posts. So I want to make this one particular link stand out.
I have a {{#foreach}}
to iterate over all posts and then display them like this (with other formatting features, of course)
<a href="{{url absolute="true"}}">
<p>{{title}}</p>
<hr>
<time>{{date format="D"}}</time>
</a>
I want to insert a current
class or something in <a>
if the link goes to the post that is currently open, so that it doesn’t get lost in the long list and to aid the navigation.
I tried some ideas with {{#match}}
and {{has}}
, but nothing worked
Do you know how I can implement that? Am I missing something basic?
Thanks a lot! Have a nice day, people