2022-11-25 17:56:46 +01:00
|
|
|
%p#notice= notice
|
|
|
|
|
|
|
|
-@page.sections.each_with_index do |section , index|
|
2022-11-25 20:14:57 +01:00
|
|
|
.grid.grid-cols-6.gap-2.m-8{class: (index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' }
|
2022-11-25 17:56:46 +01:00
|
|
|
.relative.block.border.border-gray-100
|
|
|
|
=#image_tag("cms/#{file}" , class: "h-56 w-full object-contain lg:h-72")
|
2022-11-25 20:14:57 +01:00
|
|
|
=# section.template #PREVIEW here
|
|
|
|
.p-4
|
|
|
|
%h3.mt-4.text-lg.font-bold Section #{index + 1}
|
|
|
|
%button.mt-4.rounded-lg.bg-yellow-500.p-4
|
|
|
|
=link_to "Up" , "/index"
|
|
|
|
%button.mt-4.rounded-lg.bg-yellow-500.p-4
|
|
|
|
=link_to "Down" , "/index"
|
|
|
|
%button.mt-4.rounded-lg.bg-blue-400.p-4
|
|
|
|
=link_to "Edit" , "/index"
|
|
|
|
%button.mt-4.rounded-lg.bg-red-400.p-4
|
|
|
|
=link_to "Delete" , "/index"
|
2022-11-25 17:56:46 +01:00
|
|
|
-section.content.each do |key , value|
|
2022-11-25 20:14:57 +01:00
|
|
|
= render "cms/sections/#{key}", section: section , key: key , value: value
|
2022-11-25 17:56:46 +01:00
|
|
|
|
2022-11-25 20:14:57 +01:00
|
|
|
.grid.grid-cols-6.gap-2.m-8
|
|
|
|
%button.mt-4.rounded-lg.bg-cyan-400.p-4
|
|
|
|
=link_to "New Section" , "/index"
|
|
|
|
%button.mt-4.rounded-lg.bg-blue-400.p-4
|
|
|
|
=link_to "Save Changes" , "/index"
|