From e09f2935f165f76f303e9769b696e52fd84978a5 Mon Sep 17 00:00:00 2001 From: Torsten Date: Sat, 7 Jan 2023 00:46:52 +0200 Subject: [PATCH] improve image scaling on caards --- app/views/merged/view/cards/_card_gap_square.haml | 2 +- app/views/merged/view/cards/_card_normal_round.haml | 2 +- app/views/merged/view/cards/_card_normal_square.haml | 2 +- app/views/merged/view/cards/_card_wide_square.haml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/merged/view/cards/_card_gap_square.haml b/app/views/merged/view/cards/_card_gap_square.haml index fd84f98..7f788c1 100644 --- a/app/views/merged/view/cards/_card_gap_square.haml +++ b/app/views/merged/view/cards/_card_gap_square.haml @@ -1,6 +1,6 @@ .grid.grid-cols-1.gap-12.m-12.md:gap-8.md:m-8.lg:gap-12.lg:m-12 %div{ order_option(card)} - = image_for( card , "h-70 w-full object-cover grid") + = image_for( card , "h-full w-full object-cover") .grid.h-70{options(card , :text_align , :color , :background )} %h3.p-4.mt-10.text-3xl.font-bold= card.header -if card.has_option?("subheader") diff --git a/app/views/merged/view/cards/_card_normal_round.haml b/app/views/merged/view/cards/_card_normal_round.haml index 01db8fa..d5c97e0 100644 --- a/app/views/merged/view/cards/_card_normal_round.haml +++ b/app/views/merged/view/cards/_card_normal_round.haml @@ -1,5 +1,5 @@ .fex.flex-col.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm.m-10 - = image_for( card , class: "object-fill") + = image_for( card , class: "h-full w-full object-cover") %h3.p-5.text-2xl.bg-gray-100.text-black.font-bold{ text_align_option(card)}= card.header %div.h-full{background_option(card)} .p-5{options(card , :text_align , :color)} diff --git a/app/views/merged/view/cards/_card_normal_square.haml b/app/views/merged/view/cards/_card_normal_square.haml index 81fb6c2..9c35ad2 100644 --- a/app/views/merged/view/cards/_card_normal_square.haml +++ b/app/views/merged/view/cards/_card_normal_square.haml @@ -1,6 +1,6 @@ .m-4.md:m-8.lg:m-12{background_option(card)} %div{ order_option(card)} - = image_for( card , "h-96 w-full object-cover") + = image_for( card , "h-full w-full object-cover") .m-6{options(card , :text_align , :color , :order)} %h3.p-4.text-2xl.font-bold= card.header -if card.has_option?("subheader") diff --git a/app/views/merged/view/cards/_card_wide_square.haml b/app/views/merged/view/cards/_card_wide_square.haml index c2e4564..c695687 100644 --- a/app/views/merged/view/cards/_card_wide_square.haml +++ b/app/views/merged/view/cards/_card_wide_square.haml @@ -1,6 +1,6 @@ -.flex.m-2.md:flex-row.md:m-4.lg:m-6{background_option(card)} - = image_for( card , "object-cover w-3/5") - .mx-6{options(card , :text_align , :color , :order , "w-2/5")} +.flex.m-2.flex-col.lg:flex-row.md:m-4.lg:m-6{background_option(card)} + = image_for( card , "object-cover lg:w-3/5") + .mx-6{options(card , :text_align , :color , :order , "lg:w-2/5")} %h3.px-4.mt-2.text-2xl.font-bold= card.header -if card.has_option?("subheader") %h4.p-4.text-xl= card.option("subheader")