This theme is intended to provide a base for developing custom themes for project-specific or research group specific Tripal sites using the Tripal Cultivate package of modules. We request that you do not use this theme untouched but rather as a base to develop a custom look for your project or group. At a minimum you need to choose a unique colour for your site, a logo and a header image.
First install the theme via composer:
composer require tripalcultivate/trpcultivatetheme
Then, symlink the module portion of the theme into the modules directory:
cd web/modules/contrib
ln -s [pathToDrupalRoot]/themes/TripalCultivate-Theme/trpcultivatetheme_companion
Now you can enable first the module and then the theme.
You can set the primary base colour using the following drush command where you substitute #f54278
for whatever hex code you would like to use.
drush config:set trpcultivatetheme.settings base_primary_color '#f54278'
As you may have noticed there is a dockerfile in this repository. The recommended way to contribute to this theme is the same as the recommendation for core development: use docker please :-)
git clone https://github.com/TripalCultivate/TripalCultivate-Theme trpcultivatetheme
cd trpcultivatetheme
docker build --build-arg drupalversion=10.2.x-dev --build-arg phpversion=8.3 --tag=trpcultivate-theme:4x ./
docker run --publish=80:80 -tid --name=theme4x \
--volume=$(pwd)/trpcultivatetheme:/var/www/drupal/web/themes/trpcultivatetheme \
--volume=$(pwd)/trpcultivatetheme_companion:/var/www/drupal/web/modules/contrib/trpcultivatetheme_companion \
trpcultivate-theme:4x
docker exec theme4x service postgresql restart
This docker image/container will have a fully functioning Tripal 4 site based on TripalDocker built using the specified version of Drupal and PHP. For more details about TripalDocker see the official docs.
The dockerfile sets up the development environment with twig debugging turned on. This adds template suggestions in HTML comments into each page and refreshes twig template caches as it detects changes in the files. You do still need to use drush cr
to see CSS and template changes but it is much more reliable with this setting in place.
This theme uses the core Olivero theme as a base theme. As of 2024Feb this is not technically recommended as the markup of Olivero is not fixed. You can see the current status / recommendation on using Oliverio as a subtheme in Drupal Issue #3190946 - [META] Subtheming Olivero.
As you can see in comment #19 of that issue, we've decided to use Olivero as a base theme despite the recommendation not to. This is because we believe that the effort to update this theme with any markup changes in Olivero is likely less work then the other options we considered. If we had copied Oliverio and renamed it for our own purposes as suggested, then it would have been a lot of work to re-incorporate any updates/fixes made to Olivero in core. This is because with the names of all the files changed, we could not do a direct comparison of files or git merge. The theme landscape at the beginning of 2024 is still very sparse for good Drupal themes so we couldn't just use a more stable theme as a base. There are a number of Bootstrap base themes available but the community has fractured quite a bit causing it to be confusing to know which one to use for long term sustainability. Furthermore, we did not like the base themeing provided by these base themes.