From a260f04d1d4e7b611809833357128cb90f9a3ca4 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Sat, 12 Jun 2021 15:11:59 +0200 Subject: [PATCH] added option to fit image in article preview --- README.md | 1 + assets/scss/style.scss | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 321214e..6f984c8 100644 --- a/README.md +++ b/README.md @@ -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" diff --git a/assets/scss/style.scss b/assets/scss/style.scss index d50dfd9..076ee16 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -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 }}; } }