half section, split out button

This commit is contained in:
Torsten 2022-11-23 11:05:22 +02:00
parent 952c04d915
commit fbf07187b7
7 changed files with 30 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

View File

@ -9,4 +9,10 @@ module CmsHelper
img = image_url "cms/house.jpg"
"background-image: url('#{img}');"
end
def image_for(section , classes)
image_tag("cms/#{section['image']}" , class: classes)
end
def has_button(section)
section['button']
end
end

View File

@ -0,0 +1,2 @@
%a.inline-block.rounded.bg-emerald-600.px-12.py-3.text-sm.font-medium.text-white.transition.hover:bg-emerald-700.focus:outline-none.focus:ring.focus:ring-yellow-400{:href => button["link"]}
=button['text']

View File

@ -5,7 +5,7 @@
.mx-auto.max-w-xl.text-center
%h2.text-2xl.font-bold.text-white.md:text-5xl
= section["header"]
%p.hidden.sm:mt-4.sm:block.text-lg{class: "text-white/90"}
%p.hidden.sm:mt-4.sm:block.text-2xl.text-white
= section["text"]
.mt-4.md:mt-8
-if section["button_text"]

View File

@ -0,0 +1,11 @@
%section.overflow-hidden.bg-gray-50.sm:grid.sm:grid-cols-2
.p-8.md:p-12.lg:px-16.lg:py-24
.mx-auto.max-w-xl.text-center.sm:text-left
%h2.text-2xl.font-bold.text-gray-900.md:text-3xl
= section["header"]
%p.hidden.text-gray-500.md:mt-4.md:block
= section["text"]
.mt-4.md:mt-8
-if section["button"]
= render 'elements/button' , button: section["button"]
= image_for( section , "h-56 w-full object-cover sm:h-full")

View File

@ -1,6 +1,15 @@
- template: section_hero2
- template: section_full_left2
header: HUB FEENIX
text:
Only an hour west of Helsinki, the Feenix rises from an old sanatorium.
The Hub is a place to create, learn and regenerate.
image: house.jpg
- template: section_half_right
header: Retreats
text:
Hub Feenix is a beautiful place, ideally situated in the country, but close to Helsinki.
We have different sized studios and spaces, to organise retreats for up to 100 people.
button:
text: Retreats
link: retreats
image: retreats.jpg