Skip to content

Commit a534619

Browse files
committed
Adding in the generated version of the theme.
1 parent 7c47651 commit a534619

File tree

240 files changed

+38484
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+38484
-0
lines changed

.babelrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["@wordpress/babel-preset-default"]
3+
}

.browserslistrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
>0.5%
2+
last 2 versions
3+
not dead
4+
extends @wordpress/browserslist-config

.coderabbit.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
$schema: https://coderabbit.ai/integrations/coderabbit-overrides.v2.json
2+
language: 'en'
3+
chat:
4+
auto_reply: true
5+
reviews:
6+
request_changes_workflow: true
7+
high_level_summary: true
8+
poem: false
9+
review_status: true
10+
collapse_walkthrough: true
11+
path_filters:
12+
- '!build/**'
13+
- '!node_modules/**'
14+
- '!assets/css/*.map'
15+
- '!logs/**'
16+
auto_review:
17+
enabled: true
18+
drafts: false
19+
base_branches:
20+
- 'main'
21+
- 'develop'
22+
- 'feature/*'
23+
- 'fix/*'
24+
- 'update/*'
25+
path_instructions:
26+
- path: '**/theme.json'
27+
instructions: |
28+
Review theme.json configuration for WordPress block themes:
29+
- Ensure JSON syntax is valid and properly formatted
30+
- Verify color palettes use named tokens consistently (primary, secondary, accent)
31+
- Check typography settings include complete font definitions with fluid clamp() values
32+
- Validate spacing scales are consistent and use rem units
33+
- Confirm layout settings define appropriate contentSize and wideSize values
34+
- Ensure all settings follow WordPress block theme standards
35+
- Check accessibility compliance with sufficient color contrast ratios (4.5:1 minimum)
36+
- Verify compatibility with Full Site Editing (FSE) features
37+
- Validate custom properties don't conflict with core block functionality
38+
- path: '**/patterns/*.php'
39+
instructions: |
40+
Review WordPress block patterns for FSE compatibility:
41+
- Ensure proper pattern registration using register_block_pattern() function
42+
- Verify pattern naming follows lsx/[category]-[name] convention
43+
- Check that patterns use theme.json variables exclusively for styling
44+
- Validate proper heading hierarchy and accessibility compliance
45+
- Ensure placeholder content is realistic and appropriate
46+
- Check patterns maintain design integrity with different content lengths
47+
- Verify patterns are responsive and work across all viewport sizes
48+
- Confirm patterns avoid inline styles and use block variations appropriately
49+
- Validate proper block nesting and semantic HTML structure
50+
- Test that patterns follow WordPress coding standards for PHP
51+
- path: '**/parts/*.html'
52+
instructions: |
53+
Review WordPress template parts for block theme compatibility:
54+
- Ensure template parts follow WordPress HTML template structure
55+
- Verify proper use of WordPress block markup
56+
- Check semantic HTML elements and proper heading hierarchy
57+
- Validate accessibility features (ARIA roles, alt attributes)
58+
- Ensure template parts use theme.json variables for styling
59+
- Check compatibility with Full Site Editing interface
60+
- Verify proper block structure and nesting
61+
- Validate responsive design across different screen sizes
62+
- path: '**/templates/*.html'
63+
instructions: |
64+
Review WordPress block templates for FSE:
65+
- Ensure templates follow WordPress block template structure
66+
- Verify proper template hierarchy and naming conventions
67+
- Check integration with template parts and patterns
68+
- Validate proper query loop implementation for dynamic content
69+
- Ensure templates maintain design consistency
70+
- Check accessibility compliance throughout templates
71+
- Verify responsive behavior and layout integrity
72+
- path: '**/functions.php'
73+
instructions: |
74+
Review functions.php for WordPress block theme:
75+
- Ensure theme setup follows WordPress block theme standards
76+
- Verify proper theme support declarations for FSE features
77+
- Check secure coding practices (sanitization, validation, escaping)
78+
- Validate proper hook usage and WordPress coding standards
79+
- Ensure compatibility with latest WordPress version
80+
- Check for performance optimization in theme functions
81+
- Verify proper asset enqueueing and dependency management
82+
- Ensure functions don't conflict with block editor functionality
83+
- path: '**/*.{css,scss}'
84+
instructions: |
85+
Review CSS/SCSS for WordPress block theme:
86+
- Prefer theme.json configuration over custom CSS when possible
87+
- Ensure CSS enhances rather than replaces theme.json settings
88+
- Check for proper use of CSS custom properties from theme.json
89+
- Validate responsive design using consistent breakpoints
90+
- Ensure accessibility compliance in custom styles
91+
- Check for performance optimization (minimal CSS, efficient selectors)
92+
- Verify styles don't conflict with core WordPress block styles
93+
- Ensure proper CSS organization and maintainability
94+
- path: '**/e2e/*.{ts,js}'
95+
instructions: |
96+
Review Playwright end-to-end tests for WordPress block theme:
97+
- Ensure tests cover accessibility validation across all pages
98+
- Verify tests check responsive design at multiple breakpoints
99+
- Check tests validate Full Site Editing functionality
100+
- Ensure tests cover block pattern and template part functionality
101+
- Verify proper test structure, setup, and teardown
102+
- Ensure tests are reliable and not flaky
103+
- path: '**/src/js/*.js'
104+
instructions: |
105+
Review JavaScript for WordPress block theme:
106+
- Check for proper WordPress script enqueueing in functions.php
107+
- Validate accessibility enhancements don't conflict with core features
108+
- Ensure performance optimization and avoid unnecessary dependencies
109+
- Check compatibility with WordPress script loading patterns
110+
- Verify proper event handling and DOM manipulation
111+
- Ensure scripts work with both frontend and editor interfaces

