diff --git a/core/modules/layout_builder/css/layout-builder.css b/core/modules/layout_builder/css/layout-builder.css index c98b894b09..18b155676e 100644 --- a/core/modules/layout_builder/css/layout-builder.css +++ b/core/modules/layout_builder/css/layout-builder.css @@ -133,21 +133,28 @@ padding-left: 44px; color: #eee; border-bottom: 1px solid #333; - background: url(../../../misc/icons/bebebe/plus.svg) transparent 16px no-repeat; + background: url(../../../misc/icons/bebebe/plus.svg) #2f91da 16px no-repeat; font-size: 16px; } -#drupal-off-canvas .inline-block-create-button, +#drupal-off-canvas .inline-block-create-button { + margin: 0 -20px; +} + +#drupal-off-canvas .inline-block-create-button:hover { + background-color: #004875; +} + #drupal-off-canvas .inline-block-list__item { margin: 0 -20px; background-color: #444; } -#drupal-off-canvas .inline-block-create-button:hover, #drupal-off-canvas .inline-block-list__item:hover { background-color: #333; } + #drupal-off-canvas .inline-block-list { margin-bottom: 15px; } diff --git a/core/modules/layout_builder/src/Controller/ChooseBlockController.php b/core/modules/layout_builder/src/Controller/ChooseBlockController.php index a20a351d56..ac877506b0 100644 --- a/core/modules/layout_builder/src/Controller/ChooseBlockController.php +++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php @@ -119,16 +119,23 @@ public function build(SectionStorageInterface $section_storage, $delta, $region) $build['add_block'] = [ '#type' => 'link', '#url' => $url, - '#title' => $this->t('Create @entity_type', [ - '@entity_type' => $this->entityTypeManager->getDefinition('block_content')->getSingularLabel(), - ]), + '#title' => $this->t('Add new block'), '#attributes' => $this->getAjaxAttributes(), '#access' => $this->currentUser->hasPermission('create and edit custom blocks'), ]; $build['add_block']['#attributes']['class'][] = 'inline-block-create-button'; + $build['add_block']['#attributes']['title'] = $this->t('Create an inline @entity_type and add it to the layout.', [ + '@entity_type' => $this->entityTypeManager->getDefinition('block_content')->getSingularLabel(), + ]); } } + $build['add_existing'] = [ + '#type' => 'item', + '#plain_text' => $this->t('Add existing block'), + '#attributes' => ['class' => ['existing-block-create-title']] + ]; + $build['filter'] = [ '#type' => 'search', '#title' => $this->t('Filter by block name'), diff --git a/core/themes/stable/css/layout_builder/layout-builder.css b/core/themes/stable/css/layout_builder/layout-builder.css index 06b32a0eb4..b1bed1e7ed 100644 --- a/core/themes/stable/css/layout_builder/layout-builder.css +++ b/core/themes/stable/css/layout_builder/layout-builder.css @@ -133,21 +133,28 @@ padding-left: 44px; color: #eee; border-bottom: 1px solid #333; - background: url(../../../../misc/icons/bebebe/plus.svg) transparent 16px no-repeat; + background: url(../../../../misc/icons/bebebe/plus.svg) #2f91da 16px no-repeat; font-size: 16px; } -#drupal-off-canvas .inline-block-create-button, +#drupal-off-canvas .inline-block-create-button { + margin: 0 -20px; +} + +#drupal-off-canvas .inline-block-create-button:hover { + background-color: #004875; +} + #drupal-off-canvas .inline-block-list__item { margin: 0 -20px; background-color: #444; } -#drupal-off-canvas .inline-block-create-button:hover, #drupal-off-canvas .inline-block-list__item:hover { background-color: #333; } + #drupal-off-canvas .inline-block-list { margin-bottom: 15px; }