diff --git a/package-lock.json b/package-lock.json index 564a99e..d611dc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23428,6 +23428,10 @@ "resolved": "themes/wporg-5ftf", "link": true }, + "node_modules/wporg-5ftf-2024": { + "resolved": "themes/wporg-5ftf-2024", + "link": true + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -23608,6 +23612,13 @@ "sass": "1.49.9" } }, + "themes/wporg-5ftf-2024": { + "version": "1.0.0", + "license": "GPL-2.0-or-later", + "devDependencies": { + "@wordpress/scripts": "28.6.0" + } + }, "themes/wporg-5ftf/node_modules/@wordpress/browserslist-config": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-2.7.0.tgz", diff --git a/package.json b/package.json index b042480..c1d679d 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,14 @@ "scripts": { "setup:tools": "npm install && composer install && TEXTDOMAIN=wporg-5ftf composer exec update-configs", "setup:wp": "wp-env run cli bash env/setup.sh", - "build:theme": "npm run build --workspace=wporg-5ftf", - "start:theme": "npm run watch --workspace=wporg-5ftf", + "build:old-theme": "npm run build --workspace=wporg-5ftf", + "start:old-theme": "npm run watch --workspace=wporg-5ftf", + "build:theme": "npm run build --workspace=wporg-5ftf-2024", + "start:theme": "npm run watch --workspace=wporg-5ftf-2024", "update:tools": "composer update && TEXTDOMAIN=wporg-5ftf composer exec update-configs", "wp-env": "wp-env", - "lint:php": "composer lint ./themes/wporg-5ftf ./plugins/wporg-5ftf", - "format:php": "composer format ./themes/wporg-5ftf ./plugins/wporg-5ftf", + "lint:php": "composer lint ./themes/wporg-5ftf ./themes/wporg-5ftf-2024 ./plugins/wporg-5ftf", + "format:php": "composer format ./themes/wporg-5ftf ./themes/wporg-5ftf-2024 ./plugins/wporg-5ftf", "test:php": "wp-env run tests-cli ./wp-content/mu-plugins/vendor/bin/phpunit -c ./wp-content/phpunit.xml.dist" }, "workspaces": [ diff --git a/themes/wporg-5ftf-2024/functions.php b/themes/wporg-5ftf-2024/functions.php new file mode 100644 index 0000000..4abef1c --- /dev/null +++ b/themes/wporg-5ftf-2024/functions.php @@ -0,0 +1,32 @@ + __( 'For individuals', 'wporg-5ftf' ), + 'url' => '/for-individuals/', + ); + $menu[] = array( + 'label' => __( 'For organizations', 'wporg-5ftf' ), + 'url' => '/for-organizations/', + ); + $menu[] = array( + 'label' => __( 'Handbook', 'wporg-5ftf' ), + 'url' => '/handbook/', + ); + $menu[] = array( + 'label' => __( 'Pledges', 'wporg-5ftf' ), + 'url' => '/pledges/', + ); + $menu[] = array( + 'label' => __( 'Contact', 'wporg-5ftf' ), + 'url' => '/contact/', + ); + $menu[] = array( + 'label' => __( 'My pledges', 'wporg-5ftf' ), + 'url' => '/my-pledges/', + 'className' => 'has-separator', + ); + + return array( + 'main' => $menu, + ); +} diff --git a/themes/wporg-5ftf-2024/package.json b/themes/wporg-5ftf-2024/package.json new file mode 100644 index 0000000..d0b3350 --- /dev/null +++ b/themes/wporg-5ftf-2024/package.json @@ -0,0 +1,28 @@ +{ + "name": "wporg-5ftf-2024", + "version": "1.0.0", + "description": "", + "author": "WordPress.org", + "license": "GPL-2.0-or-later", + "private": true, + "devDependencies": { + "@wordpress/scripts": "28.6.0" + }, + "eslintConfig": { + "extends": "../../.eslintrc.js" + }, + "stylelint": { + "extends": "../../.stylelintrc", + "ignoreFiles": [ + "**/*.css", + "**/*.css.map" + ] + }, + "scripts": { + "build": "wp-scripts build --experimental-modules", + "start": "wp-scripts start --experimental-modules", + "lint:js": "wp-scripts lint-js src", + "lint:css": "wp-scripts lint-style src/**/*.scss", + "format": "wp-scripts format src -- --config=../../.prettierrc.js" + } +} diff --git a/themes/wporg-5ftf-2024/parts/footer.html b/themes/wporg-5ftf-2024/parts/footer.html new file mode 100644 index 0000000..3e582af --- /dev/null +++ b/themes/wporg-5ftf-2024/parts/footer.html @@ -0,0 +1,2 @@ + + diff --git a/themes/wporg-5ftf-2024/parts/header.html b/themes/wporg-5ftf-2024/parts/header.html new file mode 100644 index 0000000..95b4d0b --- /dev/null +++ b/themes/wporg-5ftf-2024/parts/header.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/wporg-5ftf-2024/patterns/header-front-page.php b/themes/wporg-5ftf-2024/patterns/header-front-page.php new file mode 100644 index 0000000..f0bd520 --- /dev/null +++ b/themes/wporg-5ftf-2024/patterns/header-front-page.php @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + diff --git a/themes/wporg-5ftf-2024/patterns/header.php b/themes/wporg-5ftf-2024/patterns/header.php new file mode 100644 index 0000000..68cf1f2 --- /dev/null +++ b/themes/wporg-5ftf-2024/patterns/header.php @@ -0,0 +1,31 @@ + + + + + + +
+ + + +
+ + + + + + + +
+ + + + + diff --git a/themes/wporg-5ftf-2024/src/style/block.json b/themes/wporg-5ftf-2024/src/style/block.json new file mode 100644 index 0000000..0869f98 --- /dev/null +++ b/themes/wporg-5ftf-2024/src/style/block.json @@ -0,0 +1,3 @@ +{ + "script": "file:./index.js" +} diff --git a/themes/wporg-5ftf-2024/src/style/index.js b/themes/wporg-5ftf-2024/src/style/index.js new file mode 100644 index 0000000..d0a6cc3 --- /dev/null +++ b/themes/wporg-5ftf-2024/src/style/index.js @@ -0,0 +1,2 @@ +// Noop, just imports the CSS for webpack. +import './style.scss'; diff --git a/themes/wporg-5ftf-2024/src/style/style.scss b/themes/wporg-5ftf-2024/src/style/style.scss new file mode 100644 index 0000000..4518927 --- /dev/null +++ b/themes/wporg-5ftf-2024/src/style/style.scss @@ -0,0 +1,12 @@ +/* + * Note: only add styles here in cases where you can't achieve the style with + * templates or theme.json settings. + */ + +/* Add default focus style. */ +:where(main) a:where(:not(.wp-element-button,.wp-block-wporg-link-wrapper)):focus, +:where(main) button:where(:not([class*="wp-block-button"])):focus { + outline: none; + border-radius: 2px; + box-shadow: 0 0 0 1.5px currentColor; +} diff --git a/themes/wporg-5ftf-2024/style.css b/themes/wporg-5ftf-2024/style.css new file mode 100644 index 0000000..43d936d --- /dev/null +++ b/themes/wporg-5ftf-2024/style.css @@ -0,0 +1,13 @@ +/* + * Theme Name: Five for the Future, 2024 + * Theme URI: https://github.com/WordPress/five-for-the-future/ + * Author: WordPress.org + * Author URI: https://wordpress.org/ + * Description: A block-based child theme for WordPress.org/five/ + * Version: 1.0.0 + * License: GNU General Public License v2 or later + * Text Domain: wporg-5ftf + * Template: wporg-parent-2021 + */ + +/* This file is not used. Add CSS to `src/style/*`. */ diff --git a/themes/wporg-5ftf-2024/templates/front-page.html b/themes/wporg-5ftf-2024/templates/front-page.html new file mode 100644 index 0000000..9efcfaa --- /dev/null +++ b/themes/wporg-5ftf-2024/templates/front-page.html @@ -0,0 +1,15 @@ + + + +
+ + +
+ +
+ + +
+ + + diff --git a/themes/wporg-5ftf-2024/templates/page.html b/themes/wporg-5ftf-2024/templates/page.html new file mode 100644 index 0000000..8135007 --- /dev/null +++ b/themes/wporg-5ftf-2024/templates/page.html @@ -0,0 +1,35 @@ + + + +
+ +
+ +
+ + + +
+ + + +
+ +
+ +
+ + + + + + + +
+ + + +
+ + + diff --git a/themes/wporg-5ftf-2024/templates/single.html b/themes/wporg-5ftf-2024/templates/single.html new file mode 100644 index 0000000..8135007 --- /dev/null +++ b/themes/wporg-5ftf-2024/templates/single.html @@ -0,0 +1,35 @@ + + + +
+ +
+ +
+ + + +
+ + + +
+ +
+ +
+ + + + + + + +
+ + + +
+ + + diff --git a/themes/wporg-5ftf-2024/theme.json b/themes/wporg-5ftf-2024/theme.json new file mode 100644 index 0000000..ae96918 --- /dev/null +++ b/themes/wporg-5ftf-2024/theme.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://schemas.wp.org/trunk/theme.json", + "version": 2, + "settings": {}, + "styles": {} +}