style overview, sections only for now

This commit is contained in:
2022-11-29 15:57:10 +02:00
parent 4136eaf282
commit 15ef3c34fd
12 changed files with 105 additions and 6 deletions

View File

@ -11,7 +11,7 @@
.p-4
%h3.mt-4.text-lg.font-bold Section #{index + 1}
%button.mt-4.rounded-lg.bg-yellow-500.p-4
=link_to "Up" , "/index"
=link_to( "Up" , "/index")
%button.mt-4.rounded-lg.bg-yellow-500.p-4
=link_to "Down" , "/index"
%button.mt-4.rounded-lg.bg-blue-400.p-4

View File

@ -1,5 +1,6 @@
.relative.block.border.border-gray-100
%h3.mt-4.text-lg.font-bold= key.upcase
%p= value
%h3.mt-4.text-lg.font-bold= key.upcase + " : " + value
%button.ml-3.inline-block.rounded-lg.bg-blue-500.px-5.py-3.text-md.font-medium.text-white
=link_to "Change Template" , page_section_select_template_url(@page.name,@section.id)
.relative.block.border.border-gray-100
=image_tag("merged/section_preview/#{section.template}" , class: "w-full object-contain")

View File

@ -0,0 +1,25 @@
.grid.grid-cols-3.gap-4.m-8
-@styles.each do |style|
%article.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
=image_tag(style.preview , class: "h-56 w-full object-contain lg:h-72")
%p.mt-2.text-sm.text-gray-500
=style.template
%article.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
.p-6
%h3.text-lg.font-medium.text-gray-900
=style.header
%p.mt-2.text-sm.leading-relaxed.text-gray-500.line-clamp-3
= style.text
%article.overflow-hidden.rounded-lg.border.border-gray-100.shadow-sm
.p-6
%h3.text-lg.font-medium.text-gray-900
Option
%p.mt-2.text-sm.leading-relaxed.text-gray-500.line-clamp-3
Following options: none (wip)
%h3.text-lg.font-medium.text-gray-900
Cards
%p.mt-2.text-sm.leading-relaxed.text-gray-500.line-clamp-3
-if(style.cards)
Section may include cards. See card styles below
-else
Section may not include cards