tricks for full image section (renamed from full_left)
This commit is contained in:
@ -7,8 +7,8 @@
|
||||
%p will be taken from uploaded file
|
||||
= hidden_field_tag :redirect , card_set_image_url(@card.id,image: "NEW")
|
||||
= file_field_tag 'image_file'
|
||||
.inline-block.rounded.border.border-indigo-600.bg-indigo-600.px-12.py-3.text-sm.font-medium.text-white.hover:bg-transparent.hover:text-indigo-600.focus:outline-none.focus:ring.active:text-indigo-500{:href => merged.new_image_path}
|
||||
= submit_tag 'Submit'
|
||||
= submit_button 'Submit'
|
||||
|
||||
-@images.each do |name , image|
|
||||
.relative.block.border.border-gray-100
|
||||
= link_to( card_set_image_path( image: name)) do
|
||||
|
@ -6,8 +6,7 @@
|
||||
%h5.mt-4.text-lg.font-bold Name is optional
|
||||
%p will be taken from uploaded file
|
||||
= file_field_tag 'image_file'
|
||||
.inline-block.rounded.border.border-indigo-600.bg-indigo-600.px-12.py-3.text-sm.font-medium.text-white.hover:bg-transparent.hover:text-indigo-600.focus:outline-none.focus:ring.active:text-indigo-500{:href => merged.new_image_path}
|
||||
= submit_tag 'Submit'
|
||||
= submit_button 'Submit'
|
||||
-@images.each do |name , image|
|
||||
.relative.block.border.border-gray-100
|
||||
=image_tag("cms/#{name}" , class: "h-56 w-full object-contain lg:h-72")
|
||||
|
@ -7,9 +7,9 @@
|
||||
%p will be taken from uploaded file
|
||||
= hidden_field_tag :redirect , section_set_image_url(@section.id,image: "NEW")
|
||||
= file_field_tag 'image_file'
|
||||
.inline-block.rounded.border.border-indigo-600.bg-indigo-600.px-12.py-3.text-sm.font-medium.text-white.hover:bg-transparent.hover:text-indigo-600.focus:outline-none.focus:ring.active:text-indigo-500{:href => merged.new_image_path}
|
||||
= submit_tag 'Submit'
|
||||
= submit_button 'Submit'
|
||||
-@images.each do |name , image|
|
||||
.relative.block.border.border-gray-100
|
||||
= link_to( section_set_image_path( image: name)) do
|
||||
=image_tag("#{image_root}/#{name}" , class: "h-56 w-full object-contain lg:h-72")
|
||||
= image.name
|
||||
|
22
app/views/merged/view/_section_full_image.haml
Normal file
22
app/views/merged/view/_section_full_image.haml
Normal file
@ -0,0 +1,22 @@
|
||||
%section.overflow-hidden.bg-cover.bg-center.bg-no-repeat{bg(section)}
|
||||
.px-4.py-8.sm:px-6.lg:px-8
|
||||
.grid.grid-cols-1.md:grid-cols-3
|
||||
-if(section.option("align") == "center")
|
||||
%div
|
||||
-if(section.option("align") == "right")
|
||||
%div
|
||||
%div
|
||||
.p-8.md:p-12.lg:px-16.lg:py-24{shade_option(section)}
|
||||
.mx-auto.max-w-xl{ options(section , :color)}
|
||||
%h2.text-2xl.font-bold.md:text-5xl
|
||||
= section.header
|
||||
%p.hidden.sm:mt-4.sm:block.text-2xl
|
||||
= section.text
|
||||
.mt-4.md:mt-8
|
||||
-if section.has_option?("button_text")
|
||||
= render 'merged/view/elements/button' , section: section
|
||||
-if(section.option("align") == "center")
|
||||
%div
|
||||
-if(section.option("align") == "left")
|
||||
%div
|
||||
%div
|
@ -1,13 +0,0 @@
|
||||
%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'}
|
||||
.mx-auto.max-w-xl.text-center
|
||||
%h2.text-2xl.font-bold.text-white.md:text-5xl
|
||||
= section.header
|
||||
%p.hidden.sm:mt-4.sm:block.text-2xl.text-white
|
||||
= section.text
|
||||
.mt-4.md:mt-8
|
||||
-if section.has_option?("button_text")
|
||||
= render 'merged/view/elements/button' , section: section
|
||||
.grid.grid-cols-2.gap-4.md:grid-cols-1.lg:grid-cols-2
|
@ -1,7 +1,7 @@
|
||||
.flex.flex-col.m-20.bg-white
|
||||
.flex.flex-col.m-20{ options(section , :background , :color)}
|
||||
.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
|
||||
.max-w-prose.px-4.py-16.mx-auto.text-center
|
||||
%h1.text-2xl.font-bold.tracking-tight.sm:text-4xl
|
||||
= section.header
|
||||
%p.mt-4.text-gray-500
|
||||
%p.mt-4.text-lg.pt-10
|
||||
= section.text
|
||||
|
Reference in New Issue
Block a user