You've already forked wp-bootstrap
v1.0.0 - Release: widget area, documentation refresh
- Register sidebar widget area via register_sidebar() - Render WordPress widgets in Twig sidebar with fallback to built-in content - Update README.md with accurate feature counts and descriptions - Update translation files with widget area strings - Bump version to 1.0.0 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,44 +1,48 @@
|
||||
<aside aria-label="{{ __('Blog sidebar') }}">
|
||||
{% if sidebar.recent_posts is defined and sidebar.recent_posts|length > 0 %}
|
||||
{% if sidebar.widgets_active %}
|
||||
{{ sidebar.widgets_html|raw }}
|
||||
{% else %}
|
||||
{% if sidebar.recent_posts is defined and sidebar.recent_posts|length > 0 %}
|
||||
<div class="mb-4">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Recent Posts') }}
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% for post in sidebar.recent_posts %}
|
||||
<li class="mb-2">
|
||||
<a href="{{ post.url }}" class="text-decoration-none">{{ post.title }}</a>
|
||||
<br>
|
||||
<small class="text-body-secondary">{{ post.date }}</small>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Recent Posts') }}
|
||||
{{ __('Search') }}
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% for post in sidebar.recent_posts %}
|
||||
<li class="mb-2">
|
||||
<a href="{{ post.url }}" class="text-decoration-none">{{ post.title }}</a>
|
||||
<br>
|
||||
<small class="text-body-secondary">{{ post.date }}</small>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% include 'partials/search-form.html.twig' %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Search') }}
|
||||
</h3>
|
||||
{% include 'partials/search-form.html.twig' %}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{% if sidebar.tags is defined and sidebar.tags|length > 0 %}
|
||||
<div class="mb-4">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Tags') }}
|
||||
</h3>
|
||||
<div>
|
||||
{% for tag in sidebar.tags %}
|
||||
<a href="{{ tag.url }}" class="badge bg-secondary text-decoration-none me-1 mb-1">
|
||||
{{ tag.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if sidebar.tags is defined and sidebar.tags|length > 0 %}
|
||||
<div class="mb-4">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Tags') }}
|
||||
</h3>
|
||||
<div>
|
||||
{% for tag in sidebar.tags %}
|
||||
<a href="{{ tag.url }}" class="badge bg-secondary text-decoration-none me-1 mb-1">
|
||||
{{ tag.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user