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

View file

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