fix: article card style
All checks were successful
Deploy workflow / deploy (push) Successful in 32s
All checks were successful
Deploy workflow / deploy (push) Successful in 32s
This commit is contained in:
parent
b622a9b57d
commit
205f7b421e
2 changed files with 18 additions and 11 deletions
|
@ -26,22 +26,21 @@
|
||||||
|
|
||||||
// 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;
|
|
||||||
width: 300px;
|
|
||||||
flex-grow: 0;
|
|
||||||
flex-shrink: 0;
|
|
||||||
img {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
height: 300px;
|
||||||
|
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;
|
||||||
|
|
|
@ -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 }}
|
||||||
|
{{ if .square_src }}
|
||||||
|
{{ $featuredImage = $element.Resources.GetMatch .square_src }}
|
||||||
|
{{ else }}
|
||||||
{{ $featuredImage = $element.Resources.GetMatch .src }}
|
{{ $featuredImage = $element.Resources.GetMatch .src }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $featuredImage := $featuredImage.Crop "800x400 Center" }}
|
|
||||||
|
{{ end }}
|
||||||
|
{{ $featuredImage := $featuredImage.Crop "800x700 Center" }}
|
||||||
<div
|
<div
|
||||||
class="prominent-article article-card"
|
class="prominent-article article-card"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue