You've already forked wp-bootstrap
Add BlockRenderer class injecting Bootstrap classes into 8 core block types (table, button, buttons, image, search, quote, pullquote, list) via per-block render_block filters using WP_HTML_Tag_Processor. Add WidgetRenderer class wrapping sidebar widgets in Bootstrap card components with h4 heading hierarchy via dynamic_sidebar_params and widget_block_content filters. Add widget SCSS stylesheet for list styling, search input-group, tag cloud pills, and card-flush list positioning. Add single-sidebar.html.twig as the default post template with two-column Bootstrap layout (col-lg-8 content, col-lg-4 sidebar). Full-width available via template selection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
58 lines
2.1 KiB
Twig
58 lines
2.1 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<article class="py-4">
|
|
<header class="mb-4">
|
|
<h1>{{ post.title }}</h1>
|
|
{% include 'partials/meta.html.twig' %}
|
|
</header>
|
|
|
|
{% if post.thumbnail %}
|
|
<figure class="mb-4">
|
|
<img src="{{ post.thumbnail }}" class="img-fluid rounded post-thumbnail"
|
|
alt="{{ post.title|e('html_attr') }}"
|
|
loading="lazy">
|
|
</figure>
|
|
{% endif %}
|
|
|
|
<div class="post-content">
|
|
{{ post.content|raw }}
|
|
</div>
|
|
|
|
{% if post.tags|length > 0 %}
|
|
<div class="mt-4 mb-4">
|
|
{% for tag in post.tags %}
|
|
<a href="{{ tag.url }}" class="badge bg-secondary text-decoration-none me-1">
|
|
{{ tag.name }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% include 'partials/post-navigation.html.twig' %}
|
|
{% include 'partials/comments.html.twig' %}
|
|
</article>
|
|
|
|
{% if more_posts is defined and more_posts|length > 0 %}
|
|
<section class="py-5 border-top">
|
|
<h2 class="h4 mb-4">{{ __('More posts') }}</h2>
|
|
<div class="row row-cols-1 row-cols-md-2 g-4">
|
|
{% for post in more_posts %}
|
|
<div class="col">
|
|
{% include 'components/card-post-grid.html.twig' with {'post': post} only %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
{% endif %}
|
|
</div>
|
|
<div class="col-lg-4">
|
|
{% include 'partials/sidebar.html.twig' %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|