Added background and foreground settings to blocks, and scroll in animations

This commit is contained in:
Jakub Dorfman 2026-05-18 18:39:49 +02:00
parent b4fbf3e411
commit 94c1e0b679
24 changed files with 826 additions and 44 deletions

View file

@ -10,7 +10,14 @@ export const blockLabels: Record<BlockType, string> = {
services: 'Services',
cta: 'Call to Action',
spacer: 'Spacer',
horizontal_cards: 'Horizontal Cards'
horizontal_cards: 'Horizontal Cards',
hero: 'Hero',
columns: 'Columns',
pricing_table: 'Pricing Table',
newsletter: 'Newsletter',
articles_list: 'Articles List',
profile_card: 'Profile Card',
features_list: 'Features List'
};
export const blockTypes = Object.keys(blockLabels) as BlockType[];
@ -45,6 +52,86 @@ export function createBlock(type: BlockType): ContentBlock {
case 'horizontal_cards':
base.data = { items: [{ title: 'Card title', description: 'Card description', url: '', link: '' }] };
break;
case 'hero':
base.data = {
heading: 'Holistic and Experiential Learning about Happiness',
subheading: 'Individual sessions, workshops and events in Oslo',
buttonLabel: 'BOOK NOW',
buttonUrl: '/book',
backgroundImage: ''
};
break;
case 'columns':
base.data = {
heading: 'Elements of Holistic Sexology',
items: [
{ title: 'Coaching and Mind Work', content: '<p>Explore beliefs, thoughts and emotions associated with your sexuality.</p>', icon: '🧠' },
{ title: 'Somatic Practices', content: '<p>Use sound, breathing, movement, touch to increase sensitivity.</p>', icon: '🧘' },
{ title: 'Harmonizing the Energy System', content: '<p>Techniques of Shiatsu based on Chinese medicine to resolve blockages.</p>', icon: '⚡' }
]
};
break;
case 'pricing_table':
base.data = {
heading: 'Prices',
items: [
{ duration: '60 min', price: '2000 NOK' },
{ duration: '90 min', price: '2500 NOK' },
{ duration: '120 min', price: '3000 NOK' },
{ duration: '150 min', price: '3500 NOK' },
{ duration: '180 min', price: '4000 NOK' }
]
};
break;
case 'newsletter':
base.data = {
heading: 'Want to stay connected?',
subtext: 'Sign up to receive my free videos and articles that allow you to know more about the secrets of sexual bliss.',
buttonLabel: 'Yes, please!',
placeholder: 'Your email address'
};
break;
case 'articles_list':
base.data = {
heading: 'My Favourite Articles',
items: [
{ title: 'As a "real" man you need to be hard! Sexual performance anxiety in men', url: '/article1' },
{ title: 'Listen to your body! What numbness is communicating to you?', url: '/article2' },
{ title: 'Reclaim your pleasure and joy! Consent and clear empowered communication are the basis', url: '/article3' }
]
};
break;
case 'profile_card':
base.data = {
name: 'Alegría',
tagline: 'Holistic Sensual Massage Therapist',
image: '',
description: '<p>Let yourself be pampered like Caesar by Cleopatra.</p>',
education: ['Professional training in holistic sensual massage Core Touch I and II'],
contact: '+47 40158395',
profileUrl: ''
};
break;
case 'features_list':
base.data = {
heading: 'In my sessions, I teach...',
categories: [
{
title: 'For men',
items: ['Overcome sexual anxiety', 'Last as long as you want', 'Treat erectile dysfunction without drugs']
},
{
title: 'For women',
items: ['Increase sensitivity in the whole body', 'Unlock every possible kind of orgasm', 'Release fear, shame and trauma']
},
{
title: 'For couples',
items: ['Feel more connected while lovemaking', 'Master the art of Tantric sex', 'Deepen your relationship']
}
]
};
break;
}
base.data._background = { type: 'none', color: '', imageUrl: '', attachment: 'scroll', overlay: false, overlayOpacity: 40 };
return base;
}