make card section work without header and text
This commit is contained in:
parent
c7cad11b89
commit
14e3564fa4
@ -117,6 +117,10 @@ module Merged
|
|||||||
columns = "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
columns = "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
||||||
when "4"
|
when "4"
|
||||||
columns = "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
columns = "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
||||||
|
when "5"
|
||||||
|
columns = "grid-cols-1 md:grid-cols-3 lg:grid-cols-5"
|
||||||
|
when "6"
|
||||||
|
columns = "grid-cols-2 md:grid-cols-4 lg:grid-cols-6"
|
||||||
else # two
|
else # two
|
||||||
columns = "grid-cols-1 md:grid-cols-2"
|
columns = "grid-cols-1 md:grid-cols-2"
|
||||||
end
|
end
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :color)}
|
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :color)}
|
||||||
.flex.justify-center
|
.flex.justify-center
|
||||||
.max-w-prose.px-4.py-16{ options(section , :text_align)}
|
- unless section.header.blank? and section.text.blank?
|
||||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
.max-w-prose.px-4.py-16{ options(section , :text_align)}
|
||||||
= section.header
|
- unless section.header.blank?
|
||||||
.mt-4.text-lg.pt-10{ prose_classes }
|
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||||
= markdown(section)
|
= section.header
|
||||||
|
- if section.has_option?("subheader")
|
||||||
|
%h2.text-xl.pt-10.font-bold.tracking-tight.sm:text-2xl
|
||||||
|
= section.option("subheader")
|
||||||
|
- unless section.text.blank?
|
||||||
|
.text-lg.pt-10{ prose_classes }
|
||||||
|
= markdown(section)
|
||||||
- template = "merged/view/cards/" + section.card_template
|
- template = "merged/view/cards/" + section.card_template
|
||||||
.grid{ column_option(section)}
|
.grid{ column_option(section)}
|
||||||
- section.cards.each do |card|
|
- section.cards.each do |card|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
options:
|
options:
|
||||||
- background
|
- background
|
||||||
- columns
|
- columns
|
||||||
|
- subheader
|
||||||
- color
|
- color
|
||||||
- text_align
|
- text_align
|
||||||
- template: section_full_up
|
- template: section_full_up
|
||||||
|
Loading…
Reference in New Issue
Block a user