41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
%p#notice= notice
|
|
.flex.flex-col.bg-white
|
|
.flex.items-center.justify-center.flex-1
|
|
.max-w-xl.px-4.py-8.mx-auto.text-center
|
|
%h1.text-2xl.font-bold.tracking-tight.text-gray-900.sm:text-4xl
|
|
Page
|
|
= @page.name
|
|
|
|
-@page.sections.each do |section |
|
|
.grid.grid-cols-5.gap-2.m-8{class: (section.index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' }
|
|
.relative.block.border.border-gray-100.p-4
|
|
%h3.mt-4.text-lg.font-bold Section #{section.index + 1}
|
|
= blue_button( "Up" , section_move_url(section.id , dir: :up) )
|
|
= blue_button( "Down" , section_move_url(section.id , dir: :down) )
|
|
= yellow_button("Edit" , section_path(section.id) )
|
|
= green_button( "New" , "/index" )
|
|
= red_button( "Delete" , "/index" )
|
|
.relative.block.border.border-gray-100.p-4
|
|
%h3.mt-4.text-lg.font-bold Template
|
|
%p= section.template
|
|
= section_preview(section , class: "w-full object-contain")
|
|
.relative.block.border.border-gray-100.p-4
|
|
%h3.mt-4.text-lg.font-bold Header
|
|
%p= section.header
|
|
%h3.mt-4.text-lg.font-bold Text
|
|
%p= section.text
|
|
.relative.block.border.border-gray-100.p-4
|
|
- if section.cards?
|
|
%h3.mt-4.text-lg.font-bold #{section.content['cards'].length} Cards
|
|
=link_to section_cards_url(section.id) do
|
|
=card_preview(section , class: "w-full object-contain")
|
|
- else
|
|
%h3.mt-4.text-lg.font-bold Image
|
|
-if section.image
|
|
= image_tag "cms/" + section.image
|
|
-else
|
|
%p No image
|
|
.relative.block.border.border-gray-100.p-4
|
|
%h3.mt-4.text-lg.font-bold Options
|
|
%p To be done
|