This directory contains starter kits to create sub-themes.
This is inspired by the Radix base theme, where these starter kits are placed under /src/kits/
instead of just /kits/
. For the OpenEuropa Bootstrap theme it was decided to reserve /src/
for PSR-4 class files only.
The *.info.yml
file of each starterkit is renamed, to hide it from Drupal's extension discovery.
You need a tool (command-line, IDE or text editor) that can easily replace strings in multiple files at once.
Further requirements are found in the README.md of the respective starterkit.
To create a sub-theme from the /kits/default/
starterkit:
- Choose a name and machine name for your new sub-theme, e.g. "Beach time" with machine name
beachtime
. - Copy the
/kits/default/
into the place where you want to create the sub-theme. - Rename the
default.info.hidden.yml
->beachtime.info.yml
. - Rename files that are currently named
default.*
tobeachtime.*
. E.g.default.theme
becomesbeachtime.theme
. - Find + replace strings in all files:
- "OE_BOOTSTRAP_THEME_SUBTHEME_MACHINE_NAME" -> "beachtime".
- "OE_BOOTSTRAP_THEME_SUBTHEME_NAME" -> "Beach time".
- "OE_BOOTSTRAP_THEME_SUBTHEME_DESCRIPTION" -> Choose a description.
- Review the changes, especially for the human name and description. This is also a good time for a git commit!
- Check the README.md in your new sub-theme for additional steps.
Bootstrap Component Library (BCL) components, provided in OE Bootstrap Theme,
can be overridden by sub-theme similar components. Such overrides should have
the same name as the original BCL components and are placed, usually, under
assets/bcl
directory, relative to sub-theme root. If the sub-theme needs a
different location, check kits/default/default.info.hidden.yml
for details.