Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.89 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.89 KB

Sub-theme starter kits

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.

Prerequesites

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.

Usage

To create a sub-theme from the /kits/default/ starterkit:

  1. Choose a name and machine name for your new sub-theme, e.g. "Beach time" with machine name beachtime.
  2. Copy the /kits/default/ into the place where you want to create the sub-theme.
  3. Rename the default.info.hidden.yml -> beachtime.info.yml.
  4. Rename files that are currently named default.* to beachtime.*. E.g. default.theme becomes beachtime.theme.
  5. 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.
  6. Review the changes, especially for the human name and description. This is also a good time for a git commit!
  7. Check the README.md in your new sub-theme for additional steps.

Overriding BCL components

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.