.devcontainer/Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# WordPress Block Theme Development Container
2+
FROM mcr.microsoft.com/devcontainers/php:1-8.1-bullseye
3+
4+
# Install additional PHP extensions
5+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
6+
&& apt-get -y install --no-install-recommends \
7+
default-mysql-client \
8+
libzip-dev \
9+
libpng-dev \
10+
libjpeg-dev \
11+
libwebp-dev \
12+
subversion \
13+
unzip \
14+
wget \
15+
&& docker-php-ext-configure gd --with-jpeg --with-webp \
16+
&& docker-php-ext-install -j$(nproc) gd mysqli pdo_mysql zip \
17+
&& apt-get clean \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
# Install WP-CLI
21+
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
22+
&& chmod +x wp-cli.phar \
23+
&& mv wp-cli.phar /usr/local/bin/wp
24+
25+
# Install Composer
26+
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
27+
28+
# Install Node.js and npm (LTS version)
29+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
30+
&& apt-get install -y nodejs \
31+
&& npm install -g npm@latest
32+
33+
# Set up PHP configuration
34+
RUN echo "memory_limit=512M" >> /usr/local/etc/php/conf.d/memory.ini \
35+
&& echo "upload_max_filesize=64M" >> /usr/local/etc/php/conf.d/uploads.ini \
36+
&& echo "post_max_size=64M" >> /usr/local/etc/php/conf.d/uploads.ini \
37+
&& echo "max_execution_time=300" >> /usr/local/etc/php/conf.d/timeout.ini
38+
39+
# Create workspace directory
40+
WORKDIR /workspace
41+
42+
# Set up non-root user
43+
ARG USERNAME=vscode
44+
ARG USER_UID=1000
45+
ARG USER_GID=$USER_UID
46+
47+
# Ensure proper permissions
48+
RUN chown -R $USERNAME:$USERNAME /workspace
49+
50+
USER $USERNAME
51+
52+
# Default command
53+
CMD ["sleep", "infinity"]

.devcontainer/devcontainer.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"name": "WordPress Block Theme Development",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "devcontainer",
5+
"workspaceFolder": "/workspace",
6+
7+
"features": {
8+
"ghcr.io/devcontainers/features/node:1": {
9+
"version": "20"
10+
},
11+
"ghcr.io/devcontainers/features/php:1": {
12+
"version": "8.1",
13+
"installComposer": true
14+
},
15+
"ghcr.io/devcontainers/features/git:1": {}
16+
},
17+
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"bmewburn.vscode-intelephense-client",
22+
"wongjn.php-sniffer",
23+
"esbenp.prettier-vscode",
24+
"dbaeumer.vscode-eslint",
25+
"stylelint.vscode-stylelint",
26+
"EditorConfig.EditorConfig",
27+
"GitHub.copilot",
28+
"wordpresstoolbox.wordpress-toolbox",
29+
"ms-azuretools.vscode-docker"
30+
],
31+
"settings": {
32+
"editor.formatOnSave": true,
33+
"editor.defaultFormatter": "esbenp.prettier-vscode",
34+
"[php]": {
35+
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
36+
},
37+
"eslint.validate": ["javascript", "javascriptreact"],
38+
"stylelint.validate": ["css", "scss", "postcss"],
39+
"files.associations": {
40+
"*.php": "php",
41+
"*.html": "html"
42+
},
43+
"intelephense.environment.includePaths": [
44+
"/wordpress",
45+
"/workspace"
46+
],
47+
"terminal.integrated.defaultProfile.linux": "bash"
48+
}
49+
}
50+
},
51+
52+
"forwardPorts": [8080, 8443, 3306],
53+
54+
"postCreateCommand": "npm ci && composer install",
55+
56+
"postStartCommand": "npm run env:start",
57+
58+
"remoteUser": "vscode",
59+
60+
"portsAttributes": {
61+
"8080": {
62+
"label": "WordPress",
63+
"onAutoForward": "notify"
64+
},
65+
"8443": {
66+
"label": "WordPress (HTTPS)",
67+
"onAutoForward": "silent"
68+
},
69+
"3306": {
70+
"label": "MySQL",
71+
"onAutoForward": "silent"
72+
}
73+
}
74+
}

