feat: add link on news header

This will allow user to be able to link the news.
This commit is contained in:
Adrien Allard 2025-07-18 11:03:09 +02:00
parent c7c5c71814
commit 2cf4eaadf6
2 changed files with 12 additions and 2 deletions

View File

@ -10,10 +10,10 @@
{% for news in glob("news/*.md") | sort(reverse=true, attribute='path') | map('markdown') %}
<div class="news">
<a class="section--anchor" id="{{news.meta.id}}"></a>
<div class="news--header">
<a href="/{{ context.current_language }}/#{{news.meta.id}}" class="news--header-link">
<h3 class="news--date">{{ news.meta.date }}</h3>
<h2 class="news--title">{{ news.meta.title }}</h2>
</div>
</a>
<div class="news--content">
<style>{{ news.meta.css }}</style>
{{ news }}

View File

@ -19,6 +19,16 @@
}
}
&--header-link {
@extend .news--header;
text-decoration: none;
&:hover {
opacity: 1.0;
background: var(--background-dark);
}
}
&--date {
border-right: 2px solid var(--color-on-dark);
padding-right: var(--space-small);