You've already forked wp-bootstrap
v0.3.0 - Polish: accessibility, security, performance, RTL, French translation
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
<body {{ body_class() }}>
|
||||
{{ wp_body_open() }}
|
||||
|
||||
<a class="wp-bootstrap-skip-link" href="#main-content">{{ __('Skip to main content') }}</a>
|
||||
|
||||
{% block header %}
|
||||
{% include 'partials/header.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<article class="card h-100">
|
||||
{% if post.thumbnail %}
|
||||
<a href="{{ post.url }}">
|
||||
<img src="{{ post.thumbnail }}" class="card-img-top"
|
||||
<img src="{{ post.thumbnail }}" class="card-img-top card-thumbnail"
|
||||
alt="{{ post.title|e('html_attr') }}"
|
||||
style="aspect-ratio: 3/2; object-fit: cover;">
|
||||
loading="lazy">
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<article class="card mb-4 border-0 border-bottom rounded-0 pb-4">
|
||||
{% if post.thumbnail %}
|
||||
<a href="{{ post.url }}">
|
||||
<img src="{{ post.thumbnail }}" class="card-img-top rounded" alt="{{ post.title|e('html_attr') }}">
|
||||
<img src="{{ post.thumbnail }}" class="card-img-top rounded" alt="{{ post.title|e('html_attr') }}" loading="lazy">
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="card-body px-0">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{% block content %}
|
||||
<section class="bg-primary text-white py-5 mb-5{% if post.thumbnail %} position-relative overflow-hidden{% endif %}">
|
||||
{% if post.thumbnail %}
|
||||
<div class="position-absolute top-0 start-0 w-100 h-100" style="background: url('{{ post.thumbnail }}') center/cover no-repeat; opacity: 0.3;"></div>
|
||||
<div class="hero-overlay position-absolute top-0 start-0 w-100 h-100" style="background-image: url('{{ post.thumbnail|e('html_attr') }}');"></div>
|
||||
{% endif %}
|
||||
<div class="container position-relative py-5 text-center">
|
||||
<h1 class="display-4 fw-bold">{{ post.title }}</h1>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<h1 class="mb-4">
|
||||
{{ __('Search results for: %s')|format('<em>' ~ search_query ~ '</em>')|raw }}
|
||||
{{ __('Search results for: %s')|format('<em>' ~ search_query|e('html') ~ '</em>')|raw }}
|
||||
</h1>
|
||||
|
||||
{% include 'partials/search-form.html.twig' %}
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
{% if post.thumbnail %}
|
||||
<figure class="mb-4">
|
||||
<img src="{{ post.thumbnail }}" class="img-fluid rounded"
|
||||
<img src="{{ post.thumbnail }}" class="img-fluid rounded post-thumbnail"
|
||||
alt="{{ post.title|e('html_attr') }}"
|
||||
style="aspect-ratio: 16/9; object-fit: cover; width: 100%;">
|
||||
loading="lazy">
|
||||
</figure>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<div class="comment d-flex gap-3 mb-4{% if depth > 0 %} ms-5{% endif %}" id="comment-{{ comment.id }}">
|
||||
<div class="flex-shrink-0">
|
||||
<img src="{{ comment.avatar_url }}" alt="{{ comment.author }}"
|
||||
class="rounded-circle" width="40" height="40">
|
||||
class="rounded-circle" width="40" height="40" loading="lazy">
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex align-items-center gap-2 mb-1">
|
||||
<strong class="small">
|
||||
{% if comment.author_url %}
|
||||
<a href="{{ comment.author_url }}" class="text-decoration-none text-body" rel="nofollow">
|
||||
<a href="{{ esc_url(comment.author_url) }}" class="text-decoration-none text-body" rel="nofollow">
|
||||
{{ comment.author }}
|
||||
</a>
|
||||
{% else %}
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<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">
|
||||
<nav aria-label="{{ __('Footer navigation') }}">
|
||||
<ul class="list-unstyled">
|
||||
{% for item in footer_menu %}
|
||||
<li class="mb-1">
|
||||
<a href="{{ item.url }}" class="text-body-secondary text-decoration-none">
|
||||
@@ -17,7 +18,8 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
</div>
|
||||
<div class="col-md-6 text-md-end">
|
||||
{% if footer_menu|length > 0 %}
|
||||
<ul class="list-unstyled">
|
||||
<nav aria-label="{{ __('Footer navigation') }}">
|
||||
<ul class="list-unstyled">
|
||||
{% for item in footer_menu %}
|
||||
<li>
|
||||
<a href="{{ item.url }}" class="text-body-secondary text-decoration-none">
|
||||
@@ -15,7 +16,8 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary" aria-label="{{ __('Primary navigation') }}">
|
||||
<div class="container flex-column">
|
||||
<a class="navbar-brand fw-bold mb-2" href="{{ site.url }}">
|
||||
{{ site.name }}
|
||||
@@ -30,6 +30,7 @@
|
||||
<li>
|
||||
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
|
||||
href="{{ child.url }}"
|
||||
{% if child.active %}aria-current="page"{% endif %}
|
||||
{% if child.target %}target="{{ child.target }}"{% endif %}>
|
||||
{{ child.title }}
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary" aria-label="{{ __('Primary navigation') }}">
|
||||
<div class="container">
|
||||
<a class="navbar-brand fw-bold" href="{{ site.url }}">
|
||||
{{ site.name }}
|
||||
@@ -34,6 +34,7 @@
|
||||
<li>
|
||||
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
|
||||
href="{{ child.url }}"
|
||||
{% if child.active %}aria-current="page"{% endif %}
|
||||
{% if child.target %}target="{{ child.target }}"{% endif %}>
|
||||
{{ child.title }}
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header class="position-absolute w-100" style="z-index: 1030;">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark" aria-label="{{ __('Primary navigation') }}">
|
||||
<div class="container">
|
||||
<a class="navbar-brand fw-bold" href="{{ site.url }}">
|
||||
{{ site.name }}
|
||||
@@ -27,6 +27,7 @@
|
||||
<li>
|
||||
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
|
||||
href="{{ child.url }}"
|
||||
{% if child.active %}aria-current="page"{% endif %}
|
||||
{% if child.target %}target="{{ child.target }}"{% endif %}>
|
||||
{{ child.title }}
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary" aria-label="{{ __('Primary navigation') }}">
|
||||
<div class="container">
|
||||
<a class="navbar-brand fw-bold" href="{{ site.url }}">
|
||||
{{ site.name }}
|
||||
@@ -27,6 +27,7 @@
|
||||
<li>
|
||||
<a class="dropdown-item{{ child.active ? ' active' : '' }}"
|
||||
href="{{ child.url }}"
|
||||
{% if child.active %}aria-current="page"{% endif %}
|
||||
{% if child.target %}target="{{ child.target }}"{% endif %}>
|
||||
{{ child.title }}
|
||||
</a>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<aside>
|
||||
<aside aria-label="{{ __('Blog sidebar') }}">
|
||||
{% if sidebar.recent_posts is defined and sidebar.recent_posts|length > 0 %}
|
||||
<div class="mb-4">
|
||||
<h3 class="h6 text-uppercase fw-semibold" style="letter-spacing: 1.6px">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Recent Posts') }}
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
@@ -19,7 +19,7 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-4">
|
||||
<h3 class="h6 text-uppercase fw-semibold" style="letter-spacing: 1.6px">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Search') }}
|
||||
</h3>
|
||||
{% include 'partials/search-form.html.twig' %}
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
{% if sidebar.tags is defined and sidebar.tags|length > 0 %}
|
||||
<div class="mb-4">
|
||||
<h3 class="h6 text-uppercase fw-semibold" style="letter-spacing: 1.6px">
|
||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||
{{ __('Tags') }}
|
||||
</h3>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user