.devcontainer/docker-compose.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
version: '3.8'
2+
3+
services:
4+
devcontainer:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
volumes:
9+
- ..:/workspace:cached
10+
- wordpress-data:/var/www/html
11+
- node-modules:/workspace/node_modules
12+
command: sleep infinity
13+
networks:
14+
- wordpress-network
15+
depends_on:
16+
- db
17+
18+
wordpress:
19+
image: wordpress:latest
20+
ports:
21+
- '8080:80'
22+
environment:
23+
WORDPRESS_DB_HOST: db
24+
WORDPRESS_DB_USER: wordpress
25+
WORDPRESS_DB_PASSWORD: wordpress
26+
WORDPRESS_DB_NAME: wordpress
27+
WORDPRESS_DEBUG: '1'
28+
WORDPRESS_CONFIG_EXTRA: |
29+
define('WP_DEBUG_LOG', true);
30+
define('WP_DEBUG_DISPLAY', false);
31+
define('SCRIPT_DEBUG', true);
32+
define('SAVEQUERIES', true);
33+
volumes:
34+
- wordpress-data:/var/www/html
35+
- ..:/var/www/html/wp-content/themes/lswp-theme:cached
36+
networks:
37+
- wordpress-network
38+
depends_on:
39+
- db
40+
41+
db:
42+
image: mariadb:10.6
43+
environment:
44+
MYSQL_ROOT_PASSWORD: root
45+
MYSQL_DATABASE: wordpress
46+
MYSQL_USER: wordpress
47+
MYSQL_PASSWORD: wordpress
48+
volumes:
49+
- db-data:/var/lib/mysql
50+
networks:
51+
- wordpress-network
52+
ports:
53+
- '3306:3306'
54+
55+
phpmyadmin:
56+
image: phpmyadmin/phpmyadmin
57+
environment:
58+
PMA_HOST: db
59+
PMA_USER: root
60+
PMA_PASSWORD: root
61+
ports:
62+
- '8081:80'
63+
networks:
64+
- wordpress-network
65+
depends_on:
66+
- db
67+
68+
mailhog:
69+
image: mailhog/mailhog
70+
ports:
71+
- '8025:8025'
72+
- '1025:1025'
73+
networks:
74+
- wordpress-network
75+
76+
volumes:
77+
wordpress-data:
78+
db-data:
79+
node-modules:
80+
81+
networks:
82+
wordpress-network:
83+
driver: bridge

.distignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Files to exclude from distribution
2+
.git/
3+
.github/
4+
node_modules/
5+
vendor/
6+
src/
7+
tests/
8+
coverage/
9+
artifacts/
10+
test-results/
11+
playwright-report/
12+
bin/
13+
docs/
14+
15+
# Runtime logs and temporary files
16+
logs/
17+
tmp/
18+
.github/reports/
19+
!.github/reports/README.md
20+
!.github/reports/.gitkeep
21+
22+
.devcontainer/
23+
*.log
24+
*.lock
25+
.DS_Store
26+
27+
# Performance monitoring
28+
lighthouse-reports/
29+
.lighthouserc.js
30+
.size-limit.json
31+
webpack-stats.json
32+
stats.json
33+
34+
# Other system files
35+
Thumbs.db
36+
.env
37+
.env.*
38+
*.md
39+
!README.md
40+
!README.txt
41+
!CHANGELOG.md
42+
package.json
43+
package-lock.json
44+
composer.json
45+
composer.lock
46+
webpack.config.js
47+
postcss.config.js
48+
stylelint.config.js
49+
eslint.config.js
50+
jest.config.js
51+
playwright.config.js
52+
phpunit.xml
53+
phpcs.xml
54+
.wp-env.json
55+
.distignore
56+
.gitignore
57+
.husky/
58+
.vscode/

0 commit comments

Comments
 (0)