Search by

imrodmartin / jarvis

imrodmartin

DXPR-style SDC theme with Bootstrap 5, built for Drupal Canvas and Layout Builder.

Package info

github.com/imrodmartin/jarvis

Language:CSS

Type:drupal-theme

pkg:composer/imrodmartin/jarvis

Statistics

Installs: 1

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v4.5.0 2026-12-02 13:43 UTC

README

DXPR-style SDC theme with Bootstrap 5, built for Drupal Canvas and Layout Builder, with WCAG 2.2 AA safeguards built in (automatic overlay contrast, safe-colour fallbacks, live contrast badges in the theme settings).

Building a whole site? Use the jarvis-bootstrap-recipe repository — it wires this theme into a fully functional Drupal site (Canvas, demo content, forms, workflow, SEO, AI) with one recipe apply. This repo is just the theme, included there as a git submodule.

📘 The Jarvis Handbook is the user guide for site builders and content editors.

🛠 The Jarvis Technical Guide is for developers: what each part does, how to build it, and a reference to all twenty-four components.

Requirements

  • PHP >= 8.3
  • Drupal ^11 || ^12
  • Docker + ddev — provides Composer + Drush in-container (the commands below assume it)
  • Contrib modules (pulled automatically by Composer): canvas, canvas_field_component, focal_point (→ crop), twig_tweak
  • The jarvis_canvas module, from imrodmartin/jarvis-modules — required, not optional. hero, card, the column shell and image call Twig filters it provides (jarvis_overlay_alpha, jarvis_image_style), and Twig fails to compile them when it is missing. The theme declares it in jarvis.info.yml, so Drupal refuses to install the theme without it rather than white-screening later. It also supplies the Remote video media picker and the Basic/Full HTML formats on rich-text props.

Install

The theme and its imrodmartin/jarvis-modules dependency are on Packagist, so no extra repositories are needed:

ddev composer require imrodmartin/jarvis

The package was called drupal/jarvis up to 4.4.4. Packagist does not accept the drupal/ vendor, so from 4.5.0 it is imrodmartin/jarvis, and it declares "replace": {"drupal/jarvis": "self.version"} so anything that still requires the old name is satisfied by it. A site that required drupal/jarvis itself has to switch once — see Switching from drupal/jarvis.

If your host cannot reach Packagist, register both repositories as Composer VCS sources first:

ddev composer config repositories.jarvis '{"type":"vcs","url":"https://github.com/imrodmartin/jarvis","no-api":true}'
ddev composer config repositories.jarvis-modules '{"type":"vcs","url":"https://github.com/imrodmartin/jarvis-modules","no-api":true}'

no-api makes Composer clone over git instead of the GitHub API — it avoids the unauthenticated 60-calls/hour API rate limit (and the occasional 502) that otherwise blocks the install.

Composer puts the theme in web/themes/contrib/jarvis and the jarvis_canvas module in web/modules/custom/jarvis-modules/jarvis_canvas (nested under the package name — Drupal discovers it there), with the contrib modules in web/modules/contrib.

themes/contrib is not a mistake: the theme declares "type": "drupal-theme", which stock installer-paths route to contrib, and Drupal loads it the same either way. To keep it under themes/custom, add "imrodmartin/jarvis" to the web/themes/custom/{$name} entry of extra.installer-paths and move that entry above web/themes/contrib/{$name} — composer/installers takes the first matching entry in file order, so a later package-name match loses to an earlier type:drupal-theme.

Switching from drupal/jarvis

A site whose root composer.json requires drupal/jarvis (every site that required the theme or a Jarvis recipe before 4.5.0 — recipe unpacking copies the requirement into your root file) swaps the name once:

ddev composer remove drupal/jarvis --no-update
ddev composer require 'imrodmartin/jarvis:^4.5' 'imrodmartin/jarvis-modules:^2.3'
ddev drush cache:rebuild

