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"
|
||||
when "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
|
||||
columns = "grid-cols-1 md:grid-cols-2"
|
||||
end
|
||||
|
@ -1,9 +1,15 @@
|
||||
%section.m-5.md:m-12.lg:m-20{ options(section , :background , :color)}
|
||||
.flex.justify-center
|
||||
- unless section.header.blank? and section.text.blank?
|
||||
.max-w-prose.px-4.py-16{ options(section , :text_align)}
|
||||
- unless section.header.blank?
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
= section.header
|
||||
.mt-4.text-lg.pt-10{ prose_classes }
|
||||
- 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
|
||||
.grid{ column_option(section)}
|
||||
|
@ -10,6 +10,7 @@
|
||||
options:
|
||||
- background
|
||||
- columns
|
||||
- subheader
|
||||
- color
|
||||
- text_align
|
||||
- template: section_full_up
|
||||
|
Loading…
Reference in New Issue
Block a user