blogheader ok, date formatting

This commit is contained in:
2022-12-28 12:18:42 +02:00
parent 0c2475de16
commit d375bad897
13 changed files with 73 additions and 8 deletions

View File

@ -1,6 +1,6 @@
- content_for( :merged_menu ) do
.text-xl.font-bold.text-gray-900
Page
= @page.type.capitalize
.text-xl.font-bold.text-gray-900
=@page.name
%strong.rounded.bg-green-100.px-3.text-xs.font-medium.text-green-700{:class => "py-1.5"}

View File

@ -0,0 +1,4 @@
%label.block
.mt-4.text-lg.font-bold
= option.name.camelcase
= select_date section.option(option.name) , :prefix => "option[#{option.name}]"

View File

@ -1,5 +1,6 @@
.text-xl.font-bold.text-gray-900
Page #{link_to section.page.name, merged.page_sections_path(section.page.id), class: "underline"}
= section.page.type.capitalize
=link_to section.page.name, merged.page_sections_path(section.page.id), class: "underline"
.inline-flex.items-center.justify-center.gap-3
.text-xl.font-bold.text-gray-900
Section #{section.header}

View File

@ -1,6 +1,6 @@
- content_for( :merged_menu ) do
.text-xl.font-bold.text-gray-900
Page
= @page.type.capitalize
= link_to @page.name , merged.page_path(@page)
.text-xl.text-gray-900
=link_to "View live" , "/#{@page.name}" , target: @page.name

View File

@ -0,0 +1,11 @@
%section.overflow-hidden.grid.grid-cols-2.m-20
%div{ order_option(section)}
= image_for( section , "h-56 w-full object-cover sm:h-full")
.p-8.md:p-6.lg:px-16.lg:pt-10{ background_option(section)}
.mx-auto.max-w-xl{options(section , :text_align , :color)}
%h4.text-xl.mt-10.md:text-2xl
= date_precision(section.page , "published_date")
%h2.mt-12.text-2xl.font-bold.md:text-4xl
= section.header
.prose.mt-8.md:block
= markdown(section)

View File

@ -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.mt-4.text-lg.pt-10
%p.prose.mt-4.text-lg.pt-10
= markdown(section)
.flex.items-center.justify-start.m-20
.mx-auto.w-full.max-w-4xl{class: "max-w-[50%]"}