Problem/Motivation

Vartheme BS4 provides a shell script to generate a sub-theme. Radix provides a Drush command and a kit. Currently, there's no documentation, script, or Drush command for creating a Vartheme BS5 sub-theme.

Proposed resolution

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ✅ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release Varbase 10.0.0-alpha2, vartheme_bs5-3.0.0-alpha3

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet


How to use the Vartheme BS5 Starterkit

To generate a new theme from Vartheme BS5 using the starterkit/theme-generation script, run the following from Drupal's installation root:

cd PROJECT_DIR_NAME/docroot

Run the following Drupal Generate Theme script:

php core/scripts/drupal generate-theme new_theme_name --starterkit vartheme_bs5

Additionally, you can create the theme's human-readable name and it description with two optional arguments:

php core/scripts/drupal generate-theme new_theme_name
  --starterkit vartheme_bs5
  --name "New Theme Name"
  --description "Custom theme generated from Vartheme BS5 theme"

This script will copy over all the files from the Vartheme BS5 theme, and replace instances of Vartheme BS5's machine name and label with the strings you provide.

Customizing CSS

The new theme should look and function identically to Vartheme BS5 out of the box, but the styles could be changed to suit the project's needs. Vartheme BS5's styles are written using Bootstrap 5, SASS, PostCSS, which is installed and configured Varbase, and allows CSS authors to write modern CSS while still supporting browsers that have not fully implemented the newest methodologies.
As part of the generate-theme command, the necessary package.json dependencies and scripts files are copied over for the project. Simply install the dependencies and then run yarn theme:init once, and then either the yarn theme:full-build command to compile the assets once or the yarn theme:watch command to re-compile the assets every time a .scss file is changed.

yarn install # Install the dependencies

yarn theme:init # Initialize the theme once

yarn theme:full-build # Compile SASS once

yarn theme:watch # Compile SASS per save

Comments

jcandan created an issue. See original summary.

jcandan’s picture

Radix #3095843 has the beginnings of a webpack script to automate kit generation to avoid the kit going stale.

Though, as a result of Change record: New starterkit theme generator, I wonder if this theme should be converted to a "starter theme" to take advantage of the core provided script.

rajab natshah’s picture

Version: 2.0.x-dev » 3.0.x-dev
rajab natshah’s picture

Issue summary: View changes

Thanks, James for the hint
Vartheme BS5 is a starterkit theme for Bootstrap 5
No longer needs any parent theme
Moving with the Drupal core team on using the Drupal core
theme generator ( or a like )

Having a script for starter-kit generator , much like #3301173: Allow starterkit theme generator tool to clone Olivero

           base theme: false
           starterkit: true
      

A new theme for a project will be managed by a clone/rename/replace naming for the project.
Using the starterkit core generator.


As of
#3357708: Start a 3.0.x branch to support Single Directory Components (SDC) with Drupal ~10.1.0 in Vartheme BS5

Varbase Components

Provides a component management system for Varbase and Vartheme BS5.

Utilizing Single Directory Components (SDC) and UI Patterns module. Working in hand with Vartheme BS5 the Varbase Theme (Bootstrap 5 - SASS). The new generation of theming based on Bootstrap 5, SDC, and UI Patterns.

rajab natshah’s picture

Title: Provide sub-theme docs and tooling » Allow starterkit theme generator tool to clone Vartheme BS5
Related issues: +#3301173: Allow starterkit theme generator tool to clone Olivero
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

  • Rajab Natshah committed ae510d34 on 3.0.x
    Issue #3313097: Allow starterkit theme generator tool to clone Vartheme...

  • Rajab Natshah committed 51cc9dfd on 3.0.x
    Issue #3313097: Allow starterkit theme generator tool to clone Vartheme...
rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.0.0-beta1, +vartheme_bs5-3.0.0-alpha3
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
Issue tags: -varbase-10.0.0-beta1 +varbase-10.0.0-alpha2
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.