first actual edit (header)

This commit is contained in:
2022-11-27 17:23:38 +02:00
parent 8d405e44e1
commit 6bb0b35d3f
4 changed files with 35 additions and 6 deletions

View File

@ -1,4 +1,6 @@
.relative.block.border.border-gray-100
%h3.mt-4.text-lg.font-bold= key.upcase
.relative.block.border.border-gray-100
%p= value
= form_tag( {url: cms_page_section_path( @page.name, @section.id), class: "mx-auto.mt-8.mb-0.max-w.space-y-4"} , {method: :patch }) do
= text_field_tag( :header , @section.content["header"], class: "w-full.rounded-lg.border-gray-200.p-4.pr-12.text-sm.shadow-sm")
%button.ml-3.inline-block.rounded-lg.bg-blue-500.px-5.py-3.text-sm.font-medium.text-white{:type => "submit"}
Update

View File

@ -1,9 +1,14 @@
%p#notice= notice
%h1 Page #{@page.name}
.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
Page #{@page.name}
.flex.items-center.justify-center.flex-1
%h3.text-xl.font-bold.tracking-tight.text-gray-900
Section #{@section.id}
%h4 Section #{@section.id}
.grid.grid-cols-2.gap-2.m-8
- @section.content.each do |key , value|
= render "cms/sections/editors/#{key}", section: @section , key: key , value: value