Download the PHP package gent-drupal/gent_base without Composer
On this page you can find all versions of the php package gent-drupal/gent_base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gent-drupal/gent_base
More information about gent-drupal/gent_base
Files in gent-drupal/gent_base
Package gent_base
Short Description Drupal contrib theme for styleguide Gent.
License GPL-2.0-or-later
Homepage https://bitbucket.org/digipolisgent/drupal_theme_gent-base
Informations about the package gent_base
Drupal 10/11 base theme using the styleguide of Stad Gent.
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. - 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
Also add the following hook to a custom module in order to make the in-editor styling work correctly:
In your subtheme info yml file, load the base CKEditor stylesheet:
Optional: add project-specific overrides:
CKEditor CSS build flow
This section documents the CKEditor setup used by gent_base and subthemes.
- Source of base CKEditor styles:
/themes/contrib/gent_base/source/sass/ckeditor/_ckeditor5.scssand/themes/contrib/gent_base/source/sass/ckeditor/_ckeditor-content.scss. - Entry file compiled by gulp:
/themes/contrib/gent_base/source/sass/ckeditor5.scss. - Build task:
styles:ckeditorin/themes/contrib/gent_base/source/gulpfile.js. - CK-specific post-processing (selector rewrite + rem scaling):
normalizeCkeditorCss()in/themes/contrib/gent_base/source/gulp/ckeditor-css.js. - Output CSS used by subthemes:
/themes/contrib/gent_base/build/css/ckeditor5.css. - Optional subtheme overrides:
Create
source/sass/ckeditor5.project.scssin your subtheme and includebuild/css/ckeditor5.project.cssafter the base file inckeditor5-stylesheets.
Notes:
- The base file should contain the reusable default behavior.
- Keep subtheme overrides small and project-specific.
- If no overrides are needed, omit
ckeditor5.project.scssentirely.
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, ...