diff --git a/core/lib/Drupal/Core/Layout/Annotation/Layout.php b/core/lib/Drupal/Core/Layout/Annotation/Layout.php index 1cb5ff0a542c..d2072c249a8a 100644 --- a/core/lib/Drupal/Core/Layout/Annotation/Layout.php +++ b/core/lib/Drupal/Core/Layout/Annotation/Layout.php @@ -14,11 +14,6 @@ use Drupal\Core\Layout\LayoutDefinition; * * 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 22edb856e1d3..6e53d00f444b 100644 --- a/core/lib/Drupal/Core/Layout/LayoutDefault.php +++ b/core/lib/Drupal/Core/Layout/LayoutDefault.php @@ -7,11 +7,6 @@ use Drupal\Core\Plugin\PluginBase; /** * 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 afbce7e1c5e7..686cf8153833 100644 --- a/core/lib/Drupal/Core/Layout/LayoutDefinition.php +++ b/core/lib/Drupal/Core/Layout/LayoutDefinition.php @@ -10,11 +10,6 @@ use Drupal\Core\Plugin\Definition\DependentPluginDefinitionTrait; /** * 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 bb60df005db2..32ee74d18b04 100644 --- a/core/lib/Drupal/Core/Layout/LayoutInterface.php +++ b/core/lib/Drupal/Core/Layout/LayoutInterface.php @@ -8,11 +8,6 @@ use Drupal\Component\Plugin\ConfigurablePluginInterface; /** * 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 0a2878572a46..179d1ede9ab7 100644 --- a/core/lib/Drupal/Core/Layout/LayoutPluginManager.php +++ b/core/lib/Drupal/Core/Layout/LayoutPluginManager.php @@ -15,11 +15,6 @@ use Drupal\Core\Layout\Annotation\Layout; /** * 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 df15be03ad5e..c0e606d41fff 100644 --- a/core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php +++ b/core/lib/Drupal/Core/Layout/LayoutPluginManagerInterface.php @@ -6,11 +6,6 @@ use Drupal\Component\Plugin\CategorizingPluginManagerInterface; /** * 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 a9a4139ba641..d0c8d3aff623 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/modules/layout_discovery/layout_discovery.module b/core/modules/layout_discovery/layout_discovery.module index 30e2f128d5f6..3eed9fe2f994 100644 --- a/core/modules/layout_discovery/layout_discovery.module +++ b/core/modules/layout_discovery/layout_discovery.module @@ -16,7 +16,7 @@ function layout_discovery_help($route_name) { case 'help.page.layout_discovery': $output = '

' . t('About') . '

'; $output .= '

' . t('Layout Discovery allows modules or themes to register layouts, and for other modules to list the available layouts and render them.') . '

'; - $output .= '

' . t('For more information, see the online documentation for the Layout Discovery module.', [':layout-discovery-documentation' => 'https://www.drupal.org/node/2619128']) . '

'; + $output .= '

' . t('For more information, see the online documentation for the Layout Discovery module.', [':layout-discovery-documentation' => 'https://www.drupal.org/docs/8/api/layout-api']) . '

'; return $output; } } diff --git a/core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig b/core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig index 805826cbaa7d..dc29e03e4302 100644 --- a/core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig +++ b/core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig @@ -58,7 +58,7 @@ {% endif %} {% if content.bottom %} -
+
{{ content.bottom }}
{% endif %} 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 000000000000..3a7f9934d099 --- /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 000000000000..e5441d8b6be9 --- /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 000000000000..6445061c04e4 --- /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 000000000000..dc29e03e4302 --- /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 000000000000..262c657f919e --- /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 000000000000..59df5c640415 --- /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 %}