From 54f51b569b99eccc295a9265202c69daa0ae8966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Mon, 22 Oct 2018 19:11:13 -0400 Subject: [PATCH] Clean up layout template ... but nah we're taking this down to the paragraph level --- .../layout/layout--onecol--node.html.twig | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/agaric/templates/layout/layout--onecol--node.html.twig b/agaric/templates/layout/layout--onecol--node.html.twig index 8ccfbf7..7d9ab83 100644 --- a/agaric/templates/layout/layout--onecol--node.html.twig +++ b/agaric/templates/layout/layout--onecol--node.html.twig @@ -8,25 +8,29 @@ * - attributes: HTML attributes for the layout
. * * @ingroup themeable + TODO set a variable for background image so we can use base_path rather than / + setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image:url(/themes/custom/agarica/patternlibrary/agaric/images/fpo-video-poster.png)') +{% if is_front %} + {% set classes = classes|merge(['hero-main', 'is-large']) %} +{% endif %} */ #} -{% set bundle = content['#node'].bundle %} - -{% set header_section_attributes = create_attribute({'class': ['hero', 'is-dark']}) %} -{% if is_front %} - {# TODO set a variable for background image so we can use base_path rather than / #} - {% set header_section_attributes = header_section_attributes.addClass('hero-main is-large').setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image:url(/themes/custom/agarica/patternlibrary/agaric/images/fpo-video-poster.png)') %} -{% endif %} - {% if content %} - + +{% set bundle = content['#node'].bundle %} +{% set classes = [ 'hero', 'hero-' ~ bundle|replace({"_": "-"}) ] %} +{# expected if statement would start here #} +{% set classes = classes|merge(['is-dark']) %} + + {# Header hero region #} -
-
-
- {{ content.title }} -
+
+
+ {{ content.title }}
- {{ content.content }} + + +{{ content.content }} + {% endif %}