v0.2.0 - Design Editor: templates, patterns, header/footer variations
All checks were successful
Create Release Package / PHP Lint (push) Successful in 57s
Create Release Package / Build Release (push) Successful in 1m23s

Full Design Editor compatibility with custom block categories, page templates,
header/footer variations, and navigation styles. Both FSE (admin) and Twig
(frontend) sides kept in sync.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-08 16:05:29 +01:00
parent cb288d6e74
commit cc8dc9d357
53 changed files with 13863 additions and 39 deletions

View File

@@ -0,0 +1,42 @@
<footer class="bg-dark text-light mt-auto">
<div class="container py-5">
<div class="row">
<div class="col-lg-4 mb-4 mb-lg-0">
<h5 class="fw-bold">{{ site.name }}</h5>
<p class="text-body-secondary">{{ site.description }}</p>
<p class="text-body-secondary small">{{ __('A modern WordPress theme built with Bootstrap 5.') }}</p>
</div>
<div class="col-lg-4 mb-4 mb-lg-0">
<h5 class="fw-bold">{{ __('Navigation') }}</h5>
{% if footer_menu|length > 0 %}
<ul class="list-unstyled">
{% for item in footer_menu %}
<li class="mb-1">
<a href="{{ item.url }}" class="text-body-secondary text-decoration-none">
{{ item.title }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div class="col-lg-4">
<h5 class="fw-bold">{{ __('About') }}</h5>
<p class="text-body-secondary small">
{{ __('This theme is proudly built with Bootstrap 5 and WordPress Full Site Editing.') }}
</p>
</div>
</div>
<hr class="my-4">
<div class="row align-items-center">
<div class="col-md-6">
<p class="text-body-secondary small mb-0">&copy; {{ current_year }} {{ site.name }}</p>
</div>
<div class="col-md-6 text-md-end">
<p class="text-body-secondary small mb-0">
{{ __('Powered by %s')|format('<a href="https://wordpress.org" rel="nofollow" class="text-body-secondary">WordPress</a>')|raw }}
</p>
</div>
</div>
</div>
</footer>

View File

@@ -0,0 +1,8 @@
<footer class="bg-body-tertiary mt-auto">
<div class="container py-4">
<hr class="mb-4">
<p class="text-body-secondary text-center small mb-0">
&copy; {{ current_year }} {{ site.name }}. {{ __('All rights reserved.') }}
</p>
</div>
</footer>

View File

@@ -0,0 +1,59 @@
<header>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container flex-column">
<a class="navbar-brand fw-bold mb-2" href="{{ site.url }}">
{{ site.name }}
</a>
{% if site.description %}
<p class="text-body-secondary small mb-2">{{ site.description }}</p>
{% endif %}
<button class="navbar-toggler" type="button"
data-bs-toggle="collapse" data-bs-target="#navbarMain"
aria-controls="navbarMain" aria-expanded="false"
aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-center" id="navbarMain">
<ul class="navbar-nav mb-2 mb-lg-0">
{% for item in menu %}
{% if item.children|length > 0 %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle{{ item.active ? ' active' : '' }}"
href="{{ item.url }}" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
{{ item.title }}
</a>
<ul class="dropdown-menu">
{% for child in item.children %}
<li>
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
href="{{ child.url }}"
{% if child.target %}target="{{ child.target }}"{% endif %}>
{{ child.title }}
</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link{{ item.active ? ' active' : '' }}"
href="{{ item.url }}"
{% if item.active %}aria-current="page"{% endif %}
{% if item.target %}target="{{ item.target }}"{% endif %}>
{{ item.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% if dark_mode %}
{% include 'partials/dark-mode-toggle.html.twig' %}
{% endif %}
</div>
</div>
</nav>
</header>

View File

@@ -0,0 +1,64 @@
<header>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container">
<a class="navbar-brand fw-bold" href="{{ site.url }}">
{{ site.name }}
</a>
<button class="navbar-toggler" type="button"
data-bs-toggle="offcanvas" data-bs-target="#navbarOffcanvas"
aria-controls="navbarOffcanvas"
aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="navbarOffcanvas"
aria-labelledby="navbarOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="navbarOffcanvasLabel">{{ site.name }}</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas"
aria-label="{{ __('Close') }}"></button>
</div>
<div class="offcanvas-body">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
{% for item in menu %}
{% if item.children|length > 0 %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle{{ item.active ? ' active' : '' }}"
href="{{ item.url }}" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
{{ item.title }}
</a>
<ul class="dropdown-menu">
{% for child in item.children %}
<li>
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
href="{{ child.url }}"
{% if child.target %}target="{{ child.target }}"{% endif %}>
{{ child.title }}
</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link{{ item.active ? ' active' : '' }}"
href="{{ item.url }}"
{% if item.active %}aria-current="page"{% endif %}
{% if item.target %}target="{{ item.target }}"{% endif %}>
{{ item.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% if dark_mode %}
{% include 'partials/dark-mode-toggle.html.twig' %}
{% endif %}
</div>
</div>
</div>
</nav>
</header>

View File

@@ -0,0 +1,56 @@
<header class="position-absolute w-100" style="z-index: 1030;">
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand fw-bold" href="{{ site.url }}">
{{ site.name }}
</a>
<button class="navbar-toggler" type="button"
data-bs-toggle="collapse" data-bs-target="#navbarMain"
aria-controls="navbarMain" aria-expanded="false"
aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMain">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
{% for item in menu %}
{% if item.children|length > 0 %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle{{ item.active ? ' active' : '' }}"
href="{{ item.url }}" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
{{ item.title }}
</a>
<ul class="dropdown-menu">
{% for child in item.children %}
<li>
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
href="{{ child.url }}"
{% if child.target %}target="{{ child.target }}"{% endif %}>
{{ child.title }}
</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link{{ item.active ? ' active' : '' }}"
href="{{ item.url }}"
{% if item.active %}aria-current="page"{% endif %}
{% if item.target %}target="{{ item.target }}"{% endif %}>
{{ item.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% if dark_mode %}
{% include 'partials/dark-mode-toggle.html.twig' %}
{% endif %}
</div>
</div>
</nav>
</header>