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:
@@ -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");
|
||||
?>
|
||||
<?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 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; ?>
|
||||
</ul>
|
||||
</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>-->
|
||||
<!-- <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>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="navbar-center hidden lg:flex">
|
||||
<ul class="menu menu-horizontal px-1">
|
||||
<?php
|
||||
$menuRepo = new MenuRepository();
|
||||
$mainMenu = $menuRepo->getHydratedMenu("Main");
|
||||
?>
|
||||
<?php if ($mainMenu): ?>
|
||||
<?php foreach ($mainMenu["pages"] as $menuPage): ?>
|
||||
<li>
|
||||
<a 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>
|
||||
</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">
|
||||
<?php
|
||||
$menuRepo = new MenuRepository();
|
||||
$footerMenu = $menuRepo->getHydratedMenu("Footer");
|
||||
?>
|
||||
<?php if ($footerMenu): ?>
|
||||
<?php foreach ($footerMenu["pages"] as $menuPage): ?>
|
||||
<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
|
||||
$footerMenu = $menuRepo->getHydratedMenu("Footer");
|
||||
?>
|
||||
<?php if ($footerMenu): ?>
|
||||
<?php foreach ($footerMenu["pages"] as $menuPage): ?>
|
||||
<li>
|
||||
<a href="<?= phpb_e($menuPage["route"]) ?>" class="text-sm hover:underline"><?= phpb_e($menuPage["title"]) ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<a href="<?= phpb_e(
|
||||
$menuPage["route"],
|
||||
) ?>" class="mr-4 hover:underline md:mr-6 "><?= phpb_e(
|
||||
$menuPage["title"],
|
||||
) ?></a>
|
||||
<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
|
||||
$languageMenu = $menuRepo->getLanguageMenu(
|
||||
$page->getTranslation("page_id"),
|
||||
);
|
||||
?>
|
||||
<?php if ($languageMenu): ?>
|
||||
<?php foreach ($languageMenu as $lang): ?>
|
||||
<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>
|
||||
</details>
|
||||
</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">
|
||||
<?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>
|
||||
<?= phpb_e($lang["title"]) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Copyright © <?= phpb_e(date("Y")) ?></p>
|
||||
</ul>
|
||||
</nav>
|
||||
<p class="text-sm">Copyright © <?= phpb_e(date("Y")) ?></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user