news section and page with links

This commit is contained in:
2023-01-08 23:48:20 +02:00
parent bcb02ea4a4
commit d522fc7600
9 changed files with 31 additions and 20 deletions

View File

@ -4,6 +4,7 @@
= link_to @page.name , merged.page_path(@page)
.text-xl.text-gray-900
=link_to "View live" , "/#{@page.name}" , target: @page.name
= link_to( "New Section" , merged.new_page_section_path(@page.id) , class: "p-2 border border-gray-200 bg-cyan-100 font-bold rounded-lg hover:bg-sky-100")
= render "layouts/merged_header"

View File

@ -8,7 +8,6 @@
= section.header
.font-bold.text-center.mb-4.lg:mb-8
= date_precision(section.page , "published_date")
.max-w-full.mt-4.gap-16{ options(section , :text_column , :prose ) }
= markdown(section)
= header_list

View File

@ -5,6 +5,7 @@
= section.header
.text-lg
= distance_of_time_in_words_to_now last_blog.updated_at
ago
%hr.mt-2.border.border-4.border-gray-600
- template = find_template(last_blog)
= render( template , section: last_blog)
@ -12,5 +13,5 @@
.ml-20.mb-2.text-lg
= section.text
.mr-20.mb-2.text-lg
%a.transition{:class => "hover:text-gray-500/75", :href => merged.pages_path}
%a.transition{:class => "hover:text-gray-500/75", :href => main_app.view_blog_path(blog.page.name)}
Read More . . .