first card (with pic) and grid/loop for it

This commit is contained in:
2022-11-24 00:26:18 +02:00
parent 2638be4ad1
commit f0dbd3c95c
6 changed files with 40 additions and 3 deletions

View File

@ -0,0 +1,11 @@
.flex.flex-col.bg-cyan-100.mx-5
.flex.items-center.justify-center.flex-1
.max-w-prose.px-4.py-8.mx-auto.text-center
%h1.text-2xl.font-bold.tracking-tight.text-gray-900.sm:text-4xl
= section["header"]
%p.mt-4.text-gray-500
= section["text"]
- template = "cards/" + section["element_template"]
.grid.grid-cols-2.gap-4
- section["elements"].each do |element|
= render( template , element: element)

View File

@ -1,10 +1,7 @@
.flex.flex-col.bg-white
%img.object-cover.w-full.h-96{:alt => "", :src => "https://images.unsplash.com/photo-1558769132-cb1aea458c5e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1548&q=80"}/
.flex.items-center.justify-center.flex-1
.max-w-xl.px-4.py-8.mx-auto.text-center
%h1.text-2xl.font-bold.tracking-tight.text-gray-900.sm:text-4xl
= section["header"]
%p.mt-4.text-gray-500
= section["text"]
%a.inline-block.px-5.py-3.mt-6.text-sm.font-medium.text-white.bg-indigo-600.rounded.hover:bg-indigo-700.focus:outline-none.focus:ring{:href => "#"}
= section["button"]["text"]