Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / system / templates / off-canvas-page-wrapper.html.twig
diff --git a/web/core/modules/system/templates/off-canvas-page-wrapper.html.twig b/web/core/modules/system/templates/off-canvas-page-wrapper.html.twig
new file mode 100644 (file)
index 0000000..18dd48b
--- /dev/null
@@ -0,0 +1,26 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a page wrapper.
+ *
+ * For consistent wrapping to {{ page }} render in all themes. The
+ * "data-off-canvas-main-canvas" attribute is required by the off-canvas dialog.
+ * This is used by the core/drupal.dialog.off_canvas library to select the
+ * "main canvas" page element as opposed to the "off canvas" which is the dialog
+ * itself. The "main canvas" element must be resized according to the width of
+ * the "off canvas" dialog so that no portion of the "main canvas" is obstructed
+ * by the off-canvas dialog. The off-canvas dialog can vary in width when opened
+ * and can be resized by the user. The "data-off-canvas-main-canvas" attribute
+ * cannot be removed without breaking the off-canvas dialog functionality.
+ *
+ * Available variables:
+ * - children: Contains the child elements of the page.
+ *
+ * @ingroup themeable
+ */
+#}
+{% if children %}
+  <div class="dialog-off-canvas-main-canvas" data-off-canvas-main-canvas>
+    {{ children }}
+  </div>
+{% endif %}