implement options, buttons and fixed bg
This commit is contained in:
4
app/views/merged/sections/_option_form_select.haml
Normal file
4
app/views/merged/sections/_option_form_select.haml
Normal file
@ -0,0 +1,4 @@
|
||||
%label.block
|
||||
%h4.text-lg.font-bold
|
||||
= option.name.capitalize
|
||||
= select_tag( "option[#{option.name}]" , options_for_select(option.values, section.option(option.name)), class: "w-full rounded-lg border-gray-200 p-4 pr-12 text-sm shadow-sm")
|
4
app/views/merged/sections/_option_form_text.haml
Normal file
4
app/views/merged/sections/_option_form_text.haml
Normal file
@ -0,0 +1,4 @@
|
||||
%label.block
|
||||
%h4.text-lg.font-bold
|
||||
= option.name
|
||||
= text_field_tag( "option[#{option.name}]" , section.option(option.name), class: "w-full rounded-lg border-gray-200 p-4 pr-12 text-sm shadow-sm")
|
@ -37,6 +37,9 @@
|
||||
%p No image
|
||||
.relative.block.border.border-gray-100.p-4
|
||||
%h3.mt-4.text-lg.font-bold Options
|
||||
%p To be done
|
||||
- section.options.each do|name , value|
|
||||
%p
|
||||
= name
|
||||
= value
|
||||
%p
|
||||
= green_button( "New Section" , new_page_section_url(@page.name) )
|
||||
|
@ -56,4 +56,7 @@
|
||||
|
||||
.relative.block.border.border-gray-100
|
||||
%h3.mt-4.text-lg.font-bold Options
|
||||
To be done
|
||||
= section_form( class: "mx-auto mt-8 mb-0 max-w space-y-4") do
|
||||
- @section.option_definitions.each do |option|
|
||||
=render "option_form_#{option.type}" , section: @section , option: option
|
||||
= submit_button("Update")
|
||||
|
@ -1,4 +1,4 @@
|
||||
%section.overflow-hidden.bg-cover.bg-center.bg-no-repeat{style: bg(section)}
|
||||
%section.overflow-hidden.bg-cover.bg-center.bg-no-repeat{bg(section)}
|
||||
.mx-auto.max-w-screen-2xl.px-4.py-8.sm:px-6.lg:px-8
|
||||
.grid.grid-cols-1.gap-4.md:grid-cols-2
|
||||
.p-8.md:p-12.lg:px-16.lg:py-24{class: 'bg-black/25'}
|
||||
|
@ -1 +1,2 @@
|
||||
= blue_button( section.button_text , section.button_link)
|
||||
- unless section.button_text.blank? or section.button_link.blank?
|
||||
= blue_button( section.button_text , section.button_link)
|
||||
|
Reference in New Issue
Block a user