adjust news article list for mobile

This commit is contained in:
elise
2024-07-10 17:10:51 +02:00
parent 77a356834c
commit f77a4ee943
2 changed files with 66 additions and 0 deletions

View File

@ -35,3 +35,31 @@
.lead {
font-size: var(--font-size-caption);
}
@media (max-width: 600px) {
.newsItem {
display: grid;
grid-template-columns: auto 1fr;
column-gap: 1rem;
}
.image {
width: 10rem;
height: 10rem;
}
.text {
padding-top: 0;
max-height: 10rem;
overflow: hidden;
position: relative;
&:after {
content: "";
background-image: linear-gradient(to top, var(--color-background), transparent);
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 4rem;
pointer-events: none;
}
}
}

View File

@ -53,3 +53,41 @@
}
}
}
@media (max-width: 900px) {
.newsList, .newsList.featured {
li {
grid-column: span 6;
&:nth-child(1),
&:nth-child(2),
&:nth-child(3),
&:nth-child(4),
&:nth-child(5){
grid-column: span 6;
h2 {
font-size: 1.4rem;
}
}
}
}
}
@media (max-width: 600px) {
.newsList, .newsList.featured {
li {
grid-column: span 12;
&:nth-child(1),
&:nth-child(2),
&:nth-child(3),
&:nth-child(4),
&:nth-child(5){
grid-column: span 12;
h2 {
font-size: 1.2rem;
}
}
}
}
}