add index (synthetic) to sections

This commit is contained in:
2022-11-27 14:09:16 +02:00
parent 1823f5cb3e
commit 8d405e44e1
8 changed files with 31 additions and 15 deletions

View File

@ -2,5 +2,6 @@
%h3.mt-4.text-lg.font-bold= key.upcase
%p= value
%p #{section.content['cards'].length} cards
%p view cards (index)
.relative.block.border.border-gray-100
=image_tag("cms/card_preview/#{value}" , class: "w-full object-contain")

View File

@ -1,4 +0,0 @@
.relative.block.border.border-gray-100
Cards number
.relative.block.border.border-gray-100
Card preview

View File

@ -1,4 +1,7 @@
.relative.block.border.border-gray-100
%h3.mt-4.text-lg.font-bold= key.upcase
.relative.block.border.border-gray-100
= image_tag "cms/" + value
-if value
= image_tag "cms/" + value
-else
No image

View File

@ -1,3 +1,6 @@
.p-6
%h3.mt-4.text-lg.font-bold= key.upcase
= image_tag "cms/" + value
-if value
= image_tag "cms/" + value
-else
No image

View File

@ -1,5 +1,9 @@
%p#notice= notice
%h1 Page #{@page.name}
%h4 Section #{@section.id}
.grid.grid-cols-2.gap-2.m-8
- @section.content.each do |key , value|
= render "cms/sections/editors/#{key}", section: @section , key: key , value: value