>
@@ -84,11 +81,11 @@
{# {% 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 %}

{% endif %} #}
{{ content }}
- {# {{ actions(meta.actions, "single_page") }} #}
+ {# {{ include('includes/blocks/_actions.twig',{actions:meta.actions, mode:"single_page"}) }} #}
diff --git a/includes/blocks/_actions.twig b/includes/blocks/_actions.twig
new file mode 100644
index 0000000..3fb862e
--- /dev/null
+++ b/includes/blocks/_actions.twig
@@ -0,0 +1,67 @@
+{# SPDX-License-Identifier: EUPL-1.2 #}
+
+
+{% if mode == "portfolio" and (not (include_close_button is defined) or (include_close_button is same as(true))) %}
+ {% set actions = (actions ? actions : [])|merge([{
+ "icon": "times",
+ "content": "Close Window",
+ "color": "primary",
+ "outline": false,
+ "close_button": true}]) %}
+{% endif %}
+
+{% if actions %}
+
+ {% block actionscontent %}
+ {% for action in actions %}
+ {% if action.close_button %}
+
+ {% else %}
+
+ {{ block('contentlink') }}
+
+ {% endif %}
+ {% endfor %}
+ {% endblock actionscontent %}
+
+{% else %}
+ {{ block('actionscontent') }}
+{% endif %}
diff --git a/includes/blocks/_markdown_by_paragraph.twig b/includes/blocks/_markdown_by_paragraph.twig
new file mode 100644
index 0000000..89a25b9
--- /dev/null
+++ b/includes/blocks/_markdown_by_paragraph.twig
@@ -0,0 +1,19 @@
+{# SPDX-License-Identifier: EUPL-1.2 #}
+
+{% for paragraph in content|split("\n")|filter(e=>e is not empty) %} {# small mb-0 #}
+ {% if mode == "about" %}
+
+ {% block paragapheblock %}
+
+ {{ paragraph|markdown(singleLine=true) }}
+
+ {% endblock paragapheblock %}
+
+ {% else %}
+ {{ block('paragapheblock') }}
+ {% endif %}
+{% endfor %}
diff --git a/includes/blocks/_video.twig b/includes/blocks/_video.twig
new file mode 100644
index 0000000..8f45507
--- /dev/null
+++ b/includes/blocks/_video.twig
@@ -0,0 +1,26 @@
+{# SPDX-License-Identifier: EUPL-1.2 #}
+
+{% set known_video_types = {
+ "3gp":"video/3gpp",
+ "3g2":"video/3gpp2",
+ "avi":"video/x-msvideo",
+ "mpg":"video/mpeg",
+ "mpeg":"video/mpeg",
+ "mp4":"video/mp4",
+ "mov":"video/quicktime",
+ "ogv":"video/ogg",
+ "ts":"video/mp2t",
+ "qt":"video/quicktime",
+ "webm":"video/webm",
+ "wmv":"video/x-ms-wmv",
+} %}
+
diff --git a/includes/macros/actions.twig b/includes/macros/actions.twig
deleted file mode 100644
index 0a5b32d..0000000
--- a/includes/macros/actions.twig
+++ /dev/null
@@ -1,53 +0,0 @@
-{# SPDX-License-Identifier: EUPL-1.2 #}
-
-{% macro actions(actions, mode, include_close_button = true) %}
- {% set has_actions = actions ? true : false %}
- {{ has_actions ? '
' }}
- {% if mode == "portfolio" and include_close_button %}
- {% set close_button = {"icon": "times", "content": "Close Window", "color": "primary", "outline": false, "close_button": true} %}
- {% set actions = actions ? actions|merge([close_button]) : [close_button] %}
- {% endif %}
-
- {% for action in actions %}
- {% set classes = ["btn"] %}
- {% if mode == "social" %}
- {% set classes = classes|merge(["btn-social","mx-1"]) %}
- {% else %}
- {% set classes = classes|merge(["mx-1", "my-1"]) %}
- {% endif %}
- {% set size = "btn-xl" %}
- {% set color = mode in ["about", "social"] ? "light" : "primary" %}
- {% set outline = mode in ["about", "social"] ? true : false %}
-
- {% if action.size in ["small", "large", "xlarge"] %}
- {% set size = action.size|replace({"small": "btn-sm", "large": "btn-lg", "xlarge": "btn-xl"}) %}
- {% endif %}
-
- {% if action.color in ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark"] %}
- {% set color = action.color %}
- {% endif %}
-
- {% if action.outline is defined and action.outline in [true, false] %}
- {% set outline = action.outline %}
- {% endif %}
-
- {% if mode != "social" and not action.close_button and action.size != "medium" %}{% set classes = classes|merge([size]) %}{% endif %}
-
- {% set classes = classes|merge([["btn-", (outline ? "outline-"), color ]|join]) %}
-
- {% if action.disabled %}{% set classes = classes|merge(["disabled"]) %}{% endif %}
-
- {% if action.close_button %}
- {% set classes = classes|merge(["d-block", "mx-auto", "mt-4"]) %}
- {% endif %}
-
- {{ action.close_button ? '" : "" }}
-
- {% endfor %}
- {{ has_actions ? "
" }}
-{% endmacro %}
diff --git a/includes/macros/markdown_by_paragraph.twig b/includes/macros/markdown_by_paragraph.twig
deleted file mode 100644
index e7b6aee..0000000
--- a/includes/macros/markdown_by_paragraph.twig
+++ /dev/null
@@ -1,30 +0,0 @@
-{# SPDX-License-Identifier: EUPL-1.2 #}
-
-{% macro markdown_by_paragraph(content, mode) %}
- {% set content_array = [] %}
- {% for paragraph in content|split("\n") %}
- {% if paragraph %}
- {% set content_array = content_array|merge([paragraph]) %}
- {% endif %}
- {% endfor %}
-
- {% for paragraph in content_array %} {# small mb-0 #}
- {% set p_class = [] %}
- {% if mode == "footer" or mode == "about" %}{% set p_class = p_class|merge(["lead"]) %}{% endif %}
- {% if mode == "copyright" %}{% set p_class = p_class|merge(["small"]) %}{% endif %}
- {% if mode == "footer" or mode == "copyright" %}{% set p_class = p_class|merge(["mb-0"]) %}{% endif %}
-
- {% if mode == "about" %}
- {% set div_class = ["col-lg-4"] %}
- {% if loop.first %}
- {% set div_class = div_class|merge(["ms-auto"]) %}
- {% endif %}
- {% if loop.last %}
- {% set div_class = div_class|merge(["me-auto"]) %}
- {% endif %}
-
- {% endif %}
-
{{ paragraph|markdown(singleLine=true) }}
- {{ mode == "about" ? "
" }}
- {% endfor %}
-{% endmacro %}
diff --git a/includes/macros/video.twig b/includes/macros/video.twig
deleted file mode 100644
index 6370563..0000000
--- a/includes/macros/video.twig
+++ /dev/null
@@ -1,37 +0,0 @@
-{# SPDX-License-Identifier: EUPL-1.2 #}
-
-{% macro video(video, image, mode, loop_index=0) %}
- {% set known_video_types = {
- "3gp":"video/3gpp",
- "3g2":"video/3gpp2",
- "avi":"video/x-msvideo",
- "mpg":"video/mpeg",
- "mpeg":"video/mpeg",
- "mp4":"video/mp4",
- "mov":"video/quicktime",
- "ogv":"video/ogg",
- "ts":"video/mp2t",
- "qt":"video/quicktime",
- "webm":"video/webm",
- "wmv":"video/x-ms-wmv",
- } %}
-
- {% if mode == "portfolio_modal" %}
-
- {% endif %}
-{% endmacro %}