rename align to text_align, so we can have item_align
This commit is contained in:
@ -18,7 +18,7 @@ module Merged
|
||||
{class: clazz}
|
||||
end
|
||||
|
||||
def align_option(section , clazz = "")
|
||||
def text_align_option(section , clazz = "")
|
||||
if section.has_option?("align")
|
||||
# text-center , text-left , text-right , leave comment for tailwind
|
||||
clazz += " text-#{section.option('align')}"
|
||||
|
@ -1,6 +1,6 @@
|
||||
.flex.flex-col{ options(section , :background , :color , :margin)}
|
||||
.flex.items-center.justify-center.flex-1
|
||||
.max-w-prose.px-4.py-16.mx-auto.text-center{options(section , :align , :color)}
|
||||
.max-w-prose.px-4.py-16.mx-auto.text-center{options(section , :text_align , :color)}
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
= section.header
|
||||
-if section.has_option?("subheader")
|
||||
|
@ -2,7 +2,7 @@
|
||||
%div{ order_option(section)}
|
||||
= image_for( section , "h-56 w-full object-cover sm:h-full")
|
||||
.p-8.md:p-12.lg:px-16.lg:py-24{ background_option(section)}
|
||||
.mx-auto.max-w-xl{options(section , :align , :color)}
|
||||
.mx-auto.max-w-xl{options(section , :text_align , :color)}
|
||||
%h2.mt-12.text-2xl.font-bold.md:text-4xl
|
||||
= section.header
|
||||
-if section.has_option?("subheader")
|
||||
|
@ -1,7 +1,7 @@
|
||||
.group.m-8.overflow-hidden.relative.flex.h-96.items-end
|
||||
= image_for( card , "absolute inset-0 h-full w-full object-cover hover:scale-110 ease-in duration-700")
|
||||
.relative.w-full.m-2.p-4.tracking-widest{align_option(card ,"sm:w-1/2")}
|
||||
%div.transition-colors.group-hover:bg-black.group-hover:text-white{options(card , :align , :color , :background)}
|
||||
.relative.w-full.m-2.p-4.tracking-widest{text_align_option(card ,"sm:w-1/2")}
|
||||
%div.transition-colors.group-hover:bg-black.group-hover:text-white{options(card , :text_align , :color , :background)}
|
||||
.relative.w-full.m-2.p-4
|
||||
%h3.text-lg
|
||||
= card.header
|
||||
|
@ -1,7 +1,7 @@
|
||||
.grid.grid-cols-1.gap-16.m-16
|
||||
%div{ order_option(card)}
|
||||
= image_for( card , "h-70 w-full object-cover grid")
|
||||
%div.grid.h-70{options(card , :align , :color , :background )}
|
||||
%div.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")
|
||||
%h4.p-4.text-xl= card.option("subheader")
|
||||
|
@ -1,7 +1,7 @@
|
||||
.fex.flex-col.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm.m-10
|
||||
= image_for( card , class: "object-fill")
|
||||
%h3.p-5.text-2xl.bg-gray-100.text-black.font-bold{ align_option(card)}= card.header
|
||||
%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 , :align , :color)}
|
||||
.p-5{options(card , :text_align , :color)}
|
||||
%p.m-2.text-sm.leading-relaxed.line-clamp-3
|
||||
= markdown(card)
|
||||
|
@ -1,6 +1,6 @@
|
||||
.m-10{background_option(card)}
|
||||
= image_for( card , "h-96 w-full object-cover")
|
||||
.m-6{options(card , :align , :color)}
|
||||
.m-6{options(card , :text_align , :color)}
|
||||
%h3.p-4.text-2xl.font-bold= card.header
|
||||
-if card.has_option?("subheader")
|
||||
%h4.p-4.text-xl= card.option("subheader")
|
||||
|
Reference in New Issue
Block a user