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 0a28785..179d1ed 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..64b9b4e --- /dev/null +++ b/core/themes/stable/templates/layout/layout--onecol.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @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', + '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..8525525 --- /dev/null +++ b/core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig @@ -0,0 +1,54 @@ +{# +/** + * @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', + 'layout--threecol-25-50-25', + ] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.third %} +
+ {{ content.third }} +
+ {% endif %} + + {% 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..5eabb04 --- /dev/null +++ b/core/themes/stable/templates/layout/layout--threecol-33-34-33.html.twig @@ -0,0 +1,54 @@ +{# +/** + * @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', + 'layout--threecol-33-34-33', + ] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.third %} +
+ {{ content.third }} +
+ {% endif %} + + {% 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..1099577 --- /dev/null +++ b/core/themes/stable/templates/layout/layout--twocol-bricks.html.twig @@ -0,0 +1,66 @@ +{# +/** + * @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', + 'layout--twocol-bricks', + ] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + + {% if content.first_above %} +
+ {{ content.first_above }} +
+ {% endif %} + + {% if content.second_above %} +
+ {{ content.second_above }} +
+ {% endif %} + + {% if content.middle %} +
+ {{ content.middle }} +
+ {% endif %} + + {% if content.first_below %} +
+ {{ content.first_below }} +
+ {% endif %} + + {% if content.second_below %} +
+ {{ content.second_below }} +
+ {% endif %} + + {% if content.bottom %} +
+ {{ content.bottom }} +
+ {% endif %} +
+{% 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..b416cbd --- /dev/null +++ b/core/themes/stable/templates/layout/layout--twocol.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @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', + 'layout--twocol', + ] +%} +{% if content %} + + {% if content.top %} +
+ {{ content.top }} +
+ {% endif %} + + {% if content.first %} +
+ {{ content.first }} +
+ {% endif %} + + {% if content.second %} +
+ {{ content.second }} +
+ {% endif %} + + {% if content.bottom %} +
+ {{ content.bottom }} +
+ {% endif %} +
+{% 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..6ba96d5 --- /dev/null +++ b/core/themes/stable/templates/layout/layout.html.twig @@ -0,0 +1,23 @@ +{# +/** + * @file + * Template for a generic layout. + */ +#} +{% + set classes = [ + 'layout', + 'layout--' ~ layout.id|clean_class, + ] +%} +{% if content %} + + {% for region in layout.getRegionNames %} + {% if content[region] %} +
+ {{ content[region] }} +
+ {% endif %} + {% endfor %} + +{% endif %}