improve image scaling on caards

This commit is contained in:
Torsten 2023-01-07 00:46:52 +02:00
parent b9c6b12131
commit e09f2935f1
4 changed files with 6 additions and 6 deletions

View File

@ -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")

View File

@ -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)}

View File

@ -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")

View File

@ -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")