feat: add link on news header
This will allow user to be able to link the news.
This commit is contained in:
parent
c7c5c71814
commit
2cf4eaadf6
|
|
@ -10,10 +10,10 @@
|
||||||
{% for news in glob("news/*.md") | sort(reverse=true, attribute='path') | map('markdown') %}
|
{% for news in glob("news/*.md") | sort(reverse=true, attribute='path') | map('markdown') %}
|
||||||
<div class="news">
|
<div class="news">
|
||||||
<a class="section--anchor" id="{{news.meta.id}}"></a>
|
<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>
|
<h3 class="news--date">{{ news.meta.date }}</h3>
|
||||||
<h2 class="news--title">{{ news.meta.title }}</h2>
|
<h2 class="news--title">{{ news.meta.title }}</h2>
|
||||||
</div>
|
</a>
|
||||||
<div class="news--content">
|
<div class="news--content">
|
||||||
<style>{{ news.meta.css }}</style>
|
<style>{{ news.meta.css }}</style>
|
||||||
{{ news }}
|
{{ news }}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--header-link {
|
||||||
|
@extend .news--header;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1.0;
|
||||||
|
background: var(--background-dark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&--date {
|
&--date {
|
||||||
border-right: 2px solid var(--color-on-dark);
|
border-right: 2px solid var(--color-on-dark);
|
||||||
padding-right: var(--space-small);
|
padding-right: var(--space-small);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue