You've already forked wc-bootstrap
Initial theme scaffold from wp-theme-template
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
61
templates/layouts/archive.html.twig
Normal file
61
templates/layouts/archive.html.twig
Normal file
@@ -0,0 +1,61 @@
|
||||
{#
|
||||
# Archive/Search Layout (Bootstrap 5 Override)
|
||||
#
|
||||
# Layout for search results and archive pages.
|
||||
# 3+9 column split: filter sidebar + results grid.
|
||||
#
|
||||
# @package WcBootstrap
|
||||
# @since 0.1.0
|
||||
#}
|
||||
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="mb-4">
|
||||
{% block archive_header %}
|
||||
<header class="mb-4">
|
||||
<h1>{{ page_title|default(__('Search Results'))|esc_html }}</h1>
|
||||
|
||||
{% if results_count is defined %}
|
||||
<p class="text-body-secondary">
|
||||
{{ _n('%d result found', '%d results found', results_count)|format(results_count) }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
<div class="row">
|
||||
{% block archive_sidebar %}
|
||||
<aside class="col-lg-3 mb-4 mb-lg-0">
|
||||
{% block search_filters %}{% endblock %}
|
||||
</aside>
|
||||
{% endblock %}
|
||||
|
||||
<div class="col-lg-9">
|
||||
{% block archive_results %}
|
||||
{% if results is defined and results|length > 0 %}
|
||||
<div class="row row-cols-1 row-cols-md-2 g-4">
|
||||
{% for post in results %}
|
||||
<div class="col">
|
||||
{% block result_card %}
|
||||
{% include 'components/card.html.twig' with {post: post} %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
<p class="mb-0">{{ __('No results found. Try adjusting your filters.') }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block pagination %}
|
||||
{% if max_pages is defined and max_pages > 1 %}
|
||||
{% include 'components/pagination.html.twig' %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user