fix: article card style
All checks were successful
Deploy workflow / deploy (push) Successful in 32s

This commit is contained in:
Matthieu Bessat 2024-12-23 23:04:59 +01:00
parent b622a9b57d
commit 205f7b421e
2 changed files with 18 additions and 11 deletions

View file

@ -26,21 +26,20 @@
// card in list // card in list
.article-card { .article-card {
display: flex; display: grid;
grid-template-columns: 3fr 5fr;
background-color: rgba(0, 0, 0, 0.2); background-color: rgba(0, 0, 0, 0.2);
margin-bottom: 1rem; margin-bottom: 1rem;
border-radius: 3px; border-radius: 3px;
.article__image { .article__image {
display: block;
margin-right: 0rem; margin-right: 0rem;
overflow: hidden; overflow: hidden;
height: 210px; height: 100%;
width: 300px; width: 100%;
flex-grow: 0;
flex-shrink: 0;
img { img {
height: 100%; display: block;
height: 300px;
width: 100%; width: 100%;
object-fit: cover; object-fit: cover;
transition: all 1s ease-in-out; transition: all 1s ease-in-out;
@ -81,13 +80,16 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 3fr 4fr;
.article__image { .article__image {
height: 100% !important; height: 100% !important;
min-height: 100% !important; min-height: 100% !important;
width: 500px; width: 100%;
margin-right: 0rem; margin-right: 0rem;
img {
height: 100% !important;
}
} }
.article__content { .article__content {
position: relative; position: relative;

View file

@ -432,9 +432,14 @@
{{ range $index, $element := $news }}{{ if eq $index 0 }} {{ range $index, $element := $news }}{{ if eq $index 0 }}
{{ $featuredImage := (resources.Get (printf "%s" ("cover/cover.jpg" | safeURL))) }} {{ $featuredImage := (resources.Get (printf "%s" ("cover/cover.jpg" | safeURL))) }}
{{ with $element.Params.featured_image }} {{ with $element.Params.featured_image }}
{{ $featuredImage = $element.Resources.GetMatch .src }} {{ if .square_src }}
{{ $featuredImage = $element.Resources.GetMatch .square_src }}
{{ else }}
{{ $featuredImage = $element.Resources.GetMatch .src }}
{{ end }}
{{ end }} {{ end }}
{{ $featuredImage := $featuredImage.Crop "800x400 Center" }} {{ $featuredImage := $featuredImage.Crop "800x700 Center" }}
<div <div
class="prominent-article article-card" class="prominent-article article-card"
> >