diff --git a/app/assets/images/cms/retreats.jpg b/app/assets/images/cms/retreats.jpg new file mode 100644 index 0000000..b937993 Binary files /dev/null and b/app/assets/images/cms/retreats.jpg differ diff --git a/app/helpers/cms_helper.rb b/app/helpers/cms_helper.rb index 6628513..7d0ee2b 100644 --- a/app/helpers/cms_helper.rb +++ b/app/helpers/cms_helper.rb @@ -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 diff --git a/app/views/elements/_button.haml b/app/views/elements/_button.haml new file mode 100644 index 0000000..a4d6c0f --- /dev/null +++ b/app/views/elements/_button.haml @@ -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'] diff --git a/app/views/sections/_section_hero1.haml b/app/views/sections/_section_full_left1.haml similarity index 100% rename from app/views/sections/_section_hero1.haml rename to app/views/sections/_section_full_left1.haml diff --git a/app/views/sections/_section_hero2.haml b/app/views/sections/_section_full_left2.haml similarity index 92% rename from app/views/sections/_section_hero2.haml rename to app/views/sections/_section_full_left2.haml index c99d81e..fef7853 100644 --- a/app/views/sections/_section_hero2.haml +++ b/app/views/sections/_section_full_left2.haml @@ -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"] diff --git a/app/views/sections/_section_half_right.haml b/app/views/sections/_section_half_right.haml new file mode 100644 index 0000000..f6ab054 --- /dev/null +++ b/app/views/sections/_section_half_right.haml @@ -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") diff --git a/cms/index.yaml b/cms/index.yaml index 53f83e9..b70e35e 100644 --- a/cms/index.yaml +++ b/cms/index.yaml @@ -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