fix the prose / markdown style issue
This commit is contained in:
parent
c4da3d112c
commit
000d90171c
@ -12,6 +12,12 @@ module Merged
|
||||
Redcarpet::Markdown.new(html, options)
|
||||
end
|
||||
|
||||
def prose_classes
|
||||
classes = "prose lg:prose-lg "
|
||||
classes += "prose-headings:text-inherit"
|
||||
{ class: classes }
|
||||
end
|
||||
|
||||
def markdown_image(section)
|
||||
return "" unless section.text
|
||||
down = self.renderer.render(section.text)
|
||||
|
@ -7,5 +7,5 @@
|
||||
= date_precision(section.page , "published_date")
|
||||
%h2.mt-12.text-2xl.font-bold.md:text-4xl
|
||||
= section.header
|
||||
.prose.mt-8.md:block
|
||||
.mt-8.md:block{ prose_classes }
|
||||
= markdown(section)
|
||||
|
@ -2,7 +2,7 @@
|
||||
.flex.items-center.justify-center.flex-1
|
||||
.max-w-prose.px-4.mt-16.mx-auto.text-center
|
||||
%h1.text-4xl.font-medium= section.header
|
||||
%p.prose.mt-4.text-lg.pt-10
|
||||
.mt-4.text-lg.pt-10{ prose_classes }
|
||||
= markdown(section)
|
||||
.flex.items-center.justify-start.m-10.md:m-20
|
||||
.mx-auto.w-full.max-w-4xl{class: "max-w-[50%]"}
|
||||
|
@ -3,7 +3,7 @@
|
||||
.max-w-prose.px-4.py-16{ options(section , :text_align)}
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
= section.header
|
||||
%p.prose.mt-4.text-lg.pt-10
|
||||
.mt-4.text-lg.pt-10{ prose_classes }
|
||||
= markdown(section)
|
||||
- template = "merged/view/cards/" + section.card_template
|
||||
.grid{ column_option(section)}
|
||||
|
@ -5,7 +5,7 @@
|
||||
.mx-auto.max-w-xl{ options(section , :color, :text_align)}
|
||||
%h2.text-2xl.font-bold.md:text-5xl
|
||||
= section.header
|
||||
%p.prose.hidden.sm:mt-4.sm:block.text-2xl
|
||||
.sm:mt-4.text-2xl{ prose_classes }
|
||||
= markdown(section)
|
||||
.mt-4.md:mt-8
|
||||
-if section.has_option?("button_text")
|
||||
|
@ -6,5 +6,5 @@
|
||||
-if section.has_option?("subheader")
|
||||
%h4.text-xl.mt-10.md:text-2xl
|
||||
= section.option("subheader")
|
||||
.prose.mt-4.text-lg.pt-10
|
||||
.mt-4.text-lg.pt-10{ prose_classes }
|
||||
= markdown(section)
|
||||
|
@ -8,7 +8,7 @@
|
||||
-if section.has_option?("subheader")
|
||||
%h4.text-xl.mt-10.md:text-2xl
|
||||
= section.option("subheader")
|
||||
%p.prose.mt-8.md:block
|
||||
.mt-8{ prose_classes }
|
||||
= markdown(section)
|
||||
-if section.has_option?("button_text")
|
||||
.mt-8.md:mt-8
|
||||
|
@ -8,4 +8,5 @@
|
||||
-if section.has_option?("subheader")
|
||||
%h4.text-xl.mt-4.lg:mt-8.md:text-2xl
|
||||
= section.option("subheader")
|
||||
%p.prose.mt-3= markdown(section)
|
||||
.mt-3{ prose_classes }
|
||||
= markdown(section)
|
||||
|
@ -5,8 +5,9 @@
|
||||
%h1.mb-10.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
= section.header
|
||||
-if section.has_option?("subheader")
|
||||
%p.prose.text-xl.pb-6
|
||||
.text-xl.pb-6{ prose_classes }
|
||||
= section.option("subheader")
|
||||
|
||||
.prose.max-w-full.mt-4.gap-16{ text_column_option(section)}
|
||||
.max-w-full.mt-4.gap-16{ text_column_option(section)}
|
||||
%div{ prose_classes }
|
||||
= markdown_image(section)
|
||||
|
8
app/views/merged/view/cards/_card_feature.haml
Normal file
8
app/views/merged/view/cards/_card_feature.haml
Normal file
@ -0,0 +1,8 @@
|
||||
.max-w-md.sm:mx-auto.sm:text-center
|
||||
.flex.items-center.justify-center.w-16.h-16.mb-4.rounded-full.bg-indigo-50.sm:mx-auto.sm:w-24.sm:h-24
|
||||
%svg.w-12.h-12.text-deep-purple-accent-400.sm:w-16.sm:h-16{:stroke => "currentColor", :viewbox => "0 0 52 52"}
|
||||
%polygon{:fill => "none", :points => "29 13 14 29 25 29 23 39 38 23 27 23", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => "3"}
|
||||
%h6.mb-3.text-xl.font-bold.leading-5 The deep ocean
|
||||
%p.mb-3.text-sm.text-gray-900
|
||||
A flower in my garden, a mystery in my panties. Heart attack never stopped old Big Bear. I didn't even know we were calling him Big Bear. We never had the chance to.
|
||||
%a.inline-flex.items-center.font-semibold.transition-colors.duration-200.text-deep-purple-accent-400.hover:text-deep-purple-800{"aria-label" => "", :href => "/"} Learn more
|
@ -5,5 +5,5 @@
|
||||
.relative.w-full.m-2.p-4
|
||||
%h3.text-lg
|
||||
= card.header
|
||||
%p.prose.mt-1.text-xs.font-medium
|
||||
.mt-1.text-xs.font-medium{ prose_classes }
|
||||
= markdown(card)
|
||||
|
@ -5,5 +5,6 @@
|
||||
%h3.p-4.mt-10.text-3xl.font-bold= card.header
|
||||
-if card.has_option?("subheader")
|
||||
%h4.p-4.text-xl= card.option("subheader")
|
||||
.prose.m-6{options(card , :background , :color ) }
|
||||
.m-6{options(card , :background , :color ) }
|
||||
%div{ prose_classes }
|
||||
= markdown(card)
|
||||
|
@ -3,5 +3,5 @@
|
||||
%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)}
|
||||
%p.prose.m-2.text-sm.leading-relaxed.line-clamp-3
|
||||
.m-2.text-sm.leading-relaxed.line-clamp-3{ prose_classes }
|
||||
= markdown(card)
|
||||
|
Loading…
Reference in New Issue
Block a user