Skip to content
Snippets Groups Projects
Forked from project / ui_suite_bootstrap
249 commits behind, 6 commits ahead of the upstream repository.
William Haslag's avatar
Issue #3292517: Bootstrap 5 : Forms > Validation, added js to modify behavior...
William Haslag authored
Issue #3292517: Bootstrap 5 : Forms > Validation, added js to modify behavior of jquery-validate in order to add bootstrap 5 classes
8d486375
History

UI Suite Bootstrap

A site-builder friendly Bootstrap theme for Drupal, using the UI Suite.

Use Bootstrap directly from Drupal backoffice (layout builder, manage display, views, blocks, flags...).

Overview

How it works

Overview

Components chapter implemented with UI Patterns

Each component is a folder in templates/pattern/.

You can browse the pattern libraries directly inside Drupal: /patterns; for example, the 'card' pattern is available here: /patterns/card.

Thanks to the ui_patterns ecosystem, patterns are automatically available directly for site building in many Drupal entities, as layout plugins, views row plugins, field formatter plugins, views styles plugins...

Utilities chapter implemented with UI Styles

Utilities are implemented as styles in ui_suite_bootstrap.ui_styles.yml

You can browse the styles libraries directly inside Drupal: /styles.

The styles are automatically available for site building inside layout builder's components (blocks) & sections (layouts).

Layouts chapter implemented with Layout Options

A simple grid_row component is already set as a pattern for simple use cases.

For more complex use cases, layouts are implemented in ui_suite_bootstrap.layout.yml and ui_suite_bootstrap.layout_options.yml

Those layouts are automatically available as configurable layout plugins.

Examples section implemented with UI Examples

4 example pages are integrated using only render arrays, inside ui_suite_bootstrap.ui_examples.yml:

You can browse the example pages directly inside Drupal: /examples

Installation

Manually

You need to place the Bootstrap library in the libraries folder.

With Composer

{
  "require": {
    "asset/bootstrap": "5.1.3",
    "composer/installers": "2.*"
  },
  "repositories": {
    "asset-bootstrap": {
      "type": "package",
      "package": {
        "name": "asset/bootstrap",
        "version": "5.1.3",
        "type": "drupal-library",
        "extra": {
          "installer-name": "bootstrap"
        },
        "dist": {
          "type": "zip",
          "url": "https://api.github.com/repos/twbs/bootstrap/zipball/1a6fdfae6be09b09eaced8f0e442ca6f7680a61e",
          "reference": "1a6fdfae6be09b09eaced8f0e442ca6f7680a61e"
        }
      }
    }
  },
  "extra": {
    "installer-paths": {
      "app/libraries/{$name}": [
        "type:drupal-library"
      ]
    }
  }
}

Asset Packagist

If you are using the website Asset Packagist, the composer.json can be like:

{
  "require": {
    "asset/bootstrap": "5.1.3",
    "composer/installers": "2.*",
    "oomphinc/composer-installers-extender": "2.*"
  },
  "repositories": {
    "asset-packagist": {
      "type": "composer",
      "url": "https://asset-packagist.org"
    }
  },
  "extra": {
    "installer-paths": {
      "app/libraries/{$name}": [
        "type:drupal-library",
        "type:bower-asset",
        "type:npm-asset"
      ]

    },
    "installer-types": [
      "bower-asset",
      "npm-asset"
    ]
  }
}