diff --git a/core/lib/Drupal/Core/Layout/Annotation/Layout.php b/core/lib/Drupal/Core/Layout/Annotation/Layout.php index 1cb5ff0..d2072c2 100644 --- a/core/lib/Drupal/Core/Layout/Annotation/Layout.php +++ b/core/lib/Drupal/Core/Layout/Annotation/Layout.php @@ -14,11 +14,6 @@ * * Plugin namespace: Plugin\Layout * - * @internal - * The layout system 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\LayoutInterface * @see \Drupal\Core\Layout\LayoutDefault * @see \Drupal\Core\Layout\LayoutPluginManager diff --git a/core/lib/Drupal/Core/Layout/LayoutDefault.php b/core/lib/Drupal/Core/Layout/LayoutDefault.php index 22edb85..6e53d00 100644 --- a/core/lib/Drupal/Core/Layout/LayoutDefault.php +++ b/core/lib/Drupal/Core/Layout/LayoutDefault.php @@ -7,11 +7,6 @@ /** * Provides a default class for Layout plugins. - * - * @internal - * The layout system 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 LayoutDefault extends PluginBase implements LayoutInterface { diff --git a/core/lib/Drupal/Core/Layout/LayoutDefinition.php b/core/lib/Drupal/Core/Layout/LayoutDefinition.php index afbce7e..686cf81 100644 --- a/core/lib/Drupal/Core/Layout/LayoutDefinition.php +++ b/core/lib/Drupal/Core/Layout/LayoutDefinition.php @@ -10,11 +10,6 @@ /** * Provides an implementation of a layout definition and its metadata. - * - * @internal - * The layout system 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 LayoutDefinition extends PluginDefinition implements PluginDefinitionInterface, DerivablePluginDefinitionInterface, DependentPluginDefinitionInterface { diff --git a/core/lib/Drupal/Core/Layout/LayoutInterface.php b/core/lib/Drupal/Core/Layout/LayoutInterface.php index bb60df0..32ee74d 100644 --- a/core/lib/Drupal/Core/Layout/LayoutInterface.php +++ b/core/lib/Drupal/Core/Layout/LayoutInterface.php @@ -8,11 +8,6 @@ /** * Provides an interface for static Layout plugins. - * - * @internal - * The layout system 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 LayoutInterface extends PluginInspectionInterface, DerivativeInspectionInterface, ConfigurablePluginInterface { diff --git a/core/lib/Drupal/Core/Layout/LayoutPluginManager.php b/core/lib/Drupal/Core/Layout/LayoutPluginManager.php index e11f105..142b63d 100644 --- a/core/lib/Drupal/Core/Layout/LayoutPluginManager.php +++ b/core/lib/Drupal/Core/Layout/LayoutPluginManager.php @@ -15,11 +15,6 @@ /** * Provides a plugin manager for layouts. - * - * @internal - * The layout system 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 LayoutPluginManager extends DefaultPluginManager implements LayoutPluginManagerInterface { diff --git a/core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php b/core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php index df15be0..c0e606d 100644 --- a/core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php +++ b/core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php @@ -6,11 +6,6 @@ /** * Provides the interface for a plugin manager of layouts. - * - * @internal - * The layout system 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 LayoutPluginManagerInterface extends CategorizingPluginManagerInterface { diff --git a/core/modules/layout_discovery/layout_discovery.info.yml b/core/modules/layout_discovery/layout_discovery.info.yml index a9a4139..d0c8d3a 100644 --- a/core/modules/layout_discovery/layout_discovery.info.yml +++ b/core/modules/layout_discovery/layout_discovery.info.yml @@ -1,6 +1,6 @@ name: 'Layout Discovery' type: module description: 'Provides a way for modules or themes to register layouts.' -package: Core (Experimental) +package: Core version: VERSION core: 8.x diff --git a/core/themes/stable/templates/layout/layout--onecol.html.twig b/core/themes/stable/templates/layout/layout--onecol.html.twig new file mode 100644 index 0000000..eb553cd --- /dev/null +++ b/core/themes/stable/templates/layout/layout--onecol.html.twig @@ -0,0 +1,24 @@ +{# +/** + * @file + * Default theme implementation to display a one-column layout. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% +set classes = [ +'layout--onecol', +] +%} +{% if content %} + +
+ {{ content.content }} +
+
+{% endif %} diff --git a/core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig b/core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig new file mode 100644 index 0000000..78db2b4 --- /dev/null +++ b/core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig @@ -0,0 +1,47 @@ +{# +/** + * @file + * Default theme implementation for a three column layout. + * + * This template provides a three column 25%-50%-25% display layout, with + * additional areas for the top and the bottom. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% +set classes = [ +'layout--threecol', +] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + +
+ {{ content.left }} +
+ +
+ {{ content.middle }} +
+ +
+ {{ content.right }} +
+ + {% if content.bottom %} +
+ {{ content.bottom }} +
+ {% endif %} +
+{% endif %} diff --git a/core/themes/stable/templates/layout/layout--threecol-33-34-33.html.twig b/core/themes/stable/templates/layout/layout--threecol-33-34-33.html.twig new file mode 100644 index 0000000..59461f4 --- /dev/null +++ b/core/themes/stable/templates/layout/layout--threecol-33-34-33.html.twig @@ -0,0 +1,47 @@ +{# +/** + * @file + * Default theme implementation for a three column layout. + * + * This template provides a three column 33%-34%-33% display layout, with + * additional areas for the top and the bottom. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% +set classes = [ +'layout--threecol-33', +] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + +
+ {{ content.left }} +
+ +
+ {{ content.middle }} +
+ +
+ {{ content.right }} +
+ + {% if content.bottom %} +
+ {{ content.bottom }} +
+ {% endif %} +
+{% endif %} diff --git a/core/themes/stable/templates/layout/layout--twocol-bricks.html.twig b/core/themes/stable/templates/layout/layout--twocol-bricks.html.twig new file mode 100644 index 0000000..9c6231b --- /dev/null +++ b/core/themes/stable/templates/layout/layout--twocol-bricks.html.twig @@ -0,0 +1,51 @@ +{# +/** + * @file + * Default theme implementation for a two column layout. + * + * This template provides a two column display layout with full width areas at + * the top, bottom and in the middle. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% +set classes = [ +'layout--twocol-bricks', +] +%} +{% if content %} + +
+ {{ content.top }} +
+ +
+ {{ content.left_above }} +
+ +
+ {{ content.right_above }} +
+ +
+ {{ content.middle }} +
+ +
+ {{ content.left_below }} +
+ +
+ {{ content.right_below }} +
+ +
+ {{ content.bottom }} +
+
+{% endif %} diff --git a/core/themes/stable/templates/layout/layout--twocol.html.twig b/core/themes/stable/templates/layout/layout--twocol.html.twig new file mode 100644 index 0000000..efebf0f --- /dev/null +++ b/core/themes/stable/templates/layout/layout--twocol.html.twig @@ -0,0 +1,36 @@ +{# +/** + * @file + * Default theme implementation to display a two-column layout. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% +set classes = [ +'layout--twocol', +] +%} +{% if content %} + +
+ {{ content.top }} +
+ +
+ {{ content.left }} +
+ +
+ {{ content.right }} +
+ +
+ {{ content.bottom }} +
+
+{% endif %} diff --git a/core/themes/stable/templates/layout/layout.html.twig b/core/themes/stable/templates/layout/layout.html.twig new file mode 100644 index 0000000..88ea745 --- /dev/null +++ b/core/themes/stable/templates/layout/layout.html.twig @@ -0,0 +1,18 @@ +{# +/** + * @file + * Template for a generic layout. + */ +#} +{% set classes = [ + 'layout--' ~ layout.id|clean_class, +] %} +{% if content %} + +{% for region in layout.getRegionNames %} +
+ {{ content[region] }} +
+{% endfor %} + +{% endif %}