diff --git a/bootstrap.libraries.yml b/bootstrap.libraries.yml index 0e14e385f129d335ebd531198e0f1e3850c51090..67740c0af68ea256adebe9efaedd78452fd385c2 100644 --- a/bootstrap.libraries.yml +++ b/bootstrap.libraries.yml @@ -393,6 +393,13 @@ bootstrap: component: /libraries/bootstrap/dist/css/bootstrap.min.css: {} +bootstrap_cdn: + js: + //cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js: { type: external, minified: true } + css: + component: + //cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css: { type: external, minified: true } + # Bootswatch bootswatch_cerulean: diff --git a/config/install/bootstrap.settings.yml b/config/install/bootstrap.settings.yml index 393991a5b058c78b1c4e9d5da2dbd51e2ce8e8d4..77f3ee4f08547340c4952e55970258fd021b0825 100644 --- a/config/install/bootstrap.settings.yml +++ b/config/install/bootstrap.settings.yml @@ -59,3 +59,7 @@ bootstrap_body_bg_color: 'white' bootstrap_h1_color: 'base' bootstrap_h2_color: 'base' bootstrap_h3_color: 'base' + +# Theme. +# ---------------------------- +bootstrap_source: 'bootstrap/bootstrap_cdn' diff --git a/theme-settings.php b/theme-settings.php index f83e8fa8bd81c7014bbe9aae09f05c2a4009a2d6..b2d6d32f383aa054eedb3bcc609dde578daa915a 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -103,6 +103,7 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $ '#default_value' => theme_get_setting('bootstrap_source'), '#options' => [ 'bootstrap/bootstrap' => t('Local'), + 'bootstrap/bootstrap_cdn' => t('CDN'), 'bootstrap/bootswatch_cerulean' => t('Bootswatch Cerulean'), 'bootstrap/bootswatch_cosmo' => t('Bootswatch Cosmo'), 'bootstrap/bootswatch_cyborg' => t('Bootswatch Cyborg'), @@ -1067,7 +1068,6 @@ function bootstrap_form_system_theme_settings_alter(&$form, FormStateInterface $ * @param FormStateInterface $form_state * @return mixed */ -function colorCallback($form, FormStateInterface $form_state) -{ +function colorCallback($form, FormStateInterface $form_state) { return $form['colors']['scheme']['color_container']; }