From ef7488b3f4d87e04e538a0ce2f195c928c705f3c Mon Sep 17 00:00:00 2001 From: Clayton Dewey Date: Mon, 17 Sep 2018 15:05:45 -0600 Subject: [PATCH] Customize slide to match Agaric styles --- .../templates/paragraph/paragraph--slide.html.twig | 12 ++++++++++++ agaric/templates/paragraph/slide.html.twig | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 agaric/templates/paragraph/paragraph--slide.html.twig create mode 100644 agaric/templates/paragraph/slide.html.twig diff --git a/agaric/templates/paragraph/paragraph--slide.html.twig b/agaric/templates/paragraph/paragraph--slide.html.twig new file mode 100644 index 0000000..63ebe4d --- /dev/null +++ b/agaric/templates/paragraph/paragraph--slide.html.twig @@ -0,0 +1,12 @@ +{% set item_attributes = create_attribute().addClass(item_classes) %} +{% import "@bulma/macros/renderables.html.twig" as renderables %} +{% set link = renderables.merge_attributes(item_attributes, content.field_link, 0) %} +{# Include slide component template. #} +{% + include '@agaric/paragraph/slide.html.twig' with { + classes: classes, + image_url: content.field_image[0]['#markup'], + text: content.field_text, + link: link, + } only +%} diff --git a/agaric/templates/paragraph/slide.html.twig b/agaric/templates/paragraph/slide.html.twig new file mode 100644 index 0000000..a4d16ea --- /dev/null +++ b/agaric/templates/paragraph/slide.html.twig @@ -0,0 +1,12 @@ +
+
+
+
+ {{ text }} +
+
+ {{ link }} +
+
+
+