Files
wp-bootstrap/views/partials/sidebar.html.twig
magdev eb5ac6f7ad
All checks were successful
Create Release Package / PHP Lint (push) Successful in 52s
Create Release Package / Build Release (push) Successful in 1m21s
v0.3.0 - Polish: accessibility, security, performance, RTL, French translation
Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-08 16:27:13 +01:00

45 lines
1.5 KiB
Twig

<aside aria-label="{{ __('Blog sidebar') }}">
{% 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">
{{ __('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 %}
</div>
</div>
{% endif %}
</aside>