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