diff --git a/assets/sass/article.scss b/assets/sass/article.scss index d7fa5ef..6b82bc3 100644 --- a/assets/sass/article.scss +++ b/assets/sass/article.scss @@ -26,21 +26,20 @@ // 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; + height: 100%; + width: 100%; img { - height: 100%; + 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; diff --git a/layouts/index.html b/layouts/index.html index 7a9e669..b76924a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -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 }} - {{ $featuredImage = $element.Resources.GetMatch .src }} + {{ if .square_src }} + {{ $featuredImage = $element.Resources.GetMatch .square_src }} + {{ else }} + {{ $featuredImage = $element.Resources.GetMatch .src }} + {{ end }} + {{ end }} - {{ $featuredImage := $featuredImage.Crop "800x400 Center" }} + {{ $featuredImage := $featuredImage.Crop "800x700 Center" }}