The theme stays in the same directory and keeps the jarvis machine name, so Drupal sees no change. Until you do this, composer install keeps working from your lock file, but a composer update that touches the theme fails with found drupal/jarvis[v4.4.x] in the lock file but not in remote repositories: composer reads a GitHub repository's package name from its default branch, and replace satisfies other packages that require drupal/jarvis, not a root requirement.

If you put "drupal/jarvis" in extra.installer-paths to keep the theme under themes/custom, change it to "imrodmartin/jarvis" before running the require, or the theme moves to themes/contrib.

Then apply a recipe

The theme ships components and templates; the config they need — media types, image styles, text formats, Canvas component entities — comes from a recipe. Both recipes are composer packages of their own, so you do not need a checkout of anything:

# A blank site: builds the whole thing (theme, Canvas, demo content, AI stack).
ddev composer config repositories.jarvis-recipe '{"type":"vcs","url":"https://github.com/imrodmartin/jarvis-recipe","no-api":true}'
ddev composer require imrodmartin/jarvis-recipe drupal/ckeditor5_markdown drupal/default_content:^2.0@beta drupal/ai_media_image:^1.0@alpha
ddev drush recipe /var/www/html/recipes/jarvis-recipe
ddev drush cache:rebuild   # also organises the Canvas component folders
# A site that already has its own content and config: adds Jarvis alongside it,
# changes no theme, no front page, no content.
ddev composer config repositories.jarvis-install-recipe '{"type":"vcs","url":"https://github.com/imrodmartin/jarvis-install-recipe","no-api":true}'
ddev composer require imrodmartin/jarvis-install-recipe
ddev drush recipe /var/www/html/recipes/jarvis-install-recipe
ddev drush cache:rebuild

Pass an absolute container path: ddev drush resolves relative paths from the docroot, while recipes/ sits at the project root. The full walkthrough — including what the existing-site recipe leaves alone, and how to update — is docs/INSTALL.md in the jarvis-bootstrap-recipe repo.

Do not pre-install Canvas or the theme. Earlier revisions of this file told you to run pm:install canvas + theme:install jarvis + cache:rebuild first. That now breaks the install: the rebuild makes Canvas auto-create component entities and makes Drupal auto-place the theme's blocks, and a recipe refuses to import config that already exists and differs — you get The configuration '…' exists already and does not match the recipe's configuration.

The recipe lists both modules and the theme in its own install: list, so it creates all of that itself in the right order. Verified end to end against an empty database: 23/23 components enabled, blocks in their intended regions, 7 nodes and 2 Canvas pages rendering.

What the recipe sets up

The authoritative list is the recipe's own README in the jarvis-bootstrap-recipe repo. In short, it:

  • Installs Canvas, this theme, and the jarvis_canvas glue module, plus the supporting contrib and site-feature modules
  • Ships exported Canvas component config for all 23 SDCs, content templates for the Blog and Basic content types, page regions, and 5 reusable patterns
  • Imports base config: image styles (jarvis_hero_banner, wide, portrait), the focal_point crop type, media types + fields, the jarvis_html/jarvis_full_html text formats, and theme settings
  • Imports demo content: 7 nodes, 2 Canvas pages (a component showcase and Component Examples), block content, media, and menu links — and sets the front page to the showcase (/page/2); change it under Configuration → Basic site settings if unwanted

Because the component config is exported from this theme release, the content templates and Canvas pages pin matching component versions — after bumping the theme, re-export that config into the recipe.

License

GPL-2.0-or-later

Bundled third-party assets

This theme bundles Bootstrap v5.3.8 under libraries/bootstrap/:

No other third-party assets are bundled. Fonts are fetched from Google Fonts at the site owner's request via the theme settings form and stored locally under public://jarvis-fonts/; none ship with the theme.

Documentation

Full documentation is under docs/ and published at https://project.pages.drupalcode.org/jarvis.

The two main documents are the Handbook for site builders, docs/handbook.html, and the Technical Guide for developers, docs/jarvis-guide.html. Everything else in docs/ is short reference material: installation, configuration, and usage.

The handbook is also kept as two halves, for anyone who wants one without the other. docs/training.html is the explanation on its own. TUTORIAL.md is the twelve step build on its own.