From ea30afa39abc90acb700536b7f663a671ac564a1 Mon Sep 17 00:00:00 2001 From: mijorus <39067225+mijorus@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:31:45 +0200 Subject: [PATCH] allow images of any ratio to be set as thumbnails without stretching them (#216) * allow images of any ratio to be set as thumbnails without streching them * Update _base.sass Co-authored-by: mijorus --- assets/sass/_base.sass | 5 +++++ layouts/partials/home/projects.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/sass/_base.sass b/assets/sass/_base.sass index 6e36bc4..689cd05 100644 --- a/assets/sass/_base.sass +++ b/assets/sass/_base.sass @@ -74,6 +74,11 @@ pre .thumbnail border: none +.card-thumbnail + width: 100% + height: 100% + object-fit: cover + .bold-title font-size: 6rem line-height: 1.2 diff --git a/layouts/partials/home/projects.html b/layouts/partials/home/projects.html index 0cf6d96..c62c40d 100644 --- a/layouts/partials/home/projects.html +++ b/layouts/partials/home/projects.html @@ -24,7 +24,7 @@ {{ with .Resources.ByType "image" }} {{ range first 1 (sort . "Params.weight") }} {{ $image := .Resize $width }} - {{ $image.Name }} + {{ $image.Name }} {{ end }} {{ end }}