This repository includes Opale Redmine Theme as a Git submodule.
To initialize and fetch Opale after cloning, run:
git submodule update --init --recursiveOr, do everything in one step when cloning:
git clone --recurse-submodules https://github.com/gagnieray/custom-opale-builder.git my_custom_opaleThis ensures Opale is downloaded and checked out at the correct commit.
If you want to customize Opale Redmine Theme to your needs, first, make sure that you have installed Node.js and npm is available in your terminal.
All the variables defined in src/opale/src/sass/_variables.scss with the !default flag can be overridden in src/_custom-variables.scss.
Example:
@use 'variables' with (
$sidebar-position: right,
$brand-primary: #614ba6
);Then, run the script from the project root directory:
./buildThe result will be available in the output directory created during the process.
Note
Have a look at the Help section below for a list of all the available options and commands.
Tip
The README.md file in the src/ folder will be added to your build. Customize it to your needs too.
You can add a custom favicon simply by adding it in the src/favicon/ folder. The file must be named favicon.ico.
You can add a logo to be displayed in the pages' header.
In order to do that :
-
Add your logo in the
src/images/logo/folder. The file must be namedlogo.png. -
Define the required variables in
src/_custom-variables.scss.@use 'variables' with ( $use-logo: true, $logo-image-width: 150px, $logo-image-height: 60px, $header-padding-vertical: 25px, // Only required if $logo-image-height > 40px // ... );
Caution
If your logo's height is greater than 40px, you will have to adjust $header-padding-vertical default value which controls the header's minimal height.
usage: build [-n NAME] [-o OUTPUT] [-b BASE] [-v VERSION] [-p] [-h] [{package}]
Custom Opale Redmine Theme Builder
positional arguments:
{package} build and package the theme in a .zip archive
options:
-n, --name NAME name of the theme (default: opale_customized)
-o, --output OUTPUT output directory where to build or package the theme (default: dist/)
-b, --base BASE specific Opale base branch on which to build your theme
-v, --version VERSION version to append to the name
-p, --plugins build the theme along with the existing plugins stylesheets
-h, --help show this help message and exit
examples:
Build the customized theme along with the plugins based on the "redmine-5.x" branch of Opale:
$ ./build -b redmine-5.x -p
Build and package the theme with the name "my_theme" and version "1.0.0":
$ ./build -n my_theme -v 1.0.0 package
Build the theme with the name "custom_theme" directly in Redmine's themes directory:
$ ./build -n custom_theme -o /var/www/redmine/themes
Custom Opale Redmine Theme Builder is licensed under the GNU Affero General Public License v3.0 or later, the text of which can be found in LICENSE.