gent-drupal / gent_base
Drupal contrib theme for styleguide Gent.
Installs: 22 526
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 6
Forks: 2
Open Issues: 1
Language:Twig
Type:drupal-theme
pkg:composer/gent-drupal/gent_base
Requires
- php: ^8.3
- drupal/twig_typography: ^2.1
Requires (Dev)
- digipolisgent/qa-drupal: ^4.0
- drupal/core: ^10.4 || ^11.1
- drupal/paragraphs: ^1.5
- gent-drupal/dg_vesta: ^4.0
- 7.x-dev
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.x-dev
- 6.0.12
- 6.0.11
- 6.0.10
- 6.0.9
- 6.0.8
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 6.0.0-beta2
- 6.0.0-beta1
- 5.x-dev
- 5.2.7
- 5.2.6
- 5.2.5
- 5.2.4
- 5.2.3
- 5.2.2
- 5.2.1
- 5.2.0
- 5.1.4
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.15
- 5.0.14
- 5.0.13
- 5.0.11
- 5.0.10
- 5.0.9
- 5.0.8
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.x-dev
- 4.4.3
- 4.4.2
- 4.4.1
- 4.4.0
- 4.3.12
- 4.3.11
- 4.3.10
- 4.3.9
- 4.3.8
- 4.3.7
- 4.3.6
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.1
- 4.2.0
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.0
- 3.x-dev
- 3.3.0
- 3.2.0
- 3.1.1
- 1.1.0-alpha4
- 1.0.0-alpha9
- dev-feature/update-styleguide
- dev-feature/d11-support
- dev-feature/build-cleanup
- dev-feature/SGD8-2559
- dev-feature/SGD8-2486
- dev-feature/DTGB-894-v6
- dev-8.x-1.x
- dev-8.x-2.x
This package is auto-updated.
Last update: 2025-10-30 15:59:30 UTC
README
This Drupal 10/11 theme is based on the style guide of Stad Gent. https://stijlgids.stad.gent/
It is included in the root of this theme inside the styleguide directory.
This is also the place where the style guide code gets maintained to be
published as an NPM package.
Dependencies
-
Twig Typography module: This module is used to apply smart hyphenation to large sized titles. See
paragraph--call-to-action.html.twigas example.Copy the typography_defaults.yml from the gent_base theme root to your custom theme root and adjust if needed.
See typography settings for all possible 'set' options.
Installation
To install and use this base theme and a subtheme of it follow these steps:
-
Add the
gent_basephp package from District09 Repman packagist to your Drupal composer.json file: By adding the post install and post update commands we ensure that the gent_base theme is installed correctly and everything is ready to use."repositories": { "drupal": { "type": "composer", "url": "https://packages.drupal.org/8" }, "repman-district09": { "type": "composer", "url": "https://district09.repo.repman.io" }, }, "require": { "gent-drupal/gent_base": "^6.0" }, "scripts": { "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "pre-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "pre-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "post-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles", "@composer --working-dir=web/themes/contrib/gent_base install -n --no-dev --no-progress" ], "post-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles", "@composer --working-dir=web/themes/contrib/gent_base install -n --no-dev --no-progress" ] }, -
Install the base theme by running
composer installin the root of your Drupal project. -
Navigate into gent_base:
cd web/themes/contrib/gent_base -
Setup the gent_base basetheme with composer:
composer install -
Copy the starterkit folder to /themes/custom of your Drupal installation and just follow the installation instructions in the
INSTALL.mdfile.
Done!
CKEditor in-editor styling support
In combination with the ckeditor5.scss in your subtheme source/sass dir, also add the following hook to a custom module in order to make the in-editor styling work correctly:
/**
* Implements hook_preprocess_HOOK() for html.
*/
function MYMODULE_preprocess_html(array &$variables) {
// Check if the current page is using the admin theme.
if (\Drupal::service('router.admin_context')->isAdminRoute()) {
// Add a custom body class.
$variables['attributes']['class'][] = 'cs--blue';
}
}
Don't forget to add the following to your subtheme info yml file:
ckeditor5-stylesheets:
- build/css/ckeditor5.css
Theming considerations
The $styleguide-dir variable
This theme overrides Styleguide's $styleguide-dir variable pointing to the
directory of the style guide within the gent_base theme for your Drupal
installation. Styleguide itself has no clue of Drupal, so we make sure in a
Drupal context, we can find the styleguide location.
When needed, this variable can be used to point to styleguide resources such as
icons, fonts, images, ...