added option to fit image in article preview

This commit is contained in:
Gabriele Musco 2021-06-12 15:11:59 +02:00
parent 18a213cf31
commit a260f04d1d
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
2 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,7 @@ summaryLength = 70 # number of words for article summaries
showRss = true # show the link for the RSS feed; default true
imageInArticlePreview = false # show images in article preview; default false
fitImageInArticlePreview = false # make article preview images fit the article preview instead of getting cropped
articleSummary = true # show a summary in article preview; default true
navtype = "standard" # changes the style of the pagination, available styles are: "standard", "circles"

View File

@ -262,7 +262,12 @@ h1, h2, h3, h4, h5, h6 {
img {
height: 250px;
min-width: 100%;
object-fit: cover;
object-fit:
{{ if .Site.Params.FitImageInArticlePreview }}
contain
{{ else }}
cover
{{ end }};
}
}