Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / _layout / template.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/_layout/template.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/_layout/template.twig
new file mode 100644 (file)
index 0000000..a14b73a
--- /dev/null
@@ -0,0 +1,37 @@
+{{ '{' }}#
+/**
+ * @file
+ * Default theme implementation to display {{ layout_name|lower }} layout.
+ *
+ * Available variables:
+ * - content: The content for this layout.
+ * - attributes: HTML attributes for the layout wrapper.
+ *
+ * @ingroup themeable
+ */
+#{{ '}' }}
+{{ '{' }}%
+  set classes = [
+    'layout',
+    'layout--{{ layout_machine_name|u2h }}',
+  ]
+%{{ '}' }}
+{% verbatim %}
+{% if content %}
+  <div{{ attributes.addClass(classes) }}>
+
+    {% if content.main %}
+      <div {{ region_attributes.main.addClass('layout__region', 'layout__region--main') }}>
+        {{ content.main }}
+      </div>
+    {% endif %}
+
+    {% if content.sidebar %}
+      <div {{ region_attributes.sidebar.addClass('layout__region', 'layout__region--sidebar') }}>
+        {{ content.sidebar }}
+      </div>
+    {% endif %}
+
+  </div>
+{% endif %}
+{% endverbatim %}