From 8309caa1facdfad784e0ee60097f705cbae21e46 Mon Sep 17 00:00:00 2001 From: ibrahimjaved12 Date: Wed, 6 Nov 2024 19:03:30 +0500 Subject: [PATCH 01/18] Refactor layout: Adjust flex properties for responsiveness --- www/assets/css/carousel.scss | 18 ++++++++++++++++++ www/assets/css/home.scss | 7 ++++--- www/layouts/partials/home_stories.html | 22 +++++++++++----------- www/layouts/partials/stories_card.html | 16 ++++++++++++---- 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/www/assets/css/carousel.scss b/www/assets/css/carousel.scss index e895f4eaf..a0193bac6 100644 --- a/www/assets/css/carousel.scss +++ b/www/assets/css/carousel.scss @@ -65,6 +65,7 @@ .item-wrapper { padding: 0 10px; + max-width: 411px; &:first-child { padding-left: 0; @@ -75,3 +76,20 @@ } } } + +.testimonial-image-wrapper { + position: relative; + width: 100%; + // max-width:391px; + padding-top: 56.25%; // 16:9 aspect ratio + + .testimonial-image { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + // max-height:197px; + object-fit: cover; + } +} diff --git a/www/assets/css/home.scss b/www/assets/css/home.scss index 0cbcc6ace..d77e421d0 100644 --- a/www/assets/css/home.scss +++ b/www/assets/css/home.scss @@ -368,9 +368,10 @@ $searchbox-height: 50px; } .testimonial { - height: 280px; - width: 280px; - color: white; + // height: 280px; + // height: 450px; + // width: 411px; + // color: white; background-size: cover; .name { diff --git a/www/layouts/partials/home_stories.html b/www/layouts/partials/home_stories.html index 2888c0565..3f071fdd3 100644 --- a/www/layouts/partials/home_stories.html +++ b/www/layouts/partials/home_stories.html @@ -1,6 +1,6 @@ {{- $stories := where .Site.RegularPages "Type" "==" "stories" -}} {{- $storiesSection := .Site.GetPage "section" "stories" -}} -{{- $breakdowns := (dict "xs-sm" (dict "size" 1 "class" "d-flex d-md-none") "md" (dict "size" 2 "class" "d-none d-md-flex d-lg-none") "lg" (dict "size" 3 "class" "d-none d-lg-flex d-xl-none") "xl" (dict "size" 4 "class" "d-none d-xl-flex")) -}} +{{- $breakdowns := (dict "xs-sm" (dict "size" 1 "class" "d-flex d-md-none") "md" (dict "size" 2 "class" "d-none d-md-flex d-lg-none") "lg" (dict "size" 3 "class" "d-none d-lg-flex d-xl-none") "xl" (dict "size" 3 "class" "d-none d-xl-flex")) -}}
{{ range $breakpoint, $carouselInfo := $breakdowns }} {{ $itemsInCarousel := index $carouselInfo "size" }} @@ -11,24 +11,24 @@