You've already forked wp-bootstrap
v1.0.0 - Release: widget area, documentation refresh
- Register sidebar widget area via register_sidebar() - Render WordPress widgets in Twig sidebar with fallback to built-in content - Update README.md with accurate feature counts and descriptions - Update translation files with widget area strings - Bump version to 1.0.0 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
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
|
||||
- **Dark Mode** -- Toggle with localStorage persistence and `prefers-color-scheme` support
|
||||
- **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
|
||||
- **Style Variations** -- 4 color schemes: Ocean, Forest, Sunset, Midnight
|
||||
- **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
|
||||
- **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
|
||||
- **Translation Ready** -- Full i18n support with `en_US` and `de_CH` translations
|
||||
|
||||
## 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/`
|
||||
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/`)
|
||||
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
|
||||
|
||||
@@ -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.
|
||||
|
||||
### 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
|
||||
|
||||
| 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.
|
||||
|
||||
### 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
|
||||
|
||||
```txt
|
||||
|
||||
Reference in New Issue
Block a user