test harness is back, and pages fixed after refactor

This commit is contained in:
2022-12-08 17:16:29 +02:00
parent a8aa16170a
commit 308b9e1d2e
22 changed files with 257 additions and 23 deletions

View File

@ -27,9 +27,9 @@
%h3.mt-4.text-lg.font-bold Header
%p= section.header
%h3.mt-4.text-lg.font-bold Text
%p= section.text[0..100] + " ..."
%p= section.text[0..100] + " ..." if section.text
.relative.block.border.border-gray-100.p-4
- if section.cards?
- if section.has_cards?
%h3.mt-4.text-lg.font-bold #{section.content['cards'].length} Cards
=link_to section_cards_url(section.id) do
=card_preview(section , class: "w-full object-contain")
@ -37,7 +37,7 @@
= link_to(section_select_image_url(section.id)) do
%h3.mt-4.text-lg.font-bold Image
-if section.image
= image_tag "cms/" + section.image
= image_tag( "cms/" + section.image , class: "h-40")
-else
%p No image
.relative.block.border.border-gray-100.p-4

View File

@ -40,7 +40,7 @@
= red_button( "Remove image", section_set_image_path( @section.id , image: ""))
.grid.grid-cols-3.gap-2.m-8
- if( @section.cards? )
- if( @section.has_cards? )
.relative.block.border.border-gray-100
%h3.mt-4.text-lg.font-bold Card Template #{@section.card_template}
=card_preview(@section , class: "w-full object-contain")

View File

@ -22,7 +22,7 @@
%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?)
-if(style.has_cards?)
Section may include cards. See card styles below
-else
Section may not include cards