more card wittling
This commit is contained in:
@ -13,3 +13,4 @@
|
||||
.relative.block.border.border-gray-100
|
||||
= link_to( card_set_image_path( image: name)) do
|
||||
=image_tag("#{image_root}/#{name}" , class: "h-56 w-full object-contain lg:h-72")
|
||||
= image.name
|
||||
|
@ -11,7 +11,7 @@
|
||||
-@page.sections.each do |section |
|
||||
.grid.grid-cols-5.gap-2.m-8{class: (section.index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' }
|
||||
.relative.block.border.border-gray-100.p-4
|
||||
%h3.mt-4.text-lg.font-bold Section #{section.index + 1}
|
||||
%h3.mt-4.text-lg.font-bold Section #{section.index + 1} : #{section.header}
|
||||
= blue_button( "Up" , section_move_url(section.id , dir: :up) )
|
||||
= blue_button( "Down" , section_move_url(section.id , dir: :down) )
|
||||
= yellow_button("Edit" , section_path(section.id) )
|
||||
|
@ -10,7 +10,7 @@
|
||||
%h3.text-xl.font-bold.tracking-tight.text-gray-900
|
||||
Section #{@section.index + 1} / #{@section.page.sections.length}
|
||||
- unless @section.index == 0
|
||||
=link_to "(prev)" , section_url(@section.previous_section.id)
|
||||
=link_to "(prev)" , section_url(@section.previous_section.id)
|
||||
- unless @section.index == (@section.page.sections.length - 1)
|
||||
=link_to "(next)" , section_url(@section.next_section.id)
|
||||
.grid.grid-cols-3.gap-2.m-8
|
||||
@ -18,7 +18,7 @@
|
||||
%h3.mt-4.text-lg.font-bold Template #{@section.template}
|
||||
= section_preview(@section , class: "w-full object-contain p-3")
|
||||
= yellow_button( "Change Template" , section_select_template_url(@section.id))
|
||||
= green_button( "New Section" , new_page_section_url(@section.page.name) )
|
||||
= green_button( "New Section" , new_page_section_url(@section.page.name , template: @section.template) )
|
||||
|
||||
.relative.block.border.border-gray-100
|
||||
= section_form( class: "mx-auto mt-8 mb-0 max-w space-y-4") do
|
||||
|
@ -1,7 +1,9 @@
|
||||
.group.m-8.overflow-hidden.relative.flex.h-96.items-end.bg-black
|
||||
.group.m-8.overflow-hidden.relative.flex.h-96.items-end
|
||||
= image_for( card , "absolute inset-0 h-full w-full object-cover hover:scale-110 ease-in duration-700")
|
||||
.relative.w-full.bg-cyan-600.m-2.p-4.text-center.tracking-widest.text-white.transition-colors.group-hover:bg-cyan-700{:class => "sm:w-1/2"}
|
||||
%h3.text-lg.uppercase
|
||||
= card.header
|
||||
%p.mt-1.text-xs.font-medium
|
||||
= card.text
|
||||
.relative.w-full.m-2.p-4.tracking-widest{align_option(card ,"sm:w-1/2")}
|
||||
%div.transition-colors.group-hover:bg-black.group-hover:text-white{options(card , :align , :color , :background)}
|
||||
.relative.w-full.m-2.p-4
|
||||
%h3.text-lg
|
||||
= card.header
|
||||
%p.mt-1.text-xs.font-medium
|
||||
= card.text
|
||||
|
@ -1,2 +1,2 @@
|
||||
- unless section.has_option?("button_text") and section.has_option?("button_link")
|
||||
= blue_button( section.button_text , section.button_link)
|
||||
- if section.has_option?("button_text") and section.has_option?("button_link")
|
||||
= blue_button( section.option("button_text") , section.option("button_link"))
|
||||
|
Reference in New Issue
Block a user