From 5905ee4d1767ddecdbc26bd7ba12239cf17ddbbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Fri, 17 Mar 2023 01:03:13 +0100 Subject: [PATCH] refactor(macros): convert to templates --- includes/_content.twig | 7 +-- includes/_footer.twig | 2 - includes/_home_content.twig | 7 +-- includes/blocks/_actions.twig | 67 +++++++++++++++++++++ includes/blocks/_markdown_by_paragraph.twig | 19 ++++++ includes/blocks/_video.twig | 26 ++++++++ includes/macros/actions.twig | 53 ---------------- includes/macros/markdown_by_paragraph.twig | 30 --------- includes/macros/video.twig | 37 ------------ 9 files changed, 116 insertions(+), 132 deletions(-) create mode 100644 includes/blocks/_actions.twig create mode 100644 includes/blocks/_markdown_by_paragraph.twig create mode 100644 includes/blocks/_video.twig delete mode 100644 includes/macros/actions.twig delete mode 100644 includes/macros/markdown_by_paragraph.twig delete mode 100644 includes/macros/video.twig diff --git a/includes/_content.twig b/includes/_content.twig index 5faf052..3090c4e 100644 --- a/includes/_content.twig +++ b/includes/_content.twig @@ -1,8 +1,5 @@ {# SPDX-License-Identifier: EUPL-1.2 #} -{% from "includes/macros/markdown_by_paragraph.twig" import markdown_by_paragraph %} -{% from "includes/macros/actions.twig" import actions %} -{% from "includes/macros/video.twig" import video %}
@@ -16,12 +13,12 @@
{% if meta.video %} - {{ video(meta.video, meta.image, "content") }} + {{ include("includes/blocks/_video.twig",{video:meta.video,image:meta.image,mode:"content"}) }} {% elseif meta.image %} {{ meta.image_alt }} {% endif %} {{ content }} - {{ actions(meta.actions, "single_page") }} + {{ include('includes/blocks/_actions.twig',{actions:meta.actions, mode:"single_page"}) }}
diff --git a/includes/_footer.twig b/includes/_footer.twig index de31d45..638cea8 100644 --- a/includes/_footer.twig +++ b/includes/_footer.twig @@ -1,7 +1,5 @@ {# SPDX-License-Identifier: EUPL-1.2 #} -{% from "includes/macros/markdown_by_paragraph.twig" import markdown_by_paragraph %} -{% from "includes/macros/actions.twig" import actions %} {% if not (index.location.disabled and index.social.disabled and index.footer.disabled) %}