improve blog header
This commit is contained in:
parent
1f430d89be
commit
a620275a1c
@ -9,5 +9,9 @@ module Merged
|
|||||||
return last unless last&.template == "section_news"
|
return last unless last&.template == "section_news"
|
||||||
sorted.last
|
sorted.last
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def header_list
|
||||||
|
markdown("- one \n- two\n- three\n- four")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
%section.overflow-hidden.grid.grid-cols-2.m-5.md:m-12.lg:m-20
|
.flex.justify-center.p-8.flex-col.md:flex-row{options(section , :margin , :background )}
|
||||||
%div{ order_option(section)}
|
.flex.items-center.h-40.md:h-60.lg:h-96.w-full.overflow-hidden{order_option(section, "lg:w-1/3")}
|
||||||
= image_for( section , "h-56 w-full object-cover sm:h-full")
|
= image_for(section ,"")
|
||||||
.p-8.md:p-6.lg:px-16.lg:pt-10{ background_option(section)}
|
.flex.items-center.w-full.max-w.px-6.mt-6.mx-auto{:class => "lg:w-2/3"}
|
||||||
.mx-auto.max-w-xl{options(section , :text_align , :color)}
|
.flex-1{color_option(section)}
|
||||||
%h4.text-xl.mt-10.md:text-2xl
|
.text-center
|
||||||
= date_precision(section.page , "published_date")
|
%h2.text-4xl.font-bold.text-center.mb-2
|
||||||
%h2.mt-12.text-2xl.font-bold.md:text-4xl
|
= section.header
|
||||||
= section.header
|
.font-bold.text-center.mb-4.lg:mb-8
|
||||||
.mt-8.md:block{ prose_classes }
|
= date_precision(section.page , "published_date")
|
||||||
= markdown(section)
|
|
||||||
|
.max-w-full.mt-4.gap-16{ options(section , :text_column , :prose ) }
|
||||||
|
= markdown(section)
|
||||||
|
= header_list
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
= image_for( section , "h-56 w-full object-cover sm:h-full")
|
= 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)}
|
.p-8.md:p-12.lg:px-16.lg:py-24{ background_option(section)}
|
||||||
.mx-auto.max-w-xl{options(section , :text_align , :color)}
|
.mx-auto.max-w-xl{options(section , :text_align , :color)}
|
||||||
%h2.mt-12.text-2xl.font-bold.md:text-4xl
|
%h2.text-2xl.font-bold.md:text-4xl
|
||||||
= section.header
|
= section.header
|
||||||
-if section.has_option?("subheader")
|
-if section.has_option?("subheader")
|
||||||
%h4.text-xl.mt-10.md:text-2xl
|
%h4.text-xl.mt-10.md:text-2xl
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.flex.justify-center.p-8.flex-col.md:flex-row{options(section , :margin , :background )}
|
.flex.justify-center.p-8.flex-col.md:flex-row{options(section , :margin , :background )}
|
||||||
.flex.items-center.h-40.md:h-60.lg:h-96.w-full.overflow-hidden{order_option(section, "lg:w-2/3")}
|
.flex.items-center.h-40.md:h-60.lg:h-96.w-full.overflow-hidden{order_option(section, "lg:w-2/3")}
|
||||||
= image_for(section ,"")
|
= image_for(section ,"object-cover")
|
||||||
.flex.items-center.w-full.max-w.px-6.mt-6.mx-auto{:class => "lg:w-1/3"}
|
.flex.items-center.w-full.max-w.px-6.mt-6.mx-auto{:class => "lg:w-1/3"}
|
||||||
.flex-1{color_option(section)}
|
.flex-1{color_option(section)}
|
||||||
.text-center
|
.text-center
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- if blog = last_blog
|
- if blog = last_blog
|
||||||
%section.border.py-20{ options(section , :background )}
|
%section.border.border-xl.mt-20{ options(section , :background )}
|
||||||
.flex.mx-20.justify-between.items-center
|
.flex.mx-20.justify-between.items-center
|
||||||
.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||||
= section.header
|
= section.header
|
||||||
@ -7,3 +7,5 @@
|
|||||||
= section.text
|
= section.text
|
||||||
- template = find_template(last_blog)
|
- template = find_template(last_blog)
|
||||||
= render( template , section: last_blog)
|
= render( template , section: last_blog)
|
||||||
|
.mr-20.text-lg
|
||||||
|
= section.text
|
||||||
|
@ -144,5 +144,6 @@
|
|||||||
- text
|
- text
|
||||||
options:
|
options:
|
||||||
- order
|
- order
|
||||||
|
- columns
|
||||||
- background
|
- background
|
||||||
- color
|
- color
|
||||||
|
Loading…
Reference in New Issue
Block a user