changing to flex, polishing menu
This commit is contained in:
parent
fe26829194
commit
a7067a52fa
@ -1,3 +1,7 @@
|
|||||||
|
- content_for( :merged_menu ) do
|
||||||
|
.text-xl.font-bold.text-gray-900
|
||||||
|
All Images
|
||||||
|
|
||||||
= render "layouts/merged_header"
|
= render "layouts/merged_header"
|
||||||
|
|
||||||
.grid.grid-cols-6.gap-4.m-8
|
.grid.grid-cols-6.gap-4.m-8
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
- content_for( :merged_menu ) do
|
||||||
|
.text-xl.font-bold.text-gray-900
|
||||||
|
All Pages
|
||||||
|
|
||||||
= render "layouts/merged_header"
|
= render "layouts/merged_header"
|
||||||
.overflow-hidden.overflow-x-auto.rounded-lg.border.border-gray-200.m-20
|
.overflow-hidden.overflow-x-auto.rounded-lg.border.border-gray-200.m-20
|
||||||
%table.min-w-full.divide-y.divide-gray-200.text-sm
|
%table.min-w-full.divide-y.divide-gray-200.text-sm
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
= render "layouts/merged_header"
|
= render "layouts/merged_header"
|
||||||
|
|
||||||
-@page.sections.each do |section |
|
-@page.sections.each do |section |
|
||||||
.flex.gap-10.m-8{class: (section.index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' , id: "section_#{section.id}"}
|
.flex.gap-10.p-4{class: (section.index%2)==1 ? 'bg-cyan-50' : 'bg-red-50' , id: "section_#{section.id}"}
|
||||||
.basis-52
|
.basis-80
|
||||||
%h3.mt-4.text-lg.font-bold Section #{section.index} : #{section.header}
|
%h3.mt-4.text-lg.font-bold Section #{section.index} : #{section.header}
|
||||||
= blue_button( "Up" , section_move_url(section.id , dir: :up) )
|
= blue_button( "Up" , section_move_url(section.id , dir: :up) )
|
||||||
= blue_button( "Down" , section_move_url(section.id , dir: :down) )
|
= blue_button( "Down" , section_move_url(section.id , dir: :down) )
|
||||||
@ -17,17 +17,17 @@
|
|||||||
= green_button( "Copy" , new_page_section_url(@page.id, template: section.template) )
|
= green_button( "Copy" , new_page_section_url(@page.id, template: section.template) )
|
||||||
= form_tag( section_url(section.id) , {method: :delete } ) do
|
= form_tag( section_url(section.id) , {method: :delete } ) do
|
||||||
=submit_button( "Delete" , true)
|
=submit_button( "Delete" , true)
|
||||||
.basis-52.grow-0
|
.basis-72
|
||||||
%h3.mt-4.text-lg.font-bold Template
|
%h3.mt-4.text-lg.font-bold Template
|
||||||
= link_to(section_select_template_url(section.id)) do
|
= link_to(section_select_template_url(section.id)) do
|
||||||
%p= section.template
|
%p= section.template
|
||||||
= section_preview(section , class: "object-contain")
|
= section_preview(section , class: "object-contain")
|
||||||
.basis-52
|
.basis-52.grow
|
||||||
%h3.mt-4.text-lg.font-bold Header
|
%h3.mt-4.text-lg.font-bold Header
|
||||||
%p= section.header
|
%p= section.header
|
||||||
%h3.mt-4.text-lg.font-bold Text
|
%h3.mt-4.text-lg.font-bold Text
|
||||||
%p= section.text[0..100] + " ..." if section.text
|
%p= section.text[0..100] + " ..." if section.text
|
||||||
.basis-52
|
.basis-72
|
||||||
- if section.has_cards?
|
- if section.has_cards?
|
||||||
%h3.mt-4.text-lg.font-bold #{section.cards.length} Cards
|
%h3.mt-4.text-lg.font-bold #{section.cards.length} Cards
|
||||||
=link_to section_cards_url(section.id) do
|
=link_to section_cards_url(section.id) do
|
||||||
@ -39,7 +39,7 @@
|
|||||||
= image_tag( "cms/" + section.image , class: "h-40")
|
= image_tag( "cms/" + section.image , class: "h-40")
|
||||||
-else
|
-else
|
||||||
%p No image
|
%p No image
|
||||||
.basis-52
|
.basis-52.grow
|
||||||
%h3.mt-4.text-lg.font-bold Options
|
%h3.mt-4.text-lg.font-bold Options
|
||||||
- section.options.each do|name , value|
|
- section.options.each do|name , value|
|
||||||
%p
|
%p
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.text-xl.font-bold.text-gray-900
|
.text-xl.font-bold.text-gray-900
|
||||||
Page #{link_to @section.page.name, page_sections_url(@section.page.id), class: "underline"}
|
Page #{link_to @section.page.name, page_sections_url(@section.page.id), class: "underline"}
|
||||||
.text-xl.text-gray-900
|
.text-xl.text-gray-900
|
||||||
Select Template for Section #{@section.index}
|
Select Template for Section #{@section.index} - #{@section.header}
|
||||||
|
|
||||||
= render "layouts/merged_header"
|
= render "layouts/merged_header"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.text-xl.font-bold.text-gray-900
|
.text-xl.font-bold.text-gray-900
|
||||||
Page #{link_to @section.page.name, page_sections_url(@section.page.id), class: "underline"}
|
Page #{link_to @section.page.name, page_sections_url(@section.page.id), class: "underline"}
|
||||||
.text-xl.text-gray-900
|
.text-xl.text-gray-900
|
||||||
Section #{@section.index} / #{@section.page.sections.length}
|
Section #{@section.index} / #{@section.page.sections.length} : #{@section.header}
|
||||||
- if @section.previous_section
|
- if @section.previous_section
|
||||||
=link_to "(prev)" , section_url(@section.previous_section.id)
|
=link_to "(prev)" , section_url(@section.previous_section.id)
|
||||||
- if @section.next_section
|
- if @section.next_section
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
- content_for( :merged_menu ) do
|
||||||
|
.text-xl.font-bold.text-gray-900
|
||||||
|
Section styles
|
||||||
|
|
||||||
= render "layouts/merged_header"
|
= render "layouts/merged_header"
|
||||||
|
|
||||||
.px-4.py-8.mx-auto.text-center
|
|
||||||
%h1.text-4xl.font-bold
|
|
||||||
Section styles
|
|
||||||
.grid.grid-cols-3.gap-4.m-8
|
.grid.grid-cols-3.gap-4.m-8
|
||||||
-@section_styles.each do | style|
|
-@section_styles.each do | style|
|
||||||
%article.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
|
%article.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
|
||||||
|
Loading…
Reference in New Issue
Block a user