unify section_half left and right and use option to get both
This commit is contained in:
@ -59,4 +59,7 @@
|
||||
= 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")
|
||||
-if @section.option_definitions.empty?
|
||||
%p No options
|
||||
-else
|
||||
= submit_button("Update")
|
||||
|
@ -1,13 +0,0 @@
|
||||
%section.overflow-hidden.bg-cover.bg-center.bg-no-repeat{style: bg(section)}
|
||||
.p-8.md:p-12.lg:px-16.lg:py-24
|
||||
.max-w-lg.text-center.sm:text-left{:class => "bg-black/25"}
|
||||
%h2.text-2xl.font-bold.text-white.sm:text-3xl.md:text-5xl
|
||||
= section.header
|
||||
%p.hidden.max-w-md.md:mt-6.md:block.md:text-lg.md:leading-relaxed{:class => "text-white/90"}
|
||||
= section.text
|
||||
-if section.has_option?("button_text")
|
||||
.mt-4.sm:mt-8
|
||||
%a.inline-flex.items-center.rounded-full.bg-indigo-700.px-8.py-3.text-white.shadow-lg.transition.hover:bg-indigo-600.focus:outline-none.focus:ring{:href => section["button_link"]}
|
||||
%span.text-sm.font-medium section.option("button_text")
|
||||
%svg.ml-3.h-5.w-5{:fill => "none", :stroke => "currentColor", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"}
|
||||
%path{:d => "M17 8l4 4m0 0l-4 4m4-4H3", "stroke-linecap" => "round", "stroke-linejoin" => "round", "stroke-width" => "2"}
|
@ -1,6 +1,6 @@
|
||||
%section.overflow-hidden.sm:grid.sm:grid-cols-2
|
||||
= image_for( section , "p-5 h-56 w-full object-cover sm:h-full")
|
||||
.p-8.m-5.bg-cyan-100.md:p-12.lg:px-16.lg:py-24
|
||||
.p-8.m-5.bg-cyan-100.md:p-12.lg:px-16.lg:py-24{ order_option(section)}
|
||||
.mx-auto.max-w-xl.text-center.sm:text-left
|
||||
%h2.text-2xl.font-bold.text-gray-900.md:text-3xl
|
||||
= section.header
|
@ -1,11 +0,0 @@
|
||||
%section.overflow-hidden.sm:grid.sm:grid-cols-2
|
||||
.p-8.m-5.bg-cyan-100.md:p-12.lg:px-16.lg:py-24
|
||||
.mx-auto.max-w-xl.text-center.sm:text-left
|
||||
%h2.text-2xl.font-bold.text-gray-900.md:text-3xl
|
||||
= section.header
|
||||
%p.hidden.text-gray-500.md:mt-4.md:block
|
||||
= section.text
|
||||
.mt-4.md:mt-8
|
||||
-if section.has_option?("button_text")
|
||||
= render 'merged/view/elements/button' , section: section
|
||||
= image_for( section , "p-5 h-56 w-full object-cover sm:h-full")
|
Reference in New Issue
Block a user