From 3fe6574d0be98763f36eeacaa98f9dddd669cc6c Mon Sep 17 00:00:00 2001 From: pikim Date: Thu, 19 Jan 2023 23:36:48 +0100 Subject: [PATCH] Autoformatted some twigs --- templates/modular.html.twig | 38 +++---- templates/partials/miniposts.html.twig | 34 +++--- templates/partials/sidebar_left.html.twig | 28 ++--- .../partials/sidebar_navigation.html.twig | 87 +++++++------- templates/partials/sidebar_right.html.twig | 106 +++++++++--------- 5 files changed, 149 insertions(+), 144 deletions(-) diff --git a/templates/modular.html.twig b/templates/modular.html.twig index 39f5d4a..3a49e2e 100644 --- a/templates/modular.html.twig +++ b/templates/modular.html.twig @@ -1,30 +1,32 @@ {% extends 'partials/base.html.twig' %} {% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %} -{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %} +{% macro pageLinkName(text) %} + {{ text|lower|replace({' ':'_'}) }} +{% endmacro %} {% block menu %} {% include 'partials/sidebar_right.html.twig' %} {% endblock %} {% block content %} -
-
-
-

{{ page.header.title }}

-
-
+
+
+
+

{{ page.header.title }}

+
+
- {% if page.header.primaryImage %} - {{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }} - {% else %} - {{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }} - {% endif %} - {{ page.content|raw}} - {% for module in page.collection() %} - {{ module.content|raw }} - {% endfor %} -
+ {% if page.header.primaryImage %} + {{ page.media[page.header.primaryImage].cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }} + {% else %} + {{ page.media.images|first.cropZoom(1038,437).loading('lazy').html(page.title, page.title, 'image featured')|raw }} + {% endif %} + {{ page.content|raw}} + {% for module in page.collection() %} + {{ module.content|raw }} + {% endfor %} +
{% endblock %} {% block sidebar %} @@ -32,5 +34,3 @@ {% include 'partials/sidebar_left.html.twig' %} {% endif %} {% endblock %} - - diff --git a/templates/partials/miniposts.html.twig b/templates/partials/miniposts.html.twig index c4e6259..d70dd2f 100644 --- a/templates/partials/miniposts.html.twig +++ b/templates/partials/miniposts.html.twig @@ -2,34 +2,32 @@ {% set miniposts_number = config.theme.miniposts_number %}
-
+

{{ 'FUTURE.FEATURED'|t }}

-
-
- +
+
{% for p in page.evaluate({'@taxonomy.category':miniposts_category}).order('header.order', 'asc').slice(0,miniposts_number) %} -
+
-

{{ p.title }}

- {% if plugin.translate_date.enabled %} +

+ {{ p.title }} +

+ {% if plugin.translate_date.enabled %} - {% else %} + {% else %} - {% endif %} - + {% endif %} +
- - {% if p.header.primaryImage %} + {% if p.header.primaryImage %} {{ p.media[p.header.primaryImage].cropZoom(1038,437).loading('lazy').html('',p.title)|raw}} - {% else %} + {% else %} {{p.media.images|first.cropZoom(1038,437).loading('lazy').html('',p.title)|raw}} - {% endif %} + {% endif %} -
- +
{% endfor %} -
+
- diff --git a/templates/partials/sidebar_left.html.twig b/templates/partials/sidebar_left.html.twig index e593324..b329e09 100644 --- a/templates/partials/sidebar_left.html.twig +++ b/templates/partials/sidebar_left.html.twig @@ -9,24 +9,24 @@ {% if theme_config.miniposts == true %} - {% block miniposts %} - {% include 'partials/miniposts.html.twig' %} + {% block miniposts %} + {% include 'partials/miniposts.html.twig' %} {% endblock %} {% endif %} {% if theme_config.footer.title or theme_config.footer.description %} -
-

{{theme_config.footer.title}}

-

{{theme_config.footer.description}}

- -
+
+

{{theme_config.footer.title}}

+

{{theme_config.footer.description}}

+ +
{% endif %} - \ No newline at end of file + {% block footer %} + {% include 'partials/footer.html.twig' %} + {% endblock %} + + diff --git a/templates/partials/sidebar_navigation.html.twig b/templates/partials/sidebar_navigation.html.twig index 0c4856c..1bf6c17 100644 --- a/templates/partials/sidebar_navigation.html.twig +++ b/templates/partials/sidebar_navigation.html.twig @@ -1,40 +1,47 @@ -{% block menu_navigation %} - {% macro loop(page) %} - {% for p in page.children.visible %} - {% set current_page = (p.active or p.activeChild) ? 'active' : '' %} - {% if p.children.visible.count > 0 %} -
  • - - {% if p.header.icon %}{% endif %} - {{ p.menu }}{% if p.routable ?? false %} {% endif %} - - -
  • - {% else %} -
  • - - {% if p.header.icon %}{% endif %} - {{ p.menu }} - -
  • - {% endif %} - {% endfor %} - {% endmacro %} - -{% endblock %} \ No newline at end of file +{% block menu_navigation %} + {% macro loop(page) %} + {% for p in page.children.visible %} + {% set current_page = (p.active or p.activeChild) ? 'active' : '' %} + {% if p.children.visible.count > 0 %} +
  • + + {% if p.header.icon %} + + {% endif %} + {{ p.menu }} + {% if p.routable ?? false %}  + {% endif %} + + + +
  • + {% else %} +
  • + + {% if p.header.icon %} + + {% endif %} + {{ p.menu }} + +
  • + {% endif %} + {% endfor %} + {% endmacro %} + +{% endblock %} diff --git a/templates/partials/sidebar_right.html.twig b/templates/partials/sidebar_right.html.twig index 4ea7871..ceea146 100644 --- a/templates/partials/sidebar_right.html.twig +++ b/templates/partials/sidebar_right.html.twig @@ -1,57 +1,57 @@