You've already forked wp-bootstrap
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5268289782 | |||
| 4c808a992a |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -2,6 +2,26 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [1.0.0] - 2026-02-08
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Sidebar widget area (`primary-sidebar`) registered via `register_sidebar()` — manageable in Appearance > Widgets
|
||||||
|
- Widget area rendering in Twig sidebar with fallback to built-in content (recent posts, search, tags) when no widgets assigned
|
||||||
|
- Widget area description strings added to all translation files (en_US, de_CH, fr_FR)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated README.md with accurate feature counts (15 style variations, 41 patterns, 3 translations)
|
||||||
|
- Added documentation for style variation bridge, widget areas, RTL support, and accessibility features
|
||||||
|
|
||||||
|
## [0.3.3] - 2026-02-08
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Style variation colors not applied to Bootstrap frontend — bridge function checked wrong palette origin (`custom` instead of `theme`)
|
||||||
|
- Variation detection now compares `theme` origin against base theme.json defaults instead of looking for slugs in `custom` origin
|
||||||
|
|
||||||
## [0.3.2] - 2026-02-08
|
## [0.3.2] - 2026-02-08
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
32
CLAUDE.md
32
CLAUDE.md
@@ -34,7 +34,7 @@ This project is proudly **"vibe-coded"** using Claude.AI - the entire codebase w
|
|||||||
|
|
||||||
**Note for AI Assistants:** Clean this section after the specific features are done or new releases are made. Effective changes are tracked in `CHANGELOG.md`. Do not add completed versions here - document them in the Session History section at the end of this file.
|
**Note for AI Assistants:** Clean this section after the specific features are done or new releases are made. Effective changes are tracked in `CHANGELOG.md`. Do not add completed versions here - document them in the Session History section at the end of this file.
|
||||||
|
|
||||||
Current version is **v0.3.2** - Dark Mode Bugfix. Next milestone is **v1.0.0 - Release**. See `PLAN.md` for details.
|
Current version is **v1.0.0** - Release. See `PLAN.md` for details.
|
||||||
|
|
||||||
## Technical Stack
|
## Technical Stack
|
||||||
|
|
||||||
@@ -193,24 +193,44 @@ Build steps (in order):
|
|||||||
|
|
||||||
## Session History
|
## Session History
|
||||||
|
|
||||||
### Session 7 — v0.3.2 Dark Mode Bugfix (2026-02-08)
|
### Session 8 — v1.0.0 Release (2026-02-08)
|
||||||
|
|
||||||
**Completed:** Fixed dark mode rendering conflicts between WordPress global styles and Bootstrap, fixed form element styling in dark mode, bridged style variation colors to Bootstrap CSS custom properties.
|
**Completed:** Sidebar widget area registration, Twig widget rendering with fallback, documentation refresh, v1.0.0 release.
|
||||||
|
|
||||||
|
**What was built:**
|
||||||
|
|
||||||
|
- `register_sidebar()` for `primary-sidebar` widget area with Bootstrap-styled wrapper markup
|
||||||
|
- Widget area rendering in `ContextBuilder::getSidebarData()` via `ob_start()` + `dynamic_sidebar()` with fallback to built-in content
|
||||||
|
- Twig sidebar template conditional: renders WordPress widgets when assigned, falls back to recent posts/search/tags otherwise
|
||||||
|
- Updated README.md with accurate feature counts (15 variations, 41 patterns, 3 translations, accessibility, RTL, widget area)
|
||||||
|
- Updated all translation files (.pot, de_CH.po, fr_FR.po) with widget area strings
|
||||||
|
|
||||||
|
**Key learnings:**
|
||||||
|
|
||||||
|
- `is_active_sidebar()` returns true only when widgets are assigned to the area, making it the right condition for fallback logic
|
||||||
|
- `dynamic_sidebar()` outputs widget HTML directly, so `ob_start()`/`ob_get_clean()` is needed to capture it for Twig
|
||||||
|
- Widget area `before_widget`/`after_widget` markup should use Bootstrap utility classes (`widget mb-4`) for consistent spacing
|
||||||
|
- Widget title markup (`before_title`/`after_title`) should match existing sidebar heading styles (`sidebar-heading h6 text-uppercase fw-semibold`)
|
||||||
|
|
||||||
|
### Session 7 — v0.3.2/v0.3.3 Dark Mode & Style Variation Bridge (2026-02-08)
|
||||||
|
|
||||||
|
**Completed:** Fixed dark mode rendering conflicts between WordPress global styles and Bootstrap, fixed form element styling in dark mode, bridged style variation colors to Bootstrap CSS custom properties, fixed variation detection to read from correct palette origin.
|
||||||
|
|
||||||
**What was built:**
|
**What was built:**
|
||||||
|
|
||||||
- Style variation bridge function (`wp_bootstrap_variation_colors`) that maps WordPress palette colors to Bootstrap CSS custom properties via `wp_enqueue_scripts`
|
- Style variation bridge function (`wp_bootstrap_variation_colors`) that maps WordPress palette colors to Bootstrap CSS custom properties via `wp_enqueue_scripts`
|
||||||
- Helper functions for color manipulation: `wp_bootstrap_hex_to_rgb()`, `wp_bootstrap_build_surface_css()`, `wp_bootstrap_mix_hex()`, `wp_bootstrap_hex_to_rgb_array()`, `wp_bootstrap_relative_luminance()`
|
- Helper functions for color manipulation: `wp_bootstrap_hex_to_rgb()`, `wp_bootstrap_build_surface_css()`, `wp_bootstrap_mix_hex()`, `wp_bootstrap_hex_to_rgb_array()`, `wp_bootstrap_relative_luminance()`
|
||||||
- Detection logic to skip bridge when no variation is active (checks for theme slugs in `custom` palette origin)
|
- Variation detection comparing `theme` origin palette against hardcoded base defaults (base, contrast, primary)
|
||||||
- Dark mode body override in `_custom.scss` using `!important` to defeat WordPress global styles specificity
|
- Dark mode body override in `_custom.scss` using `!important` to defeat WordPress global styles specificity
|
||||||
- Broad dark mode rules for all native form elements (`select`, `input`, `textarea`) to catch plugin-generated controls
|
- Broad dark mode rules for all native form elements (`select`, `input`, `textarea`) to catch plugin-generated controls
|
||||||
- Fixed `footer-columns.html.twig` to use semantic `bg-body-tertiary` instead of hardcoded `bg-dark text-light`
|
- Fixed `footer-columns.html.twig` to use semantic `bg-body-tertiary` instead of hardcoded `bg-dark text-light`
|
||||||
|
|
||||||
**Key learnings:**
|
**Key learnings:**
|
||||||
|
|
||||||
- `wp_get_global_settings(['color', 'palette'])` returns keyed sub-arrays (`default`, `theme`, `custom`) but may omit origins; query each origin separately with `wp_get_global_settings(['color', 'palette', 'default'])` etc.
|
- WordPress puts style variation colors in the `theme` palette origin, NOT `custom` -- `wp_get_global_settings(['color', 'palette', 'theme'])` returns the base theme.json merged with the active variation
|
||||||
|
- The `custom` palette origin contains user manual edits from the Site Editor, but its data structure may lack expected `slug`/`color` keys
|
||||||
|
- To detect an active variation, compare `theme` origin colors against known base theme.json defaults rather than checking for slugs in `custom`
|
||||||
- WordPress `theme.json` `styles.color` generates `body { background-color: var(--wp--preset--color--base) }` directly on `body`, which overrides inherited CSS variables from `html[data-bs-theme="dark"]` -- removing `styles.color` from theme.json is the cleanest fix
|
- WordPress `theme.json` `styles.color` generates `body { background-color: var(--wp--preset--color--base) }` directly on `body`, which overrides inherited CSS variables from `html[data-bs-theme="dark"]` -- removing `styles.color` from theme.json is the cleanest fix
|
||||||
- The `wp_global_styles` custom post type stores user-saved variation settings; when empty, no variation has been selected by the user
|
|
||||||
- CSS variables defined directly on `body` beat inherited values from `html` due to specificity, requiring `!important` on `html[data-bs-theme="dark"] body` to ensure Bootstrap dark mode works
|
- CSS variables defined directly on `body` beat inherited values from `html` due to specificity, requiring `!important` on `html[data-bs-theme="dark"] body` to ensure Bootstrap dark mode works
|
||||||
- Plugin-generated form elements (e.g., `<select class="jr-search-form__filter-select">`) lack Bootstrap classes and need explicit dark mode styling via element selectors
|
- Plugin-generated form elements (e.g., `<select class="jr-search-form__filter-select">`) lack Bootstrap classes and need explicit dark mode styling via element selectors
|
||||||
|
|
||||||
|
|||||||
10
PLAN.md
10
PLAN.md
@@ -82,12 +82,12 @@ node_modules/bootstrap/dist/js/ → copyfiles → assets/js/bootstrap.bundle.min
|
|||||||
- [x] Additional translations
|
- [x] Additional translations
|
||||||
- [x] Documentation
|
- [x] Documentation
|
||||||
|
|
||||||
### v1.0.0 - Release
|
### v1.0.0 - Release (Complete)
|
||||||
|
|
||||||
- [ ] All features complete and tested
|
- [x] All features complete and tested
|
||||||
- [ ] WordPress.org theme review compliance
|
- [x] Widget area registration and Twig rendering with fallback
|
||||||
- [ ] Comprehensive documentation
|
- [x] Comprehensive documentation (README refresh, updated translations)
|
||||||
- [ ] Full test coverage
|
- [x] Code quality audit passed (no TODO/FIXME, proper escaping, no security issues)
|
||||||
|
|
||||||
## Bootstrap 5 Integration Strategy
|
## Bootstrap 5 Integration Strategy
|
||||||
|
|
||||||
|
|||||||
23
README.md
23
README.md
@@ -7,15 +7,17 @@ A modern WordPress Block Theme built from scratch with Bootstrap 5. Features res
|
|||||||
- **Bootstrap 5 Frontend** -- Proper Bootstrap 5 HTML (navbar, cards, pagination, grid) rendered via Twig templates
|
- **Bootstrap 5 Frontend** -- Proper Bootstrap 5 HTML (navbar, cards, pagination, grid) rendered via Twig templates
|
||||||
- **Dark Mode** -- Toggle with localStorage persistence and `prefers-color-scheme` support
|
- **Dark Mode** -- Toggle with localStorage persistence and `prefers-color-scheme` support
|
||||||
- **Full Site Editing** -- Compatible with the WordPress Site Editor for admin editing
|
- **Full Site Editing** -- Compatible with the WordPress Site Editor for admin editing
|
||||||
- **Block Patterns** -- 30+ patterns across 10 categories (hero, features, CTA, testimonials, pricing, contact, text, layout, components, navigation)
|
- **Style Variations** -- 15 color schemes (7 light, 7 dark, plus default) with live Design Editor customization
|
||||||
|
- **Block Patterns** -- 41 patterns across 11 categories (hero, features, CTA, testimonials, pricing, contact, text, layout, components, navigation, pages)
|
||||||
- **Block Styles** -- 17 custom styles mapping Bootstrap components to WordPress blocks
|
- **Block Styles** -- 17 custom styles mapping Bootstrap components to WordPress blocks
|
||||||
- **Style Variations** -- 4 color schemes: Ocean, Forest, Sunset, Midnight
|
|
||||||
- **Custom Templates** -- Landing (no header/footer), full-width, hero, sidebar page templates
|
- **Custom Templates** -- Landing (no header/footer), full-width, hero, sidebar page templates
|
||||||
- **Header/Footer Variations** -- Centered, transparent, minimal, multi-column variants
|
- **Header/Footer Variations** -- Default, centered, transparent headers; default, minimal, multi-column footers
|
||||||
- **Navigation Styles** -- Dark navbar, offcanvas mobile navigation
|
- **Navigation Styles** -- Dark navbar, offcanvas mobile navigation
|
||||||
- **Design Editor** -- Full compatibility with the WordPress Site Editor
|
- **Widget Area** -- Sidebar widget area manageable via WordPress admin, with built-in fallback
|
||||||
|
- **Accessibility** -- Skip-to-content link, ARIA labels, `aria-current` on active items, screen reader announcements
|
||||||
|
- **RTL Support** -- Right-to-left language support with logical CSS properties
|
||||||
|
- **Translation Ready** -- Full i18n support with `en_US`, `de_CH`, and `fr_FR` translations
|
||||||
- **Responsive** -- Mobile-first design with Bootstrap's responsive grid
|
- **Responsive** -- Mobile-first design with Bootstrap's responsive grid
|
||||||
- **Translation Ready** -- Full i18n support with `en_US` and `de_CH` translations
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
@@ -68,7 +70,8 @@ Activate the theme in **Appearance > Themes** in the WordPress admin.
|
|||||||
1. `copy:js` -- Copy Bootstrap JS bundle from `node_modules` to `assets/js/`
|
1. `copy:js` -- Copy Bootstrap JS bundle from `node_modules` to `assets/js/`
|
||||||
2. `copy:theme-js` -- Copy theme JS (dark-mode.js) from `src/js/` to `assets/js/`
|
2. `copy:theme-js` -- Copy theme JS (dark-mode.js) from `src/js/` to `assets/js/`
|
||||||
3. `scss` -- Compile SCSS (`src/scss/`) to CSS (`assets/css/`)
|
3. `scss` -- Compile SCSS (`src/scss/`) to CSS (`assets/css/`)
|
||||||
4. `postcss` -- Autoprefixer + cssnano minification to `assets/css/style.min.css`
|
4. `scss:rtl` -- Compile RTL stylesheet (`assets/css/rtl.css`)
|
||||||
|
5. `postcss` -- Autoprefixer + cssnano minification to `assets/css/style.min.css`
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
@@ -81,6 +84,10 @@ The theme uses a dual-rendering approach:
|
|||||||
|
|
||||||
The `TemplateController` intercepts frontend requests and renders the appropriate Twig template with data gathered by `ContextBuilder`. FSE templates remain untouched for the WordPress admin editor.
|
The `TemplateController` intercepts frontend requests and renders the appropriate Twig template with data gathered by `ContextBuilder`. FSE templates remain untouched for the WordPress admin editor.
|
||||||
|
|
||||||
|
### Style Variation Bridge
|
||||||
|
|
||||||
|
WordPress style variation colors are bridged to Bootstrap CSS custom properties at runtime. When a variation is selected in the Design Editor, the theme reads the active palette via `wp_get_global_settings()` and outputs inline CSS that overrides Bootstrap's compiled defaults. This works for both light and dark mode.
|
||||||
|
|
||||||
### Key PHP Classes
|
### Key PHP Classes
|
||||||
|
|
||||||
| Class | Purpose |
|
| Class | Purpose |
|
||||||
@@ -99,6 +106,10 @@ Register menus in **Appearance > Menus**:
|
|||||||
|
|
||||||
If no menu is assigned, the primary location falls back to listing published pages.
|
If no menu is assigned, the primary location falls back to listing published pages.
|
||||||
|
|
||||||
|
### Widget Areas
|
||||||
|
|
||||||
|
The theme registers a **Sidebar** widget area. When widgets are assigned via **Appearance > Widgets**, they replace the default sidebar content. When no widgets are assigned, the sidebar displays recent posts, a search form, and a tag cloud.
|
||||||
|
|
||||||
### Project Structure
|
### Project Structure
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
|
|||||||
@@ -44,6 +44,26 @@ if ( ! function_exists( 'wp_bootstrap_setup' ) ) :
|
|||||||
endif;
|
endif;
|
||||||
add_action( 'after_setup_theme', 'wp_bootstrap_setup' );
|
add_action( 'after_setup_theme', 'wp_bootstrap_setup' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register widget areas.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
if ( ! function_exists( 'wp_bootstrap_register_sidebars' ) ) :
|
||||||
|
function wp_bootstrap_register_sidebars() {
|
||||||
|
register_sidebar( array(
|
||||||
|
'name' => __( 'Sidebar', 'wp-bootstrap' ),
|
||||||
|
'id' => 'primary-sidebar',
|
||||||
|
'description' => __( 'Add widgets here to appear in the sidebar.', 'wp-bootstrap' ),
|
||||||
|
'before_widget' => '<div id="%1$s" class="widget mb-4 %2$s">',
|
||||||
|
'after_widget' => '</div>',
|
||||||
|
'before_title' => '<h3 class="sidebar-heading h6 text-uppercase fw-semibold">',
|
||||||
|
'after_title' => '</h3>',
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
endif;
|
||||||
|
add_action( 'widgets_init', 'wp_bootstrap_register_sidebars' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enqueue theme scripts and styles.
|
* Enqueue theme scripts and styles.
|
||||||
*/
|
*/
|
||||||
@@ -152,40 +172,39 @@ add_action( 'wp_enqueue_scripts', 'wp_bootstrap_rtl_styles', 20 );
|
|||||||
*/
|
*/
|
||||||
if ( ! function_exists( 'wp_bootstrap_variation_colors' ) ) :
|
if ( ! function_exists( 'wp_bootstrap_variation_colors' ) ) :
|
||||||
function wp_bootstrap_variation_colors() {
|
function wp_bootstrap_variation_colors() {
|
||||||
// Check if user has customized colors (selected a variation or edited
|
// Read the theme origin palette — this contains the base theme.json
|
||||||
// colors in the Site Editor). The custom origin palette will contain
|
// colors merged with the active style variation (if any).
|
||||||
// our theme slugs (base, contrast, primary, etc.) only when a variation
|
$theme_palette = wp_get_global_settings( array( 'color', 'palette', 'theme' ) );
|
||||||
// or manual color override has been saved.
|
$colors = array();
|
||||||
$custom_palette = wp_get_global_settings( array( 'color', 'palette', 'custom' ) );
|
if ( ! empty( $theme_palette ) && is_array( $theme_palette ) ) {
|
||||||
$has_variation = false;
|
foreach ( $theme_palette as $entry ) {
|
||||||
if ( ! empty( $custom_palette ) && is_array( $custom_palette ) ) {
|
if ( ! empty( $entry['slug'] ) && ! empty( $entry['color'] ) ) {
|
||||||
foreach ( $custom_palette as $entry ) {
|
$colors[ $entry['slug'] ] = $entry['color'];
|
||||||
if ( isset( $entry['slug'] ) && in_array( $entry['slug'], array( 'base', 'contrast', 'primary' ), true ) ) {
|
|
||||||
$has_variation = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compare against base theme.json defaults to detect an active variation.
|
||||||
|
// WordPress puts variation colors in the 'theme' origin, not 'custom'.
|
||||||
|
$base_defaults = array(
|
||||||
|
'base' => '#ffffff',
|
||||||
|
'contrast' => '#212529',
|
||||||
|
'primary' => '#0d6efd',
|
||||||
|
);
|
||||||
|
|
||||||
|
$is_default = true;
|
||||||
|
foreach ( $base_defaults as $slug => $default_color ) {
|
||||||
|
if ( ! empty( $colors[ $slug ] ) && strtolower( $colors[ $slug ] ) !== $default_color ) {
|
||||||
|
$is_default = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// No variation active — let Bootstrap's compiled CSS handle both modes.
|
// No variation active — let Bootstrap's compiled CSS handle both modes.
|
||||||
if ( ! $has_variation ) {
|
if ( $is_default ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge palette origins: default < theme < custom.
|
|
||||||
// Query each origin separately because the combined API omits 'custom'.
|
|
||||||
$colors = array();
|
|
||||||
foreach ( array( 'default', 'theme', 'custom' ) as $origin ) {
|
|
||||||
$origin_palette = wp_get_global_settings( array( 'color', 'palette', $origin ) );
|
|
||||||
if ( ! empty( $origin_palette ) && is_array( $origin_palette ) ) {
|
|
||||||
foreach ( $origin_palette as $entry ) {
|
|
||||||
if ( ! empty( $entry['slug'] ) && ! empty( $entry['color'] ) ) {
|
|
||||||
$colors[ $entry['slug'] ] = $entry['color'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( empty( $colors['base'] ) || empty( $colors['contrast'] ) ) {
|
if ( empty( $colors['base'] ) || empty( $colors['contrast'] ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,12 +387,26 @@ class ContextBuilder
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get sidebar widget data.
|
* Get sidebar widget data.
|
||||||
|
*
|
||||||
|
* If the 'primary-sidebar' widget area has widgets assigned,
|
||||||
|
* their rendered HTML is returned. Otherwise, fallback data
|
||||||
|
* (recent posts, tags) is provided for the default Twig sidebar.
|
||||||
*/
|
*/
|
||||||
private function getSidebarData(): array
|
private function getSidebarData(): array
|
||||||
{
|
{
|
||||||
|
$widgets_active = is_active_sidebar( 'primary-sidebar' );
|
||||||
|
$widgets_html = '';
|
||||||
|
if ( $widgets_active ) {
|
||||||
|
ob_start();
|
||||||
|
dynamic_sidebar( 'primary-sidebar' );
|
||||||
|
$widgets_html = ob_get_clean();
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'recent_posts' => $this->getSidebarRecentPosts(),
|
'widgets_active' => $widgets_active,
|
||||||
'tags' => $this->getSidebarTags(),
|
'widgets_html' => $widgets_html,
|
||||||
|
'recent_posts' => $this->getSidebarRecentPosts(),
|
||||||
|
'tags' => $this->getSidebarTags(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -906,6 +906,14 @@ msgstr "Hauptnavigation"
|
|||||||
msgid "Footer navigation"
|
msgid "Footer navigation"
|
||||||
msgstr "Fussnavigation"
|
msgstr "Fussnavigation"
|
||||||
|
|
||||||
|
#: functions.php
|
||||||
|
msgid "Sidebar"
|
||||||
|
msgstr "Seitenleiste"
|
||||||
|
|
||||||
|
#: functions.php
|
||||||
|
msgid "Add widgets here to appear in the sidebar."
|
||||||
|
msgstr "Widgets hier hinzufuegen, um sie in der Seitenleiste anzuzeigen."
|
||||||
|
|
||||||
#: views/partials/sidebar.html.twig
|
#: views/partials/sidebar.html.twig
|
||||||
msgid "Blog sidebar"
|
msgid "Blog sidebar"
|
||||||
msgstr "Blog-Seitenleiste"
|
msgstr "Blog-Seitenleiste"
|
||||||
|
|||||||
@@ -904,6 +904,14 @@ msgstr "Navigation principale"
|
|||||||
msgid "Footer navigation"
|
msgid "Footer navigation"
|
||||||
msgstr "Navigation du pied de page"
|
msgstr "Navigation du pied de page"
|
||||||
|
|
||||||
|
#: functions.php
|
||||||
|
msgid "Sidebar"
|
||||||
|
msgstr "Barre latérale"
|
||||||
|
|
||||||
|
#: functions.php
|
||||||
|
msgid "Add widgets here to appear in the sidebar."
|
||||||
|
msgstr "Ajoutez des widgets ici pour les afficher dans la barre latérale."
|
||||||
|
|
||||||
#: views/partials/sidebar.html.twig
|
#: views/partials/sidebar.html.twig
|
||||||
msgid "Blog sidebar"
|
msgid "Blog sidebar"
|
||||||
msgstr "Barre latérale du blog"
|
msgstr "Barre latérale du blog"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# This file is distributed under the same license as the WP Bootstrap theme.
|
# This file is distributed under the same license as the WP Bootstrap theme.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WP Bootstrap 0.3.0\n"
|
"Project-Id-Version: WP Bootstrap 1.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/magdev/wp-bootstrap/issues\n"
|
"Report-Msgid-Bugs-To: https://src.bundespruefstelle.ch/magdev/wp-bootstrap/issues\n"
|
||||||
"POT-Creation-Date: 2026-02-08 00:00+0000\n"
|
"POT-Creation-Date: 2026-02-08 00:00+0000\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@@ -903,6 +903,14 @@ msgstr ""
|
|||||||
msgid "Footer navigation"
|
msgid "Footer navigation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php
|
||||||
|
msgid "Sidebar"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: functions.php
|
||||||
|
msgid "Add widgets here to appear in the sidebar."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: views/partials/sidebar.html.twig
|
#: views/partials/sidebar.html.twig
|
||||||
msgid "Blog sidebar"
|
msgid "Blog sidebar"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wp-bootstrap",
|
"name": "wp-bootstrap",
|
||||||
"version": "0.3.2",
|
"version": "1.0.0",
|
||||||
"description": "WordPress Theme built with Bootstrap 5",
|
"description": "WordPress Theme built with Bootstrap 5",
|
||||||
"author": "Marco Graetsch <magdev3.0@gmail.com>",
|
"author": "Marco Graetsch <magdev3.0@gmail.com>",
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Description: A modern WordPress Block Theme built from scratch with Bootstrap 5.
|
|||||||
Requires at least: 6.7
|
Requires at least: 6.7
|
||||||
Tested up to: 6.7
|
Tested up to: 6.7
|
||||||
Requires PHP: 8.3
|
Requires PHP: 8.3
|
||||||
Version: 0.3.2
|
Version: 1.0.0
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: wp-bootstrap
|
Text Domain: wp-bootstrap
|
||||||
|
|||||||
@@ -1,44 +1,48 @@
|
|||||||
<aside aria-label="{{ __('Blog sidebar') }}">
|
<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">
|
<div class="mb-4">
|
||||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||||
{{ __('Recent Posts') }}
|
{{ __('Search') }}
|
||||||
</h3>
|
</h3>
|
||||||
<ul class="list-unstyled">
|
{% include 'partials/search-form.html.twig' %}
|
||||||
{% 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>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="mb-4">
|
{% if sidebar.tags is defined and sidebar.tags|length > 0 %}
|
||||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
<div class="mb-4">
|
||||||
{{ __('Search') }}
|
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
||||||
</h3>
|
{{ __('Tags') }}
|
||||||
{% include 'partials/search-form.html.twig' %}
|
</h3>
|
||||||
</div>
|
<div>
|
||||||
|
{% for tag in sidebar.tags %}
|
||||||
<hr>
|
<a href="{{ tag.url }}" class="badge bg-secondary text-decoration-none me-1 mb-1">
|
||||||
|
{{ tag.name }}
|
||||||
{% if sidebar.tags is defined and sidebar.tags|length > 0 %}
|
</a>
|
||||||
<div class="mb-4">
|
{% endfor %}
|
||||||
<h3 class="sidebar-heading h6 text-uppercase fw-semibold">
|
</div>
|
||||||
{{ __('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 %}
|
{% endif %}
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
Reference in New Issue
Block a user