feat: fix & improve news style
This commit is contained in:
parent
9a92e5c932
commit
93ae2091b6
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
body {
|
||||
font-family: "Montserrat", sans-serif;
|
||||
font-size: var(--fz-4);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
) %}
|
||||
{% for news in glob("news/*.md") | map('markdown') %}
|
||||
<div class="news">
|
||||
<div class="news--title">
|
||||
<h3>{{ news.meta.title }}</h3>
|
||||
<div class="news--header">
|
||||
{% with creation_date = news | git_creation_date %}
|
||||
<div class="news--date">{{ creation_date.strftime('%d/%m/%Y') }}</div>
|
||||
{% endwith %}
|
||||
<h3 class="news--title">{{ news.meta.title }}</h3>
|
||||
</div>
|
||||
<div class="news--content">
|
||||
{{ news }}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,49 @@
|
|||
.news {
|
||||
@extend %card;
|
||||
background: var(--color-on-dark);
|
||||
padding: 0;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: var(--space-medium);
|
||||
|
||||
&--header {
|
||||
display: flex;
|
||||
color: var(--color-on-dark);
|
||||
background: var(--color-dark);
|
||||
padding: var(--space-small) var(--space-medium);
|
||||
align-items: center;
|
||||
gap: var(--space-small);
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
background: center / cover no-repeat url("/img/game-footer.png");
|
||||
height: 13px;
|
||||
@media($mobile-breakpoint) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
&--date {
|
||||
border-right: 2px solid var(--color-on-dark);
|
||||
padding-right: var(--space-small);
|
||||
font-weight: bold;
|
||||
|
||||
@media($mobile-breakpoint) {
|
||||
border-right: 0;
|
||||
border-bottom: 2px solid var(--color-on-dark);
|
||||
|
||||
padding-right: 0;
|
||||
padding-bottom: var(--space-small);
|
||||
}
|
||||
}
|
||||
|
||||
&--title {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
background: var(--dark);
|
||||
color: white;
|
||||
padding: var(--space-small) var(--space-medium);
|
||||
@media ($mobile-breakpoint) {
|
||||
grid-template-columns: auto;
|
||||
grid-template-rows: auto auto;
|
||||
}
|
||||
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&--content {
|
||||
padding: var(--space-large);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background: var(--primary);
|
||||
color: var(--dark);
|
||||
padding: var(--space-large) var(--space-xlarge);
|
||||
|
||||
@media($mobile-breakpoint) {
|
||||
padding: var(--space-medium) var(--space-medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue