refresh theme-one starter blocks and layout

Redesign the master layout and content blocks with responsive styling, accessible navigation, and configurable CTA and quote sections. Add about-me, embedded-code, and FAQ blocks, and update the generated theme assets. Replace Alpine-based locale handling with vanilla JavaScript for locale flags and gallery lightboxes, and remove Alpine and DaisyUI dependencies.
This commit is contained in:
2026-11-25 17:50:12 +01:00
parent 102fbc9464
commit ed8ae3200b
48 changed files with 1166 additions and 2353 deletions
@@ -0,0 +1,39 @@
<?php
return [
'title' => 'About Me',
'category' => 'Sections',
'icon' => 'ph ph-user-circle',
'settings' => [
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'A little about me'
],
'name' => [
'label' => 'Name',
'type' => 'text',
'value' => 'Your name'
],
'role' => [
'label' => 'Role or profession',
'type' => 'text',
'value' => 'Designer and maker'
],
'biography' => [
'label' => 'Biography',
'type' => 'text',
'value' => 'I help people turn good ideas into thoughtful, useful experiences. I believe the best work comes from listening carefully, staying curious, and paying attention to the details.'
],
'image_src' => [
'label' => 'Portrait image URL',
'type' => 'text',
'value' => 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=900&q=80'
],
'image_alt' => [
'label' => 'Image alternative text',
'type' => 'text',
'value' => 'Portrait of a creative professional'
],
]
];
+15
View File
@@ -0,0 +1,15 @@
<section class="bg-slate-50 px-4 py-12 sm:py-16">
<div class="mx-auto grid max-w-6xl gap-10 md:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)] md:items-center">
<?php if (strlen($block->setting('image_src')) > 0) : ?>
<div class="overflow-hidden rounded-2xl bg-slate-200">
<img class="aspect-square h-full w-full object-cover" src="<?= $block->setting('image_src') ?>" alt="<?= $block->setting('image_alt') ?>" loading="lazy" decoding="async">
</div>
<?php endif; ?>
<div>
<h2 class="mb-6 text-3xl font-semibold tracking-tight text-slate-900 sm:text-4xl"><?= $block->setting('heading') ?></h2>
<h3 class="text-xl font-semibold text-slate-900"><?= $block->setting('name') ?></h3>
<p class="mt-1 text-sm font-medium text-slate-500"><?= $block->setting('role') ?></p>
<p class="mt-5 text-base leading-7 text-slate-600"><?= $block->setting('biography') ?></p>
</div>
</div>
</section>
+2 -19
View File
@@ -2,24 +2,7 @@
return [
'title' => 'Button',
'category' => 'Layout',
'category' => 'Content',
'hidden' => true,
'icon' => 'fa fa-hand-peace-o',
'settings' => [
"order" => [
"type" => "select",
"label" => "Image Position",
"value" => "md:flex-row",
"options" => [
[
"id" => "md:flex-row",
"name" => "Right"
],
[
"id" => "md:flex-row-reverse",
"name" => "Left"
]
]
],
]
'icon' => 'ph ph-cursor-click',
];
+2 -2
View File
@@ -1,3 +1,3 @@
<a class="p-4 rounded bg-primary-300" href="#">
button
<a class="inline-flex items-center justify-center rounded-lg bg-slate-900 px-5 py-3 text-sm font-semibold text-white transition hover:bg-slate-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-900" href="/contact">
Get in touch
</a>
+1 -15
View File
@@ -4,19 +4,5 @@ return [
'title' => 'Column',
'category' => 'Layout',
'hidden' => true,
'icon' => 'fa fa-hand-peace-o',
'settings' => [
'text' => [
'label'=> 'Text',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
],
'texti' => [
'label'=> 'Text',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
],
]
'icon' => 'ph ph-columns',
];
+1 -1
View File
@@ -1,3 +1,3 @@
<div class="col p-8 border rounded" phpb-blocks-container>
<div class="min-w-0 rounded-xl border border-slate-200 bg-white p-6 sm:p-8" phpb-blocks-container>
[block slug="paragraph"]
</div>
+22 -6
View File
@@ -3,13 +3,29 @@
return [
'title' => 'CTA',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o',
'icon' => 'ph ph-megaphone',
'settings' => [
'person' => [
'label'=> 'Height',
'heading' => [
'label' => 'Heading',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
]
'placeholder' => 'Add a short call to action',
'value' => 'Ready to take the next step?'
],
'message' => [
'label' => 'Supporting text',
'type' => 'text',
'placeholder' => 'Explain what visitors can do next',
'value' => 'Get in touch to talk about how we can help.'
],
'button_label' => [
'label' => 'Button label',
'type' => 'text',
'value' => 'Contact us'
],
'button_url' => [
'label' => 'Button URL',
'type' => 'text',
'value' => '/contact'
],
]
];
+7 -7
View File
@@ -1,9 +1,9 @@
<section class="bg-gray-50 dark:bg-gray-800">
<div class="max-w-screen-xl px-4 py-8 mx-auto lg:py-16 lg:px-6">
<div class="max-w-screen-sm mx-auto text-center">
<h2 class="mb-4 text-3xl font-extrabold leading-tight tracking-tight text-gray-900 dark:text-white">Start your free trial today</h2>
<p class="mb-6 font-light text-gray-500 dark:text-gray-400 md:text-lg">Try Landwind Platform for 30 days. No credit card required.</p>
<a href="#" class="text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:bg-purple-600 dark:hover:bg-purple-700 focus:outline-none dark:focus:ring-purple-800">Free trial for 30 days</a>
</div>
<section class="bg-slate-100 px-4 py-12 sm:py-16">
<div class="mx-auto max-w-3xl text-center">
<h2 class="mb-4 text-3xl font-semibold tracking-tight text-slate-900 sm:text-4xl"><?= $block->setting('heading') ?></h2>
<p class="mb-8 text-lg leading-7 text-slate-600"><?= $block->setting('message') ?></p>
<a href="<?= $block->setting('button_url') ?>" class="inline-flex items-center justify-center rounded-lg bg-slate-900 px-5 py-3 text-sm font-semibold text-white transition hover:bg-slate-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-900">
<?= $block->setting('button_label') ?>
</a>
</div>
</section>
@@ -0,0 +1,7 @@
<?php
return [
'title' => 'Embedded Code',
'category' => 'Content',
'icon' => 'ph ph-code-block',
];
@@ -0,0 +1,5 @@
<section class="px-4 py-8">
<div class="mx-auto max-w-5xl rounded-xl border border-dashed border-slate-300 bg-slate-50 p-6 text-slate-500 sm:p-8" data-raw-content phpb-editable>
<p>Place approved embed content here using the existing trusted page-editor workflow.</p>
</div>
</section>
@@ -0,0 +1,20 @@
<?php
return [
'title' => 'FAQ Item',
'category' => 'Content',
'hidden' => true,
'icon' => 'ph ph-question',
'settings' => [
'question' => [
'label' => 'Question',
'type' => 'text',
'value' => 'How does the process begin?'
],
'answer' => [
'label' => 'Answer',
'type' => 'text',
'value' => 'We start with a conversation about your goals, audience, and the outcome you want to achieve.'
],
]
];
@@ -0,0 +1,9 @@
<details class="group rounded-xl border border-slate-200 bg-white">
<summary class="flex cursor-pointer list-none items-center justify-between gap-4 px-5 py-4 font-semibold text-slate-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-700">
<span><?= $block->setting('question') ?></span>
<span class="text-xl font-normal text-slate-500 transition group-open:rotate-45" aria-hidden="true">+</span>
</summary>
<div class="px-5 pb-5 text-slate-600">
<p class="leading-7"><?= $block->setting('answer') ?></p>
</div>
</details>
+25
View File
@@ -0,0 +1,25 @@
<?php
return [
'title' => 'FAQ Section',
'category' => 'Sections',
'icon' => 'ph ph-question',
'settings' => [
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'Frequently asked questions'
],
'intro' => [
'label' => 'Supporting text',
'type' => 'text',
'value' => 'Find quick answers to common questions about our services and process.'
],
'item_count' => [
'label' => 'Number of questions (1–10)',
'type' => 'number',
'value' => '5',
'placeholder' => '5'
],
]
];
+16
View File
@@ -0,0 +1,16 @@
<?php
$itemCount = max(1, min(10, intval($block->setting('item_count'))));
?>
<section class="px-4 py-12 sm:py-16">
<div class="mx-auto max-w-4xl">
<div class="mb-8 max-w-3xl">
<h2 class="text-3xl font-semibold tracking-tight text-slate-900 sm:text-4xl"><?= $block->setting('heading') ?></h2>
<p class="mt-4 text-lg leading-7 text-slate-600"><?= $block->setting('intro') ?></p>
</div>
<div class="space-y-3">
<?php for ($i = 0; $i < $itemCount; $i++): ?>
[block slug="faq-item" id="faq-item-<?= $i ?>"]
<?php endfor; ?>
</div>
</div>
</section>
@@ -0,0 +1,35 @@
<?php
return [
'title' => 'Feature Card',
'category' => 'Content',
'hidden' => true,
'icon' => 'ph ph-cardholder',
'settings' => [
'symbol' => [
'label' => 'Icon or symbol',
'type' => 'text',
'value' => '✦'
],
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'Clear direction'
],
'description' => [
'label' => 'Description',
'type' => 'text',
'value' => 'Start with a clear plan shaped around your goals and the people you want to reach.'
],
'link_label' => [
'label' => 'Link label',
'type' => 'text',
'value' => 'Learn more'
],
'link_url' => [
'label' => 'Link URL',
'type' => 'text',
'value' => '/services'
],
]
];
@@ -0,0 +1,10 @@
<article class="h-full rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md">
<span class="mb-5 inline-flex h-11 w-11 items-center justify-center rounded-lg bg-slate-100 text-xl text-slate-900" aria-hidden="true"><?= $block->setting('symbol') ?></span>
<h3 class="text-xl font-semibold text-slate-900"><?= $block->setting('heading') ?></h3>
<p class="mt-3 leading-7 text-slate-600"><?= $block->setting('description') ?></p>
<?php if (strlen($block->setting('link_url')) > 0) : ?>
<a class="mt-5 inline-flex items-center gap-2 text-sm font-semibold text-slate-900 underline decoration-slate-300 underline-offset-4 hover:decoration-slate-900" href="<?= $block->setting('link_url') ?>">
<?= $block->setting('link_label') ?>
</a>
<?php endif; ?>
</article>
@@ -0,0 +1,25 @@
<?php
return [
'title' => 'Feature Cards',
'category' => 'Sections',
'icon' => 'ph ph-cards',
'settings' => [
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'Thoughtful solutions for every stage'
],
'intro' => [
'label' => 'Supporting text',
'type' => 'text',
'value' => 'Highlight the services, strengths, or benefits that matter most to your visitors.'
],
'card_count' => [
'label' => 'Number of cards (1–6)',
'type' => 'number',
'value' => '3',
'placeholder' => '3'
],
]
];
@@ -0,0 +1,16 @@
<?php
$cardCount = max(1, min(6, intval($block->setting('card_count'))));
?>
<section class="px-4 py-12 sm:py-16">
<div class="mx-auto max-w-7xl">
<div class="mb-10 max-w-3xl">
<h2 class="text-3xl font-semibold tracking-tight text-slate-900 sm:text-4xl"><?= $block->setting('heading') ?></h2>
<p class="mt-4 text-lg leading-7 text-slate-600"><?= $block->setting('intro') ?></p>
</div>
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
<?php for ($i = 0; $i < $cardCount; $i++): ?>
[block slug="feature-card" id="feature-card-<?= $i ?>"]
<?php endfor; ?>
</div>
</div>
</section>
@@ -0,0 +1,25 @@
<?php
return [
'title' => 'Gallery Image',
'category' => 'Content',
'hidden' => true,
'icon' => 'ph ph-image',
'settings' => [
'image_src' => [
'label' => 'Image source URL',
'type' => 'text',
'value' => 'https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1200&q=80'
],
'image_alt' => [
'label' => 'Image alternative text',
'type' => 'text',
'value' => 'Rolling hills beneath a cloudy sky'
],
'caption' => [
'label' => 'Caption',
'type' => 'text',
'value' => 'A quiet moment in the landscape'
],
]
];
@@ -0,0 +1,10 @@
<figure class="overflow-hidden rounded-xl bg-slate-100">
<?php if (strlen($block->setting('image_src')) > 0) : ?>
<a class="group block focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-700" href="<?= $block->setting('image_src') ?>" target="_blank" rel="noopener noreferrer" data-gallery-trigger>
<img class="aspect-square w-full object-cover transition duration-300 group-hover:scale-105" src="<?= $block->setting('image_src') ?>" alt="<?= $block->setting('image_alt') ?>" loading="lazy" decoding="async">
</a>
<?php endif; ?>
<?php if (strlen($block->setting('caption')) > 0) : ?>
<figcaption class="px-3 py-2 text-sm text-slate-600"><?= $block->setting('caption') ?></figcaption>
<?php endif; ?>
</figure>
@@ -0,0 +1,25 @@
<?php
return [
'title' => 'Gallery',
'category' => 'Sections',
'icon' => 'ph ph-images',
'settings' => [
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'A selection of our work'
],
'item_count' => [
'label' => 'Number of images (1–12)',
'type' => 'number',
'value' => '6',
'placeholder' => '6'
],
'lightbox_enabled' => [
'label' => 'Enable image lightbox',
'type' => 'yes_no',
'value' => 1
],
]
];
+24
View File
@@ -0,0 +1,24 @@
<?php
$itemCount = max(1, min(12, intval($block->setting('item_count'))));
$lightboxEnabled = (int) $block->setting('lightbox_enabled') === 1;
?>
<section class="px-4 py-12 sm:py-16" data-gallery data-gallery-lightbox="<?= $lightboxEnabled ? 'true' : 'false' ?>">
<div class="mx-auto max-w-7xl">
<h2 class="mb-8 text-3xl font-semibold tracking-tight text-slate-900 sm:text-4xl"><?= $block->setting('heading') ?></h2>
<div class="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4">
<?php for ($i = 0; $i < $itemCount; $i++): ?>
[block slug="gallery-item" id="gallery-item-<?= $i ?>"]
<?php endfor; ?>
</div>
<?php if ($lightboxEnabled) : ?>
<dialog class="m-auto max-h-[90vh] max-w-[90vw] overflow-visible border-0 bg-transparent p-0 text-white backdrop:bg-slate-950/80" data-gallery-dialog aria-label="Gallery image preview">
<form method="dialog" class="absolute right-2 top-2 z-10">
<button class="rounded-full bg-white/90 p-2 text-slate-900 shadow hover:bg-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white" aria-label="Close image preview">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 6l12 12M18 6L6 18" /></svg>
</button>
</form>
<img class="max-h-[90vh] max-w-[90vw] rounded-lg object-contain" data-gallery-lightbox-image alt="">
</dialog>
<?php endif; ?>
</div>
</section>
@@ -3,7 +3,8 @@
return [
'title' => 'Hello World',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o',
'hidden' => true,
'icon' => 'ph ph-hand-wave',
'settings' => [
'height' => [
'label'=> 'Height',
+44
View File
@@ -0,0 +1,44 @@
<?php
return [
'title' => 'Hero',
'category' => 'Sections',
'icon' => 'ph ph-panorama',
'settings' => [
'eyebrow' => [
'label' => 'Eyebrow',
'type' => 'text',
'value' => 'A better way to build your website'
],
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'Make your next idea a reality'
],
'message' => [
'label' => 'Supporting text',
'type' => 'text',
'value' => 'Introduce your business, explain what makes it different, and help visitors find their next step.'
],
'button_label' => [
'label' => 'Button label',
'type' => 'text',
'value' => 'Explore our services'
],
'button_url' => [
'label' => 'Button URL',
'type' => 'text',
'value' => '/services'
],
'image_src' => [
'label' => 'Image source URL',
'type' => 'text',
'value' => 'https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1200&q=80'
],
'image_alt' => [
'label' => 'Image alternative text',
'type' => 'text',
'value' => 'A bright, welcoming workspace'
],
]
];
+17
View File
@@ -0,0 +1,17 @@
<section class="bg-white px-4 py-16 sm:py-20 lg:py-24">
<div class="mx-auto grid max-w-7xl gap-12 lg:grid-cols-2 lg:items-center">
<div>
<p class="mb-4 text-sm font-semibold uppercase tracking-wide text-slate-600"><?= $block->setting('eyebrow') ?></p>
<h1 class="text-4xl font-semibold tracking-tight text-slate-950 sm:text-5xl lg:text-6xl"><?= $block->setting('heading') ?></h1>
<p class="mt-6 max-w-2xl text-lg leading-8 text-slate-600"><?= $block->setting('message') ?></p>
<a href="<?= $block->setting('button_url') ?>" class="mt-8 inline-flex items-center justify-center rounded-lg bg-slate-900 px-5 py-3 text-sm font-semibold text-white transition hover:bg-slate-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-900">
<?= $block->setting('button_label') ?>
</a>
</div>
<?php if (strlen($block->setting('image_src')) > 0) : ?>
<div class="overflow-hidden rounded-2xl bg-slate-100">
<img class="aspect-[4/3] h-full w-full object-cover" src="<?= $block->setting('image_src') ?>" alt="<?= $block->setting('image_alt') ?>" fetchpriority="high">
</div>
<?php endif; ?>
</div>
</section>
+3 -2
View File
@@ -1,7 +1,8 @@
<?php
return [
'title' => 'image',
'title' => 'Image',
'category' => 'Content',
'hidden' => true,
'icon' => 'fa fa-hand-peace-o'
'icon' => 'ph ph-image'
];
+1 -1
View File
@@ -1 +1 @@
<img src="" alt="" data-blubb="foo">
<img class="h-auto w-full rounded-xl object-cover" src="https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&amp;fit=crop&amp;w=1200&amp;q=80" alt="A bright, welcoming workspace" loading="lazy" decoding="async">
+7
View File
@@ -0,0 +1,7 @@
<?php
return [
'title' => 'List',
'category' => 'Content',
'icon' => 'ph ph-list-bullets',
];
+10
View File
@@ -0,0 +1,10 @@
<section class="px-4 py-12 sm:py-16">
<div class="mx-auto max-w-3xl">
<h2 class="mb-6 text-2xl font-semibold tracking-tight text-slate-900 sm:text-3xl" phpb-editable>What you can expect</h2>
<ul class="list-disc space-y-3 pl-6 text-base leading-7 text-slate-600 marker:text-slate-400">
<li phpb-editable>Clear communication from the first conversation to the final delivery</li>
<li phpb-editable>Practical recommendations tailored to your goals</li>
<li phpb-editable>Thoughtful, reliable support at every stage</li>
</ul>
</div>
</section>
+2 -2
View File
@@ -2,7 +2,7 @@
return [
'title' => 'Paragraph',
'category' => 'Layout',
'category' => 'Content',
'hidden' => true,
'icon' => 'fa fa-hand-peace-o',
'icon' => 'ph ph-text-align-left',
];
+3 -3
View File
@@ -1,3 +1,3 @@
<div class="" phpb-editable>
Dolore cillum et tempor. Nulla mollit quis sunt duis aliqua ad consectetur minim Lorem irure non duis. Et est elit cillum magna non. Culpa nisi aute occaecat aliqua eiusmod. Sunt tempor eu dolore duis ad mollit enim elit commodo labore aute quis dolor. Consequat consectetur elit officia non anim cillum reprehenderit nulla duis deserunt ex id. Veniam ex in reprehenderit in ut id tempor occaecat. Nisi ea velit adipisicing minim voluptate.
</div>
<p class="text-base leading-7 text-slate-600" phpb-editable>
Add a paragraph that explains your service, shares useful information, or gives visitors the context they need.
</p>
+15 -6
View File
@@ -3,13 +3,22 @@
return [
'title' => 'Quote',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o',
'icon' => 'ph ph-quotes',
'settings' => [
'person' => [
'label'=> 'Height',
'quote' => [
'label' => 'Quote',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
]
'value' => 'Clear communication and thoughtful planning make every project better.'
],
'person' => [
'label' => 'Name',
'type' => 'text',
'value' => 'Jordan Lee'
],
'role' => [
'label' => 'Role or attribution',
'type' => 'text',
'value' => 'Customer'
],
]
];
+8 -13
View File
@@ -1,19 +1,14 @@
<section class="bg-gray-50 dark:bg-gray-800">
<div class="max-w-screen-xl px-4 py-8 mx-auto text-center lg:py-24 lg:px-6">
<figure class="max-w-screen-md mx-auto">
<svg class="h-12 mx-auto mb-3 text-gray-400 dark:text-gray-600" viewBox="0 0 24 27" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z" fill="currentColor"></path>
<section class="bg-slate-50 px-4 py-12 sm:py-16">
<figure class="mx-auto max-w-3xl text-center">
<svg class="mx-auto mb-5 h-10 w-10 text-slate-300" viewBox="0 0 24 27" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z" />
</svg>
<blockquote>
<p class="text-xl font-medium text-gray-900 md:text-2xl dark:text-white">"Landwind is just awesome. It contains tons of predesigned components and pages starting from login screen to complex dashboard. Perfect choice for your next SaaS application."</p>
<p class="text-xl font-medium leading-8 text-slate-900 sm:text-2xl">“<?= $block->setting('quote') ?>”</p>
</blockquote>
<figcaption class="flex items-center justify-center mt-6 space-x-3">
<img class="w-6 h-6 rounded-full" src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/michael-gouch.png" alt="profile picture">
<div class="flex items-center divide-x-2 divide-gray-500 dark:divide-gray-700">
<div class="pr-3 font-medium text-gray-900 dark:text-white"><?php echo $block->setting('person'); ?></div>
<div class="pl-3 text-sm font-light text-gray-500 dark:text-gray-400">CEO at Google</div>
</div>
<figcaption class="mt-6 text-sm text-slate-600">
<span class="font-semibold text-slate-900"><?= $block->setting('person') ?></span>
<span> · <?= $block->setting('role') ?></span>
</figcaption>
</figure>
</div>
</section>
+4 -3
View File
@@ -3,12 +3,13 @@
return [
'title' => 'Row',
'category' => 'Layout',
'icon' => 'fa fa-hand-peace-o',
'icon' => 'ph ph-columns',
'settings' => [
"column_count" => [
"type" => "number",
"label" => "Number of columns",
"value" => "3"
"label" => "Number of columns (1–4)",
"value" => "3",
"placeholder" => "3"
],
]
];
+10 -6
View File
@@ -1,10 +1,14 @@
<div class="row p-3 flex flex-nowrap gap-3">
<?php
$columnCount = intval($block->setting('column_count'));
for ($i = 0; $i < $columnCount; $i++):
$columnCount = max(1, min(4, intval($block->setting('column_count'))));
$columnClasses = [
1 => 'md:grid-cols-1',
2 => 'md:grid-cols-2',
3 => 'md:grid-cols-3',
4 => 'md:grid-cols-4',
];
?>
<div class="grid grid-cols-1 gap-6 <?= $columnClasses[$columnCount] ?>">
<?php for ($i = 0; $i < $columnCount; $i++): ?>
[block slug="col" id="col<?= $i ?>"]
<?php
endfor;
?>
<?php endfor; ?>
</div>
@@ -0,0 +1,25 @@
<?php
return [
'title' => 'Testimonial',
'category' => 'Content',
'hidden' => true,
'icon' => 'ph ph-quotes',
'settings' => [
'quote' => [
'label' => 'Quote',
'type' => 'text',
'value' => 'The process was clear from the start, and the final result made a real difference to our business.'
],
'name' => [
'label' => 'Name',
'type' => 'text',
'value' => 'Taylor Morgan'
],
'role' => [
'label' => 'Role or attribution',
'type' => 'text',
'value' => 'Business owner'
],
]
];
@@ -0,0 +1,7 @@
<figure class="flex h-full flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm">
<blockquote class="flex-1 text-base leading-7 text-slate-700">“<?= $block->setting('quote') ?>”</blockquote>
<figcaption class="mt-6 border-t border-slate-100 pt-4">
<p class="font-semibold text-slate-900"><?= $block->setting('name') ?></p>
<p class="mt-1 text-sm text-slate-500"><?= $block->setting('role') ?></p>
</figcaption>
</figure>
@@ -0,0 +1,25 @@
<?php
return [
'title' => 'Testimonials',
'category' => 'Sections',
'icon' => 'ph ph-chat-centered-quote',
'settings' => [
'heading' => [
'label' => 'Heading',
'type' => 'text',
'value' => 'What our clients say'
],
'intro' => [
'label' => 'Supporting text',
'type' => 'text',
'value' => 'A few words from people we have had the pleasure of working with.'
],
'item_count' => [
'label' => 'Number of testimonials (1–6)',
'type' => 'number',
'value' => '3',
'placeholder' => '3'
],
]
];
@@ -0,0 +1,16 @@
<?php
$itemCount = max(1, min(6, intval($block->setting('item_count'))));
?>
<section class="bg-slate-50 px-4 py-12 sm:py-16">
<div class="mx-auto max-w-7xl">
<div class="mb-10 max-w-3xl">
<h2 class="text-3xl font-semibold tracking-tight text-slate-900 sm:text-4xl"><?= $block->setting('heading') ?></h2>
<p class="mt-4 text-lg leading-7 text-slate-600"><?= $block->setting('intro') ?></p>
</div>
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
<?php for ($i = 0; $i < $itemCount; $i++): ?>
[block slug="testimonial-item" id="testimonial-item-<?= $i ?>"]
<?php endfor; ?>
</div>
</div>
</section>
@@ -2,7 +2,7 @@
return [
'title' => 'Text + Image',
'category' => 'General',
'category' => 'Content',
'icon' => 'ph ph-square-half',
'settings' => [
"order" => [
@@ -23,18 +23,18 @@ return [
"width" => [
"type" => "select",
"label" => "Image Width",
"value" => "md:w-6/12",
"value" => "md:w-1/2",
"options" => [
[
"id" => "md:w-4/12",
"id" => "md:w-1/3",
"name" => "1/3"
],
[
"id" => "md:w-6/12",
"id" => "md:w-1/2",
"name" => "1/2"
],
[
"id" => "md:w-full",
"id" => "md:w-2/3",
"name" => "2/3"
],
]
@@ -43,7 +43,7 @@ return [
'label'=> 'Headline',
'type' => 'text',
'placeholder' =>'Headline',
'value' => 'Lorem Ipsum dolor'
'value' => 'A flexible section for your story'
],
]
];
+9 -9
View File
@@ -1,17 +1,17 @@
<section class="">
<div class="container container-md mx-auto p-4 flex flex-row gap-4 flex-col-reverse <?= phpb_e($block->setting('order')) ?>">
<div class="md:w-6/12 grow">
<section class="py-12 sm:py-16">
<div class="mx-auto flex max-w-6xl flex-col gap-8 px-4 sm:px-6 lg:px-8 md:flex-row <?= $block->setting('order') ?>">
<div class="min-w-0 flex-1">
<?php if (strlen($block->setting('headline')) > 0) : ?>
<div class=" text-2xl">
<?= phpb_e($block->setting('headline')) ?>
</div>
<h2 class="mb-4 text-3xl font-semibold tracking-tight text-slate-900">
<?= $block->setting('headline') ?>
</h2>
<?php endif; ?>
<div class="space-y-5">
[block slug="paragraph"]
<br>
<br>
[block slug="button"]
</div>
<div class="<?= phpb_e($block->setting('width')) ?>">
</div>
<div class="w-full <?= $block->setting('width') ?>">
[block slug="image"]
</div>
</div>
+1 -5
View File
File diff suppressed because one or more lines are too long
+486 -2003
View File
File diff suppressed because it is too large Load Diff
+36 -63
View File
@@ -29,117 +29,90 @@ use Plugi\Repositories\MenuRepository;
<body>
<?= Extensions::getHtmlBlocks("body-start") ?>
<div class="navbar bg-base-100">
<div class="navbar-start">
<div class="dropdown">
<label tabindex="0" class="btn btn-ghost lg:hidden">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h8m-8 6h16" /></svg>
</label>
<ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
<?php
$menuRepo = new MenuRepository();
$mainMenu = $menuRepo->getHydratedMenu("Main");
?>
<header class="border-b border-slate-200 bg-white">
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-4 sm:px-6 lg:px-8">
<a href="/" class="text-xl font-semibold tracking-tight text-slate-900">
<?= phpb_e($page->getTranslation("meta_title") ?: "Home") ?>
</a>
<nav aria-label="Main navigation">
<details class="relative lg:hidden">
<summary class="flex cursor-pointer list-none items-center rounded-md p-2 text-slate-700 hover:bg-slate-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-700">
<span class="sr-only">Main menu</span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>
</summary>
<ul class="absolute right-0 z-10 mt-2 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-lg">
<?php if ($mainMenu): ?>
<?php foreach ($mainMenu["pages"] as $menuPage): ?>
<li>
<a href="<?= phpb_e($menuPage["route"]) ?>"><?= phpb_e(
$menuPage["title"],
) ?></a>
<a class="block rounded-md px-3 py-2 text-slate-700 hover:bg-slate-100" href="<?= phpb_e($menuPage["route"]) ?>"><?= phpb_e($menuPage["title"]) ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
<!-- <li>-->
<!-- <a>Parent</a>-->
<!-- <ul class="p-2">-->
<!-- <li><a>Submenu 1</a></li>-->
<!-- <li><a>Submenu 2</a></li>-->
<!-- </ul>-->
<!-- </li>-->
</ul>
</div>
<a class="btn btn-ghost normal-case text-xl">daisyUI</a>
</div>
<div class="navbar-center hidden lg:flex">
<ul class="menu menu-horizontal px-1">
<?php
$menuRepo = new MenuRepository();
$mainMenu = $menuRepo->getHydratedMenu("Main");
?>
</details>
<ul class="hidden items-center gap-6 lg:flex">
<?php if ($mainMenu): ?>
<?php foreach ($mainMenu["pages"] as $menuPage): ?>
<li>
<a href="<?= phpb_e($menuPage["route"]) ?>"><?= phpb_e(
$menuPage["title"],
) ?></a>
<a class="text-sm font-medium text-slate-700 hover:text-slate-950" href="<?= phpb_e($menuPage["route"]) ?>"><?= phpb_e($menuPage["title"]) ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
<!-- <li tabindex="0">-->
<!-- <details>-->
<!-- <summary>Parent</summary>-->
<!-- <ul class="p-2">-->
<!-- <li><a>Submenu 1</a></li>-->
<!-- <li><a>Submenu 2</a></li>-->
<!-- </ul>-->
<!-- </details>-->
<!-- </li>-->
</ul>
</nav>
</div>
<div class="navbar-end">
<a class="btn">Button</a>
</div>
</div>
</header>
<main class="#main-content">
<main id="main-content" class="min-h-screen">
<?= $body ?>
</main>
<footer class="footer footer-center p-4 bg-base-300 text-base-content">
<div>
<ul class="flex flex-wrap justify-center items-center mb-6 text-gray-900 dark:text-white">
<footer class="border-t border-slate-200 bg-slate-50 text-slate-700">
<div class="mx-auto flex max-w-7xl flex-col items-center gap-4 px-4 py-8 sm:px-6 lg:px-8">
<nav aria-label="Footer navigation">
<ul class="flex flex-wrap items-center justify-center gap-x-6 gap-y-3">
<?php
$menuRepo = new MenuRepository();
$footerMenu = $menuRepo->getHydratedMenu("Footer");
?>
<?php if ($footerMenu): ?>
<?php foreach ($footerMenu["pages"] as $menuPage): ?>
<li>
<a href="<?= phpb_e(
$menuPage["route"],
) ?>" class="mr-4 hover:underline md:mr-6 "><?= phpb_e(
$menuPage["title"],
) ?></a>
<a href="<?= phpb_e($menuPage["route"]) ?>" class="text-sm hover:underline"><?= phpb_e($menuPage["title"]) ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
<li>
<div class="dropdown dropdown-hover dropdown-top">
<label tabindex="0" class="btn m-1 btn-xs"><i class="ph ph-translate"></i></label>
<ul tabindex="0" class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52">
<details class="relative">
<summary class="flex cursor-pointer list-none items-center rounded-md p-2 hover:bg-slate-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-slate-700">
<span class="sr-only">Choose language</span>
<i class="ph ph-translate" aria-hidden="true"></i>
</summary>
<ul class="absolute bottom-full right-0 z-10 mb-2 w-52 rounded-lg border border-slate-200 bg-white p-2 shadow-lg">
<?php
$menuRepo = new MenuRepository();
$languageMenu = $menuRepo->getLanguageMenu(
$page->getTranslation("page_id"),
);
?>
<?php if ($languageMenu): ?>
<?php foreach ($languageMenu as $lang): ?>
<li x-data="{emoji: ''}" x-init="emoji = plugi.getFlagEmoji('<?= phpb_e(
$lang["locale"],
) ?>')">
<a href="<?= phpb_e($lang["route"]) ?>">
<span x-text="emoji"></span>
<li>
<a class="flex items-center gap-2 rounded-md px-3 py-2 hover:bg-slate-100" href="<?= phpb_e($lang["route"]) ?>">
<span data-locale-flag data-locale="<?= phpb_e($lang["locale"]) ?>" aria-hidden="true"></span>
<?= phpb_e($lang["title"]) ?>
</a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
</details>
</li>
</ul>
<p>Copyright © <?= phpb_e(date("Y")) ?></p>
</nav>
<p class="text-sm">Copyright © <?= phpb_e(date("Y")) ?></p>
</div>
</footer>
-107
View File
@@ -7,13 +7,8 @@
"": {
"name": "phpb-demo-template",
"version": "0.0.0",
"dependencies": {
"@types/alpinejs": "^3.7.2",
"alpinejs": "^3.12.2"
},
"devDependencies": {
"@tailwindcss/cli": "^4.3.5",
"daisyui": "^5.8.2",
"npm-watch": "^0.11.0",
"rolldown": "^1.3.3",
"tailwindcss": "^4.3.5",
@@ -1069,54 +1064,12 @@
"tslib": "^2.4.0"
}
},
"node_modules/@types/alpinejs": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/@types/alpinejs/-/alpinejs-3.7.2.tgz",
"integrity": "sha512-M/PAVysvGxOlhifP/6XmO8bj5HW9w+Ygr03PdryM3tCb1KuQEaAAvVcyeZc5T75PbjH3dCzy/M/w/nJEE0FTSg==",
"dependencies": {
"@vue/reactivity": "^3.2.26"
}
},
"node_modules/@types/alpinejs/node_modules/@vue/reactivity": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
"integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"dependencies": {
"@vue/shared": "3.3.4"
}
},
"node_modules/@types/alpinejs/node_modules/@vue/shared": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"node_modules/@vue/reactivity": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz",
"integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==",
"dependencies": {
"@vue/shared": "3.1.5"
}
},
"node_modules/@vue/shared": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz",
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"node_modules/alpinejs": {
"version": "3.12.3",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.12.3.tgz",
"integrity": "sha512-fLz2dfYQ3xCk7Ip8LiIpV2W+9brUyex2TAE7Z0BCvZdUDklJE+n+a8gCgLWzfZ0GzZNZu7HUP8Z0z6Xbm6fsSA==",
"dependencies": {
"@vue/reactivity": "~3.1.1"
}
},
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
@@ -1214,16 +1167,6 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true
},
"node_modules/daisyui": {
"version": "5.8.2",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.8.2.tgz",
"integrity": "sha512-InScsDXX0pbfgvWyPQ8iTHV4rNMZdfbMo85KqlQUn62/PCIjwczViw5lbotzoXy/nPrn4qjDMmx/fspuUnjBtA==",
"dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/saadeghi/daisyui?sponsor=1"
}
},
"node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
@@ -2531,56 +2474,12 @@
"tslib": "^2.4.0"
}
},
"@types/alpinejs": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/@types/alpinejs/-/alpinejs-3.7.2.tgz",
"integrity": "sha512-M/PAVysvGxOlhifP/6XmO8bj5HW9w+Ygr03PdryM3tCb1KuQEaAAvVcyeZc5T75PbjH3dCzy/M/w/nJEE0FTSg==",
"requires": {
"@vue/reactivity": "^3.2.26"
},
"dependencies": {
"@vue/reactivity": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.4.tgz",
"integrity": "sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==",
"requires": {
"@vue/shared": "3.3.4"
}
},
"@vue/shared": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.4.tgz",
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
}
}
},
"@vue/reactivity": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz",
"integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==",
"requires": {
"@vue/shared": "3.1.5"
}
},
"@vue/shared": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz",
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"alpinejs": {
"version": "3.12.3",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.12.3.tgz",
"integrity": "sha512-fLz2dfYQ3xCk7Ip8LiIpV2W+9brUyex2TAE7Z0BCvZdUDklJE+n+a8gCgLWzfZ0GzZNZu7HUP8Z0z6Xbm6fsSA==",
"requires": {
"@vue/reactivity": "~3.1.1"
}
},
"anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
@@ -2655,12 +2554,6 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true
},
"daisyui": {
"version": "5.8.2",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.8.2.tgz",
"integrity": "sha512-InScsDXX0pbfgvWyPQ8iTHV4rNMZdfbMo85KqlQUn62/PCIjwczViw5lbotzoXy/nPrn4qjDMmx/fspuUnjBtA==",
"dev": true
},
"debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
-5
View File
@@ -21,14 +21,9 @@
},
"devDependencies": {
"@tailwindcss/cli": "^4.3.5",
"daisyui": "^5.8.2",
"npm-watch": "^0.11.0",
"rolldown": "^1.3.3",
"tailwindcss": "^4.3.5",
"typescript": "^6.0.3"
},
"dependencies": {
"@types/alpinejs": "^3.7.2",
"alpinejs": "^3.12.2"
}
}
+26 -5
View File
@@ -1,13 +1,34 @@
import Alpine from 'alpinejs'
import {localeMapper} from "./helpers/localemapper.ts";
const getFlagEmoji = (locale: string) => {
const countryCode = localeMapper(locale)
return String.fromCodePoint(...[...countryCode.toUpperCase()].map(x => 0x1f1a5 + x.charCodeAt(0)))
}
window.plugi = {}
window.plugi.getFlagEmoji = getFlagEmoji
document.querySelectorAll<HTMLElement>("[data-locale-flag]").forEach((flag) => {
const locale = flag.dataset.locale
if (locale) {
flag.textContent = getFlagEmoji(locale)
}
})
Alpine.start()
document.querySelectorAll<HTMLElement>("[data-gallery]").forEach((gallery) => {
if (gallery.dataset.galleryLightbox !== "true") {
return
}
const dialog = gallery.querySelector<HTMLDialogElement>("[data-gallery-dialog]")
const lightboxImage = dialog?.querySelector<HTMLImageElement>("[data-gallery-lightbox-image]")
if (!dialog || !lightboxImage || typeof dialog.showModal !== "function") {
return
}
gallery.querySelectorAll<HTMLAnchorElement>("[data-gallery-trigger]").forEach((trigger) => {
trigger.addEventListener("click", (event) => {
event.preventDefault()
lightboxImage.src = trigger.href
lightboxImage.alt = trigger.querySelector("img")?.alt ?? ""
dialog.showModal()
})
})
})
-1
View File
@@ -1,2 +1 @@
@import "tailwindcss";
@plugin "daisyui";