Download the PHP package greenpeace/planet4-child-theme-nordic without Composer
On this page you can find all versions of the php package greenpeace/planet4-child-theme-nordic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download greenpeace/planet4-child-theme-nordic
More information about greenpeace/planet4-child-theme-nordic
Files in greenpeace/planet4-child-theme-nordic
Package planet4-child-theme-nordic
Short Description Planet4 Child theme for GP Nordic
License GPL-3.0+
Informations about the package planet4-child-theme-nordic
c# Greenpeace Planet 4 Nordic Child Theme
The Planet 4 Nordic Child Theme is a child theme built for the Planet 4 project. It customizes the parent theme by adding unique features and styles specific to the Nordic region. This child theme customisez the Planet4 Master Theme following this Design System.
Table of Contents
- Installation
- Usage
- Development
- File Structure
- Coding Standards
- Contributing
- License
Prerequisites
Make sure you have the following tools installed on your machine:
- Node.js (v16 recommended)
- npm (comes with Node.js)
- Composer (for PHP dependencies and coding standards)
- WordPress setup (parent theme and WordPress installation)
Installation
To install and set up the theme locally, follow these steps:
-
Clone the repository:
-
Navigate to the theme directory:
-
Install the npm dependencies:
Run
npm install
to install all necessary Node.js packages: -
Install Composer dependencies:
Run
composer install
to install PHP dependencies (like coding standards): -
Activate the theme:
- Upload the child theme to your WordPress
/wp-content/themes
directory. - Activate the theme from the WordPress admin dashboard (
Appearance > Themes
).
- Upload the child theme to your WordPress
Usage
Once installed, the theme can be customized and extended as per the needs of the Nordic campaign. The child theme inherits most of its functionality from the parent theme, but you can add custom styles, templates, and features as needed.
To modify or add features to the theme, navigate to the planet4-nordic-child-theme
directory, make changes to the appropriate files, and use the provided npm scripts for development.
Development
Available npm Scripts
-
Build CSS: Compiles the SCSS files into a minified CSS file.
-
Build: Compiles all assets for production using Webpack and outputs them to the
build/
directory. -
Start: Launches a development server with live reloading and builds assets in development mode.
- Lint CSS: Lints the SCSS files to ensure coding standards are followed.
Composer Scripts for PHP Code Standards
-
Fixes: Automatically fixes PHP code style issues.
- Sniffs: Runs PHP CodeSniffer (
phpcs
) to check PHP files against coding standards.
File Structure
Here's a brief overview of the key directories and files in the project:
Customization
To override parent theme styles, place your custom SCSS files in the assets/src/scss/
directory. These files are automatically compiled and output to assets/build/
when running the build scripts.
Coding Standards
We follow WordPress Coding Standards to ensure clean, readable, and maintainable code.
The coding standards are enforced through phpcs
(PHP CodeSniffer) and can be automatically corrected using phpcbf
. Composer handles both tools.
To check for coding standard violations:
To automatically fix issues:
Contributing
We welcome contributions! To contribute to this project:
- Fork the repository.
- Create a new branch (
git checkout -b feat/my-feature
). - Make your changes.
- Push your branch (
git push origin feat/my-feature
). - Open a Pull Request.
Please ensure that your code follows the project's coding standards. Use npm run lint:css
for CSS and composer run sniffs
for PHP.
License
This project is licensed under the GNU License. See the LICENSE file for details.