Issue #3041053 by tim.plunkett, tedbow, xjm, larowlan, phenaproxima, webchick, effulgentsia, DyanneNova, Sam152, lauriii, dead_arm, bnjmmn, balsama: Mark Layout Builder as a stable module
parent
51cc6680c8
commit
fab8d1e741
|
@ -257,6 +257,11 @@ Language
|
|||
- Francesco Placella 'plach' https://www.drupal.org/u/plach
|
||||
- Daniel F. Kudwien 'sun' https://www.drupal.org/u/sun
|
||||
|
||||
Layout Builder
|
||||
- Ted Bowman 'tedbow' https://www.drupal.org/u/tedbow
|
||||
- Emilie Nouveau 'DyanneNova' https://www.drupal.org/u/dyannenova
|
||||
- Tim Plunkett 'tim.plunkett' https://www.drupal.org/u/tim.plunkett
|
||||
|
||||
Link Field
|
||||
- Weber Macedo 'Mac_Weber' https://www.drupal.org/u/mac_weber
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
/* @todo Move this to Seven as part of https://www.drupal.org/node/3041053 */
|
||||
.layout-builder-translation-warning {
|
||||
background: left 2px url(../../../misc/icons/e29700/warning.svg) no-repeat;
|
||||
padding-left: 20px;
|
||||
}
|
|
@ -88,10 +88,10 @@
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
.layout-builder__message--defaults .messages {
|
||||
background-image: url('../images/globe.svg');
|
||||
background-image: url("../images/globe.svg");
|
||||
}
|
||||
.layout-builder__message--overrides .messages {
|
||||
background-image: url('../images/location.svg');
|
||||
background-image: url("../images/location.svg");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -193,11 +193,11 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.layout-builder--move-blocks-active .layout-builder__region-label {
|
||||
.layout-builder--move-blocks-active .layout-builder__region-label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout-builder--move-blocks-active .layout-builder__section-label {
|
||||
.layout-builder--move-blocks-active .layout-builder__section-label {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: 'Layout Builder'
|
||||
type: module
|
||||
description: 'Allows users to add and arrange blocks and content fields directly on the content.'
|
||||
package: Core (Experimental)
|
||||
package: Core
|
||||
version: VERSION
|
||||
core: 8.x
|
||||
dependencies:
|
||||
|
|
|
@ -27,9 +27,3 @@ fourcol_section:
|
|||
css:
|
||||
theme:
|
||||
layouts/fourcol_section/fourcol_section.css: {}
|
||||
|
||||
drupal.layout_builder_content_translation_admin:
|
||||
version: VERSION
|
||||
css:
|
||||
theme:
|
||||
css/layout-builder-content-translation.css: {}
|
||||
|
|
|
@ -400,11 +400,6 @@ function layout_builder_preprocess_language_content_settings_table(&$variables)
|
|||
'#attributes' => [
|
||||
'class' => ['layout-builder-translation-warning'],
|
||||
],
|
||||
'#attached' => [
|
||||
'library' => [
|
||||
'layout_builder/drupal.layout_builder_content_translation_admin',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ use Symfony\Component\Routing\Route;
|
|||
* @ingroup layout_builder_access
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutBuilderAccessCheck implements AccessInterface {
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use Drupal\Core\Session\AccountInterface;
|
|||
* Accessible class to allow access for inline blocks in the Layout Builder.
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutPreviewAccessAllowed implements AccessibleInterface {
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Provides an access check for the Layout Builder UI.
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*
|
||||
* @todo Deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use
|
||||
* \Drupal\layout_builder\Access\LayoutBuilderAccessCheck instead. See
|
||||
|
|
|
@ -13,6 +13,9 @@ use Drupal\layout_builder\OverridesSectionStorageInterface;
|
|||
* Cache context ID: 'layout_builder_is_active:%entity_type_id', e.g.
|
||||
* 'layout_builder_is_active:node' (to vary by whether the Node entity type has
|
||||
* Layout Builder enabled).
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutBuilderIsActiveCacheContext implements CalculatedCacheContextInterface {
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ use Drupal\Core\Cache\Context\RouteNameCacheContext;
|
|||
* Determines if an entity is being viewed in the Layout Builder UI.
|
||||
*
|
||||
* Cache context ID: 'route.name.is_layout_builder_ui'.
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutBuilderUiCacheContext extends RouteNameCacheContext {
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
|
|||
* Defines a controller to add a new section.
|
||||
*
|
||||
* @internal
|
||||
* Controller classes are internal.
|
||||
*/
|
||||
class AddSectionController implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Defines a controller to choose a new block.
|
||||
*
|
||||
* @internal
|
||||
* Controller classes are internal.
|
||||
*/
|
||||
class ChooseBlockController implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Defines a controller to choose a new section.
|
||||
*
|
||||
* @internal
|
||||
* Controller classes are internal.
|
||||
*/
|
||||
class ChooseSectionController implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Defines a controller to provide the Layout Builder admin UI.
|
||||
*
|
||||
* @internal
|
||||
* Controller classes are internal.
|
||||
*/
|
||||
class LayoutBuilderController {
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
|
||||
/**
|
||||
* Provides AJAX responses to rebuild the Layout Builder.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
trait LayoutRebuildTrait {
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Defines a controller to move a block.
|
||||
*
|
||||
* @internal
|
||||
* Controller classes are internal.
|
||||
*/
|
||||
class MoveBlockController implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -7,11 +7,6 @@ use Drupal\Core\Config\Entity\ThirdPartySettingsInterface;
|
|||
/**
|
||||
* Defines an interface for an object that stores layout sections for defaults.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*
|
||||
* @todo Refactor this interface in https://www.drupal.org/node/2985362.
|
||||
*/
|
||||
interface DefaultsSectionStorageInterface extends SectionStorageInterface, ThirdPartySettingsInterface, LayoutBuilderEnabledInterface {
|
||||
|
|
|
@ -20,6 +20,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Defines a render element for building the Layout Builder UI.
|
||||
*
|
||||
* @RenderElement("layout_builder")
|
||||
*
|
||||
* @internal
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
class LayoutBuilder extends RenderElement implements ContainerFactoryPluginInterface {
|
||||
|
||||
|
|
|
@ -25,11 +25,6 @@ use Drupal\layout_builder\SectionStorage\SectionStorageTrait;
|
|||
|
||||
/**
|
||||
* Provides an entity view display entity that has a layout.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
class LayoutBuilderEntityViewDisplay extends BaseEntityViewDisplay implements LayoutEntityDisplayInterface {
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ use Drupal\layout_builder\Section;
|
|||
* Provides storage for entity view display entities that have layouts.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Entity handlers are internal.
|
||||
*/
|
||||
class LayoutBuilderEntityViewDisplayStorage extends ConfigEntityStorage {
|
||||
|
||||
|
|
|
@ -9,11 +9,6 @@ use Drupal\layout_builder\SectionListInterface;
|
|||
/**
|
||||
* Provides an interface for entity displays that have layout.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*
|
||||
* @todo Refactor this interface in https://www.drupal.org/node/2985362.
|
||||
*/
|
||||
interface LayoutEntityDisplayInterface extends EntityDisplayInterface, SectionListInterface, LayoutBuilderEnabledInterface {
|
||||
|
|
|
@ -13,11 +13,6 @@ use Symfony\Component\EventDispatcher\Event;
|
|||
* build array in this event.
|
||||
*
|
||||
* @see \Drupal\layout_builder\LayoutBuilderEvents::SECTION_COMPONENT_BUILD_RENDER_ARRAY
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
class SectionComponentBuildRenderArrayEvent extends Event {
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||
* Builds render arrays and handles access for all block components.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class BlockComponentRenderArray implements EventSubscriberInterface {
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||
* the dependency.
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*
|
||||
* @see \Drupal\file\FileAccessControlHandler::checkAccess()
|
||||
* @see \Drupal\block_content\BlockContentAccessControlHandler::checkAccess()
|
||||
|
|
|
@ -14,6 +14,7 @@ use Drupal\layout_builder\SectionStorage\SectionStorageTrait;
|
|||
* Defines a item list class for layout section fields.
|
||||
*
|
||||
* @internal
|
||||
* Plugin classes are internal.
|
||||
*
|
||||
* @see \Drupal\layout_builder\Plugin\Field\FieldType\LayoutSectionItem
|
||||
*/
|
||||
|
|
|
@ -11,6 +11,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Provides a form to add a block.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class AddBlockForm extends ConfigureBlockFormBase {
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides a base form for configuring a block.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
abstract class ConfigureBlockFormBase extends FormBase implements BaseFormIdInterface {
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides a form for configuring a layout section.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class ConfigureSectionForm extends FormBase {
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides a form containing the Layout Builder UI for defaults.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class DefaultsEntityForm extends EntityForm {
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
|
||||
/**
|
||||
* Discards any pending changes to the layout.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class DiscardLayoutChangesForm extends ConfirmFormBase {
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
|
||||
/**
|
||||
* Disables Layout Builder for a given default.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class LayoutBuilderDisableForm extends ConfirmFormBase {
|
||||
|
||||
|
|
|
@ -14,9 +14,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Edit form for the LayoutBuilderEntityViewDisplay entity type.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class LayoutBuilderEntityViewDisplayForm extends EntityViewDisplayEditForm {
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides a base class for confirmation forms that rebuild the Layout Builder.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
abstract class LayoutRebuildConfirmFormBase extends ConfirmFormBase {
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
|
||||
/**
|
||||
* Provides a form for moving a block.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class MoveBlockForm extends FormBase {
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides a form containing the Layout Builder UI for overrides.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class OverridesEntityForm extends ContentEntityForm {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Provides a form to confirm the removal of a block.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class RemoveBlockForm extends LayoutRebuildConfirmFormBase {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Provides a form to confirm the removal of a section.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class RemoveSectionForm extends LayoutRebuildConfirmFormBase {
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
|
||||
/**
|
||||
* Reverts the overridden layout to the defaults.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class RevertOverridesForm extends ConfirmFormBase {
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* Provides a form to update a block.
|
||||
*
|
||||
* @internal
|
||||
* Form classes are internal.
|
||||
*/
|
||||
class UpdateBlockForm extends ConfigureBlockFormBase {
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Defines a class for reacting to entity events related to Inline Blocks.
|
||||
*
|
||||
* @internal
|
||||
* This is an internal utility class wrapping hook implementations.
|
||||
*/
|
||||
class InlineBlockEntityOperations implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -6,11 +6,6 @@ namespace Drupal\layout_builder;
|
|||
* Defines events for the layout_builder module.
|
||||
*
|
||||
* @see \Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
final class LayoutBuilderEvents {
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides dynamic permissions for Layout Builder overrides.
|
||||
*
|
||||
* @see \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::access()
|
||||
*
|
||||
* @internal
|
||||
* Dynamic permission callbacks are internal.
|
||||
*/
|
||||
class LayoutBuilderOverridesPermissions implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\Reference;
|
|||
* dynamically.
|
||||
*
|
||||
* @internal
|
||||
* Service providers are internal.
|
||||
*
|
||||
* @see \Drupal\layout_builder\EventSubscriber\SetInlineBlockDependency
|
||||
*/
|
||||
|
|
|
@ -15,8 +15,6 @@ use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage;
|
|||
|
||||
/**
|
||||
* Methods to help with entities using the layout builder.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
trait LayoutEntityHelperTrait {
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@ use Drupal\Core\TempStore\SharedTempStoreFactory;
|
|||
|
||||
/**
|
||||
* Provides a mechanism for loading layouts from tempstore.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class LayoutTempstoreRepository implements LayoutTempstoreRepositoryInterface {
|
||||
|
||||
|
|
|
@ -4,11 +4,6 @@ namespace Drupal\layout_builder;
|
|||
|
||||
/**
|
||||
* Provides an interface for loading layouts from tempstore.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
interface LayoutTempstoreRepositoryInterface {
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ use Drupal\serialization\Normalizer\ConfigEntityNormalizer;
|
|||
* Normalizes/denormalizes LayoutEntityDisplay objects into an array structure.
|
||||
*
|
||||
* @internal
|
||||
* All tagged services are internal.
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutEntityDisplayNormalizer extends ConfigEntityNormalizer {
|
||||
|
||||
|
|
|
@ -4,11 +4,6 @@ namespace Drupal\layout_builder;
|
|||
|
||||
/**
|
||||
* Defines an interface for an object that stores layout sections for overrides.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
interface OverridesSectionStorageInterface extends SectionStorageInterface {
|
||||
|
||||
|
@ -19,7 +14,7 @@ interface OverridesSectionStorageInterface extends SectionStorageInterface {
|
|||
* The defaults section storage.
|
||||
*
|
||||
* @todo Determine if this method needs a parameter in
|
||||
* https://www.drupal.org/project/drupal/issues/2936507.
|
||||
* https://www.drupal.org/project/drupal/issues/2907413.
|
||||
*/
|
||||
public function getDefaultSectionStorage();
|
||||
|
||||
|
|
|
@ -30,6 +30,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* id = "field_block",
|
||||
* deriver = "\Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver",
|
||||
* )
|
||||
*
|
||||
* @internal
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
class FieldBlock extends BlockBase implements ContextAwarePluginInterface, ContainerFactoryPluginInterface {
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ use Drupal\layout_builder\Section;
|
|||
* label = @Translation("Layout Section"),
|
||||
* description = @Translation("A layout section"),
|
||||
* )
|
||||
*
|
||||
* @internal
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
class SectionData extends TypedData {
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides entity field block definitions for every field.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Plugin derivers are internal.
|
||||
*/
|
||||
class ExtraFieldBlockDeriver extends DeriverBase implements ContainerDeriverInterface {
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides entity field block definitions for every field.
|
||||
*
|
||||
* @internal
|
||||
* Plugin derivers are internal.
|
||||
*/
|
||||
class FieldBlockDeriver extends DeriverBase implements ContainerDeriverInterface {
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Provides inline block plugin definitions for all custom block types.
|
||||
*
|
||||
* @internal
|
||||
* Plugin derivers are internal.
|
||||
*/
|
||||
class InlineBlockDeriver extends DeriverBase implements ContainerDeriverInterface {
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* @todo Remove this in https://www.drupal.org/project/drupal/issues/2936655.
|
||||
*
|
||||
* @internal
|
||||
* Plugin derivers are internal.
|
||||
*/
|
||||
class LayoutBuilderLocalTaskDeriver extends DeriverBase implements ContainerDeriverInterface {
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use Drupal\layout_builder\Section;
|
|||
* Plugin implementation of the 'layout_section' field type.
|
||||
*
|
||||
* @internal
|
||||
* Plugin classes are internal.
|
||||
*
|
||||
* @FieldType(
|
||||
* id = "layout_section",
|
||||
|
|
|
@ -20,9 +20,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
* )
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
class LayoutBuilderWidget extends WidgetBase {
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ use Drupal\Core\Plugin\PluginFormInterface;
|
|||
* Base class of layouts with configurable widths.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
abstract class MultiWidthLayoutBase extends LayoutDefault implements PluginFormInterface {
|
||||
|
||||
|
|
|
@ -37,9 +37,7 @@ use Symfony\Component\Routing\RouteCollection;
|
|||
* )
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
class DefaultsSectionStorage extends SectionStorageBase implements ContainerFactoryPluginInterface, DefaultsSectionStorageInterface {
|
||||
|
||||
|
|
|
@ -44,9 +44,7 @@ use Symfony\Component\Routing\RouteCollection;
|
|||
* )
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
* Plugin classes are internal.
|
||||
*/
|
||||
class OverridesSectionStorage extends SectionStorageBase implements ContainerFactoryPluginInterface, OverridesSectionStorageInterface, SectionStorageLocalTaskProviderInterface {
|
||||
|
||||
|
|
|
@ -11,11 +11,6 @@ use Drupal\layout_builder\TempStoreIdentifierInterface;
|
|||
|
||||
/**
|
||||
* Provides a base class for Section Storage types.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
abstract class SectionStorageBase extends ContextAwarePluginBase implements SectionStorageInterface, TempStoreIdentifierInterface {
|
||||
|
||||
|
|
|
@ -7,11 +7,6 @@ namespace Drupal\layout_builder\Plugin\SectionStorage;
|
|||
*
|
||||
* @see \Drupal\layout_builder\Plugin\Derivative\LayoutBuilderLocalTaskDeriver
|
||||
* @see \Drupal\layout_builder\SectionStorageInterface
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
interface SectionStorageLocalTaskProviderInterface {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
* Helper methods for Quick Edit module integration.
|
||||
*
|
||||
* @internal
|
||||
* This is an internal utility class wrapping hook implementations.
|
||||
*/
|
||||
class QuickEditIntegration implements ContainerInjectionInterface {
|
||||
|
||||
|
@ -92,8 +93,6 @@ class QuickEditIntegration implements ContainerInjectionInterface {
|
|||
*
|
||||
* @see hook_quickedit_render_field()
|
||||
* @see layout_builder_quickedit_render_field()
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function entityViewAlter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
|
||||
if (!$entity instanceof FieldableEntityInterface || !isset($build['_layout_builder'])) {
|
||||
|
@ -243,8 +242,6 @@ class QuickEditIntegration implements ContainerInjectionInterface {
|
|||
*
|
||||
* @return array
|
||||
* The re-rendered field.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function quickEditRenderField(FieldableEntityInterface $entity, $field_name, $quick_edit_view_mode_id, $langcode) {
|
||||
list($entity_view_mode, $delta, $component_uuid) = static::deconstructViewModeId($quick_edit_view_mode_id);
|
||||
|
|
|
@ -11,6 +11,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||
* Provides routes for the Layout Builder UI.
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutBuilderRoutes implements EventSubscriberInterface {
|
||||
|
||||
|
|
|
@ -11,11 +11,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||
|
||||
/**
|
||||
* Provides a trait for building routes for a Layout Builder UI.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
trait LayoutBuilderRoutesTrait {
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ use Symfony\Component\Routing\Route;
|
|||
* Loads the section storage from the layout tempstore.
|
||||
*
|
||||
* @internal
|
||||
* Tagged services are internal.
|
||||
*/
|
||||
class LayoutTempstoreParamConverter implements ParamConverterInterface {
|
||||
|
||||
|
|
|
@ -13,16 +13,8 @@ use Drupal\Core\Config\Entity\ThirdPartySettingsInterface;
|
|||
* - An array of settings for the layout plugin.
|
||||
* - An array of components that can be rendered in the section.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*
|
||||
* @see \Drupal\Core\Layout\LayoutDefinition
|
||||
* @see \Drupal\layout_builder\SectionComponent
|
||||
*
|
||||
* @todo Determine whether an interface will be provided for this in
|
||||
* https://www.drupal.org/project/drupal/issues/2930334.
|
||||
*/
|
||||
class Section implements ThirdPartySettingsInterface {
|
||||
|
||||
|
|
|
@ -14,19 +14,9 @@ use Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent;
|
|||
* \Drupal\Core\Block\BlockPluginInterface, and contain the layout region
|
||||
* within the section layout where the component will be rendered.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*
|
||||
* @see \Drupal\Core\Layout\LayoutDefinition
|
||||
* @see \Drupal\layout_builder\Section
|
||||
* @see \Drupal\layout_builder\SectionStorageInterface
|
||||
*
|
||||
* @todo Determine whether to retain the name 'component' in
|
||||
* https://www.drupal.org/project/drupal/issues/2929783.
|
||||
* @todo Determine whether an interface will be provided for this in
|
||||
* https://www.drupal.org/project/drupal/issues/2930334.
|
||||
*/
|
||||
class SectionComponent {
|
||||
|
||||
|
|
|
@ -5,11 +5,6 @@ namespace Drupal\layout_builder;
|
|||
/**
|
||||
* Defines the interface for an object that stores layout sections.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*
|
||||
* @see \Drupal\layout_builder\Section
|
||||
*/
|
||||
interface SectionListInterface extends \Countable {
|
||||
|
|
|
@ -8,11 +8,6 @@ use Drupal\Component\Plugin\Definition\PluginDefinition;
|
|||
|
||||
/**
|
||||
* Provides section storage type plugin definition.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
class SectionStorageDefinition extends PluginDefinition implements ContextAwarePluginDefinitionInterface {
|
||||
|
||||
|
|
|
@ -19,11 +19,6 @@ use Drupal\layout_builder\SectionStorageInterface;
|
|||
* via \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface.
|
||||
* While internally depending on the parent class is necessary, external code
|
||||
* should only use the methods available on that interface.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
class SectionStorageManager extends DefaultPluginManager implements SectionStorageManagerInterface {
|
||||
|
||||
|
|
|
@ -7,11 +7,6 @@ use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
|
|||
|
||||
/**
|
||||
* Provides the interface for a plugin manager of section storage types.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
interface SectionStorageManagerInterface extends DiscoveryInterface {
|
||||
|
||||
|
|
|
@ -6,11 +6,6 @@ use Drupal\layout_builder\Section;
|
|||
|
||||
/**
|
||||
* Provides a trait for storing sections on an object.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
trait SectionStorageTrait {
|
||||
|
||||
|
|
|
@ -11,11 +11,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||
|
||||
/**
|
||||
* Defines an interface for Section Storage type plugins.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*/
|
||||
interface SectionStorageInterface extends SectionListInterface, PluginInspectionInterface, ContextAwarePluginInterface, AccessibleInterface {
|
||||
|
||||
|
|
|
@ -5,11 +5,6 @@ namespace Drupal\layout_builder;
|
|||
/**
|
||||
* Provides an interface that allows an object to provide its own tempstore key.
|
||||
*
|
||||
* @internal
|
||||
* Layout Builder is currently experimental and should only be leveraged by
|
||||
* experimental modules and development releases of contributed modules.
|
||||
* See https://www.drupal.org/core/experimental for more information.
|
||||
*
|
||||
* @todo Move to \Drupal\Core\TempStore in https://www.drupal.org/node/3026957.
|
||||
*/
|
||||
interface TempStoreIdentifierInterface {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
.layout-builder-translation-warning {
|
||||
background: left 2px url(../../../../misc/icons/e29700/warning.svg) no-repeat;
|
||||
padding-left: 20px;
|
||||
}
|
|
@ -131,3 +131,9 @@ media-form:
|
|||
css/components/media.css: {}
|
||||
dependencies:
|
||||
- media/form
|
||||
|
||||
layout_builder_content_translation_admin:
|
||||
version: VERSION
|
||||
css:
|
||||
component:
|
||||
css/components/layout-builder-content-translation.css: {}
|
||||
|
|
|
@ -178,3 +178,10 @@ function seven_form_media_form_alter(&$form, FormStateInterface $form_state) {
|
|||
$form['#attached']['library'][] = 'seven/media-form';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter() for language_content_settings_form().
|
||||
*/
|
||||
function seven_form_language_content_settings_form_alter(array &$form, FormStateInterface $form_state) {
|
||||
$form['#attached']['library'][] = 'seven/layout_builder_content_translation_admin';
|
||||
}
|
||||
|
|
|
@ -0,0 +1,217 @@
|
|||
.layout-builder {
|
||||
background-color: #fff;
|
||||
border: 3px solid #2f91da;
|
||||
padding: 1.5em 1.5em 0.5em;
|
||||
}
|
||||
|
||||
.layout-builder__add-section {
|
||||
background-color: #f7f7f7;
|
||||
width: 100%;
|
||||
outline: 2px dashed #979797;
|
||||
padding: 1.5em 0;
|
||||
text-align: center;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.layout-builder__link--add {
|
||||
color: #686868;
|
||||
border-bottom: none;
|
||||
padding-left: 24px;
|
||||
background: url(../../../../misc/icons/686868/plus.svg) transparent top left / 16px 16px no-repeat;
|
||||
}
|
||||
|
||||
.layout-builder__link--add:hover,
|
||||
.layout-builder__link--add:active,
|
||||
.layout-builder__link--add:focus {
|
||||
border-bottom-style: none;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.layout-builder__section {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.layout-builder__section .ui-sortable-helper {
|
||||
background-color: #fff;
|
||||
outline: 2px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.layout-builder__section .ui-state-drop {
|
||||
background-color: #ffd;
|
||||
outline: 2px dashed #fedb60;
|
||||
margin: 20px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.layout-builder__region {
|
||||
outline: 2px dashed #2f91da;
|
||||
}
|
||||
|
||||
.layout-builder__add-block {
|
||||
background-color: #eff6fc;
|
||||
padding: 1.5em 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layout-builder__link--remove {
|
||||
position: relative;
|
||||
background: url(../../../../misc/icons/bebebe/ex.svg) #fff center center / 16px 16px no-repeat;
|
||||
border: 1px solid #ccc;
|
||||
box-sizing: border-box;
|
||||
font-size: 1rem;
|
||||
padding: 0;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
white-space: nowrap;
|
||||
text-indent: -9999px;
|
||||
display: inline-block;
|
||||
border-radius: 26px;
|
||||
margin-left: -10px;
|
||||
margin-right: 6px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.layout-builder__link--remove:hover {
|
||||
background-image: url(../../../../misc/icons/787878/ex.svg);
|
||||
}
|
||||
|
||||
.layout-builder-block {
|
||||
padding: 1.5em;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.layout-builder-block [tabindex="-1"] {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.layout-builder__message .messages {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.layout-builder__message--defaults .messages {
|
||||
background-image: url("../images/globe.svg");
|
||||
}
|
||||
.layout-builder__message--overrides .messages {
|
||||
background-image: url("../images/location.svg");
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Remove Umami specific styling in https://www.drupal.org/node/3043228.
|
||||
*/
|
||||
.layout-builder__message .messages .messages__content {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.layout-builder-block__content-preview-placeholder-label {
|
||||
margin: 0;
|
||||
line-height: 1.4;
|
||||
font-size: 1.429em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layout-builder--content-preview-disabled .layout-builder-block {
|
||||
border-bottom: 2px dashed #979797;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#drupal-off-canvas .layout-selection li {
|
||||
display: block;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
#drupal-off-canvas .layout-selection li a {
|
||||
display: block;
|
||||
padding-top: 0.55em;
|
||||
}
|
||||
|
||||
#drupal-off-canvas .inline-block-create-button {
|
||||
display: block;
|
||||
padding: 24px;
|
||||
padding-left: 44px;
|
||||
font-size: 16px;
|
||||
color: #eee;
|
||||
border-bottom: 1px solid #333;
|
||||
background: url(../../../../misc/icons/bebebe/plus.svg) transparent 16px no-repeat;
|
||||
}
|
||||
|
||||
#drupal-off-canvas .inline-block-create-button,
|
||||
#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;
|
||||
}
|
||||
|
||||
#drupal-off-canvas .inline-block-list__item {
|
||||
display: block;
|
||||
padding: 15px 0 15px 25px;
|
||||
}
|
||||
|
||||
.layout-builder__add-section.is-layout-builder-highlighted {
|
||||
margin-bottom: calc(1.5em - 8px);
|
||||
outline: none;
|
||||
}
|
||||
.layout-builder__layout.is-layout-builder-highlighted,
|
||||
.layout-builder-block.is-layout-builder-highlighted,
|
||||
.layout-builder__add-block.is-layout-builder-highlighted {
|
||||
margin: -4px -2px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.layout-builder__add-block.is-layout-builder-highlighted,
|
||||
.layout-builder__add-section.is-layout-builder-highlighted,
|
||||
.layout-builder__layout.is-layout-builder-highlighted:before,
|
||||
.layout-builder__layout.is-layout-builder-highlighted,
|
||||
.layout-builder-block.is-layout-builder-highlighted {
|
||||
border: 4px solid #000;
|
||||
}
|
||||
|
||||
/* Highlight the active block in the Move Block dialog. */
|
||||
#drupal-off-canvas .layout-builder-components-table__block-label--current {
|
||||
border-left: solid 5px;
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo remove in https://www.drupal.org/project/drupal/issues/3042127
|
||||
* This rule ensures the row weight dropdowns in the Move Block dialog
|
||||
* maintain the background color of their container when they are hovered
|
||||
* over or are inside the active row.
|
||||
*/
|
||||
#drupal-off-canvas .layout-builder-components-table__row .form-item {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.layout-builder__region-label,
|
||||
.layout-builder__section-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layout-builder--move-blocks-active .layout-builder__region-label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout-builder--move-blocks-active .layout-builder__section-label {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.layout__region-info {
|
||||
padding: 0.5em;
|
||||
text-align: center;
|
||||
border-bottom: 2px dashed #979797;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove "You have unsaved changes" warning because Layout Builder always has
|
||||
* unsaved changes until "Save layout" is submitted.
|
||||
* @todo create issue for todo.
|
||||
*/
|
||||
.layout-builder-components-table .tabledrag-changed-warning {
|
||||
display: none !important;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* @file
|
||||
* Provides the layout styles for four-column layout section.
|
||||
*/
|
||||
|
||||
.layout--fourcol-section {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.layout--fourcol-section > .layout__region {
|
||||
flex: 0 1 100%;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 40em) {
|
||||
.layout--fourcol-section > .layout__region {
|
||||
flex: 0 1 25%;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a four-column 25%-25%-25%-25% layout.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The content for this layout.
|
||||
* - attributes: HTML attributes for the layout <div>.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'layout',
|
||||
'layout--fourcol-section',
|
||||
]
|
||||
%}
|
||||
{% if content %}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
|
||||
{% if content.first %}
|
||||
<div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
|
||||
{{ content.first }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if content.second %}
|
||||
<div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
|
||||
{{ content.second }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if content.third %}
|
||||
<div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
|
||||
{{ content.third }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if content.fourth %}
|
||||
<div {{ region_attributes.fourth.addClass('layout__region', 'layout__region--fourth') }}>
|
||||
{{ content.fourth }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation for a three-column layout.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The content for this layout.
|
||||
* - attributes: HTML attributes for the layout <div>.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if content %}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
|
||||
{% if content.first %}
|
||||
<div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
|
||||
{{ content.first }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if content.second %}
|
||||
<div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
|
||||
{{ content.second }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if content.third %}
|
||||
<div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
|
||||
{{ content.third }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* @file
|
||||
* Provides the layout styles for three-column layout section.
|
||||
*/
|
||||
|
||||
.layout--threecol-section {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.layout--threecol-section > .layout__region {
|
||||
flex: 0 1 100%;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 40em) {
|
||||
.layout--threecol-section--25-50-25 > .layout__region--first,
|
||||
.layout--threecol-section--25-50-25 > .layout__region--third,
|
||||
.layout--threecol-section--25-25-50 > .layout__region--first,
|
||||
.layout--threecol-section--25-25-50 > .layout__region--second,
|
||||
.layout--threecol-section--50-25-25 > .layout__region--second,
|
||||
.layout--threecol-section--50-25-25 > .layout__region--third {
|
||||
flex: 0 1 25%;
|
||||
}
|
||||
.layout--threecol-section--25-50-25 > .layout__region--second,
|
||||
.layout--threecol-section--25-25-50 > .layout__region--third,
|
||||
.layout--threecol-section--50-25-25 > .layout__region--first {
|
||||
flex: 0 1 50%;
|
||||
}
|
||||
.layout--threecol-section--33-34-33 > .layout__region--first,
|
||||
.layout--threecol-section--33-34-33 > .layout__region--third {
|
||||
flex: 0 1 33%;
|
||||
}
|
||||
.layout--threecol-section--33-34-33 > .layout__region--second {
|
||||
flex: 0 1 34%;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a two-column layout.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The content for this layout.
|
||||
* - attributes: HTML attributes for the layout <div>.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if content %}
|
||||
<div{{ attributes }}>
|
||||
|
||||
{% if content.first %}
|
||||
<div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
|
||||
{{ content.first }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if content.second %}
|
||||
<div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
|
||||
{{ content.second }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* @file
|
||||
* Provides the layout styles for two-column layout section.
|
||||
*/
|
||||
|
||||
.layout--twocol-section {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.layout--twocol-section > .layout__region {
|
||||
flex: 0 1 100%;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 40em) {
|
||||
.layout--twocol-section.layout--twocol-section--50-50 > .layout__region--first,
|
||||
.layout--twocol-section.layout--twocol-section--50-50 > .layout__region--second {
|
||||
flex: 0 1 50%;
|
||||
}
|
||||
|
||||
.layout--twocol-section.layout--twocol-section--33-67 > .layout__region--first,
|
||||
.layout--twocol-section.layout--twocol-section--67-33 > .layout__region--second {
|
||||
flex: 0 1 33%;
|
||||
}
|
||||
|
||||
.layout--twocol-section.layout--twocol-section--33-67 > .layout__region--second,
|
||||
.layout--twocol-section.layout--twocol-section--67-33 > .layout__region--first {
|
||||
flex: 0 1 67%;
|
||||
}
|
||||
|
||||
.layout--twocol-section.layout--twocol-section--25-75 > .layout__region--first,
|
||||
.layout--twocol-section.layout--twocol-section--75-25 > .layout__region--second {
|
||||
flex: 0 1 25%;
|
||||
}
|
||||
|
||||
.layout--twocol-section.layout--twocol-section--25-75 > .layout__region--second,
|
||||
.layout--twocol-section.layout--twocol-section--75-25 > .layout__region--first {
|
||||
flex: 0 1 75%;
|
||||
}
|
||||
}
|
|
@ -134,6 +134,11 @@ libraries-override:
|
|||
theme:
|
||||
css/language.admin.css: css/language/language.admin.css
|
||||
|
||||
layout_builder/drupal.layout_builder:
|
||||
css:
|
||||
theme:
|
||||
css/layout-builder.css: css/layout_builder/layout-builder.css
|
||||
|
||||
locale/drupal.locale.admin:
|
||||
css:
|
||||
component:
|
||||
|
|
Loading…
Reference in New Issue