From f088edc007bb0229a567b2bb458e5ce7d9fcd3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexa=20Valentov=C3=A1?= <git@imaniti.org> Date: Tue, 1 Oct 2024 22:50:43 +0200 Subject: [PATCH] fix templates --- main/templates/main/main_contact_page.html | 2 +- main/templates/main/main_people_page.html | 2 +- .../templates/styleguide2/contact_page.html | 2 +- shared/templates/styleguide2/people_page.html | 174 +++++++++--------- 4 files changed, 90 insertions(+), 90 deletions(-) diff --git a/main/templates/main/main_contact_page.html b/main/templates/main/main_contact_page.html index bb28c239..c271ce22 100644 --- a/main/templates/main/main_contact_page.html +++ b/main/templates/main/main_contact_page.html @@ -1,4 +1,4 @@ -{% include "styleguide2/contact_page.html" with show_regional_contacts=True %} +{% extends "styleguide2/contact_page.html" %} {% block navbar %} {% include 'styleguide2/includes/organisms/layout/main/navbar.html' with selected_item=page.get_menu_title %} diff --git a/main/templates/main/main_people_page.html b/main/templates/main/main_people_page.html index 57da54d9..28868a40 100644 --- a/main/templates/main/main_people_page.html +++ b/main/templates/main/main_people_page.html @@ -1,4 +1,4 @@ -{% include "styleguide2/people_page.html" %} +{% extends "styleguide2/people_page.html" %} {% block navbar %} {% include 'styleguide2/includes/organisms/layout/main/navbar.html' with selected_item=page.get_menu_title %} diff --git a/shared/templates/styleguide2/contact_page.html b/shared/templates/styleguide2/contact_page.html index d87b68b1..cf57b8f0 100644 --- a/shared/templates/styleguide2/contact_page.html +++ b/shared/templates/styleguide2/contact_page.html @@ -33,7 +33,7 @@ </div> </div> - {% if show_regional_contacts %} + {% if not hide_regional_contacts %} <div class="w-full max-w-2xl"> <h2 class="head-6xl mb-5"> Regionálnà kontakty diff --git a/shared/templates/styleguide2/people_page.html b/shared/templates/styleguide2/people_page.html index 0a8d0909..8fe9adc5 100644 --- a/shared/templates/styleguide2/people_page.html +++ b/shared/templates/styleguide2/people_page.html @@ -3,113 +3,113 @@ {% block content %} -{% block navbar %} - {% include 'styleguide2/includes/organisms/layout/navbar.html' with selected_item=page.get_menu_title %} -{% endblock %} - -<div class="__js-root"> - <ui-view-provider - :initial="{ - {% for content_item in page.content %} - {% if content_item.block_type == "octopus_group" or content_item.block_type == "people_group" or content_item.block_type == "team_group" %} - '{{ content_item.value.slug }}-{{ forloop.counter }}': {% if page.content|is_first_people_type:forloop %}false{% else %}true{% endif %}, - {% endif %} - {% endfor %} - }" - :sync-location="true" - v-slot="{ isCurrentView, toggleView }" - > - {% include 'styleguide2/includes/organisms/header/people_header.html' with content=page.content title=page.title description_column_1=page.perex_col_1 description_column_2=page.perex_col_2 %} - - <main role="main" class="mb-20"> - <div class="container--wide"> - <div - class=" - flex flex-wrap justify-center gap-4 - xl:justify-start - " - > - <div class="grid grid-cols-1 gap-4 md:grid-cols-2 w-full"> - {% for block in page.content %} - {% if block.block_type == "octopus_group" %} - <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')"> - {% with block|get_block_octopus_person_list as person_list %} - {% if person_list|length %} - {% for person_page in person_list %} + {% block navbar %} + {% include 'styleguide2/includes/organisms/layout/navbar.html' with selected_item=page.get_menu_title %} + {% endblock %} + + <div class="__js-root"> + <ui-view-provider + :initial="{ + {% for content_item in page.content %} + {% if content_item.block_type == "octopus_group" or content_item.block_type == "people_group" or content_item.block_type == "team_group" %} + '{{ content_item.value.slug }}-{{ forloop.counter }}': {% if page.content|is_first_people_type:forloop %}false{% else %}true{% endif %}, + {% endif %} + {% endfor %} + }" + :sync-location="true" + v-slot="{ isCurrentView, toggleView }" + > + {% include 'styleguide2/includes/organisms/header/people_header.html' with content=page.content title=page.title description_column_1=page.perex_col_1 description_column_2=page.perex_col_2 %} + + <main role="main" class="mb-20"> + <div class="container--wide"> + <div + class=" + flex flex-wrap justify-center gap-4 + xl:justify-start + " + > + <div class="grid grid-cols-1 gap-4 md:grid-cols-2 w-full"> + {% for block in page.content %} + {% if block.block_type == "octopus_group" %} + <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')"> + {% with block|get_block_octopus_person_list as person_list %} + {% if person_list|length %} + {% for person_page in person_list %} + {% image person_page.specific.get_profile_image fill-480x480 as profile_image %} + + {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %} + {% endfor %} + {% endif %} + {% endwith %} + </template> + {% endif %} + {% endfor %} + </div> + + <div class="grid grid-cols-1 gap-4 md:grid-cols-2 w-full"> + {% for block in page.content %} + {% if block.block_type == "people_group" %} + <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')"> + {% if block.value.person_list|length %} + {% for person_page in block.value.person_list %} {% image person_page.specific.get_profile_image fill-480x480 as profile_image %} {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %} {% endfor %} {% endif %} - {% endwith %} - </template> - {% endif %} - {% endfor %} - </div> - <div class="grid grid-cols-1 gap-4 md:grid-cols-2 w-full"> + {% if block.value.person_list_with_custom_positions|length %} + {% for person in block.value.person_list_with_custom_positions %} + {% with person.page as person_page %} + {% image person_page.specific.get_profile_image fill-480x480 as profile_image %} + + {% firstof person.position person_page.position as position %} + + {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=position telephone=person_page.phone mail=person_page.email url=person_page.url %} + {% endwith %} + {% endfor %} + {% endif %} + </template> + {% endif %} + {% endfor %} + </div> + {% for block in page.content %} - {% if block.block_type == "people_group" %} + {% if block.block_type == "team_group" %} <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')"> - {% if block.value.person_list|length %} - {% for person_page in block.value.person_list %} - {% image person_page.specific.get_profile_image fill-480x480 as profile_image %} + {% for team in block.value.team_list %} - {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=person_page.position telephone=person_page.phone mail=person_page.email url=person_page.url %} - {% endfor %} - {% endif %} - - {% if block.value.person_list_with_custom_positions|length %} - {% for person in block.value.person_list_with_custom_positions %} - {% with person.page as person_page %} - {% image person_page.specific.get_profile_image fill-480x480 as profile_image %} + {% if team.headline %} + <h2 class="head-6xl mt-5 mb-5">{{ team.headline }}</h2> + {% endif %} - {% firstof person.position person_page.position as position %} + <ul class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 content-stretch gap-8"> + {% for card in team.card_items %} + {% image card.image max-512x512 as card_image %} + {% firstof card.page.url card.link as card_url %} - {% include 'styleguide2/includes/molecules/contact/contact_person_large_box.html' with image=profile_image name=person_page.title function=position telephone=person_page.phone mail=person_page.email url=person_page.url %} - {% endwith %} - {% endfor %} - {% endif %} + {% include 'styleguide2/includes/molecules/boxes/card_box.html' with image=card_image header=card.title content=card.text url=card_url description_classes='!bg-grey-180' %} + {% endfor %} + </ul> + {% endfor %} </template> {% endif %} {% endfor %} </div> {% for block in page.content %} - {% if block.block_type == "team_group" %} - <template v-if="isCurrentView('{{ block.value.slug }}-{{ forloop.counter }}')"> - {% for team in block.value.team_list %} - - {% if team.headline %} - <h2 class="head-6xl mt-5 mb-5">{{ team.headline }}</h2> - {% endif %} - - <ul class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 content-stretch gap-8"> - {% for card in team.card_items %} - {% image card.image max-512x512 as card_image %} - {% firstof card.page.url card.link as card_url %} - - {% include 'styleguide2/includes/molecules/boxes/card_box.html' with image=card_image header=card.title content=card.text url=card_url description_classes='!bg-grey-180' %} - {% endfor %} - </ul> - {% endfor %} - </template> + {% if block.block_type != "octopus_group" and block.block_type != "people_group" and block.block_type != "team_group" %} + {% include_block block %} {% endif %} {% endfor %} </div> + </main> + </ui-view-provider> + </div> - {% for block in page.content %} - {% if block.block_type != "octopus_group" and block.block_type != "people_group" and block.block_type != "team_group" %} - {% include_block block %} - {% endif %} - {% endfor %} - </div> - </main> - </ui-view-provider> -</div> - -{% block newsletter %} - {% include 'styleguide2/includes/organisms/main_section/newsletter_section.html' %} -{% endblock %} + {% block newsletter %} + {% include 'styleguide2/includes/organisms/main_section/newsletter_section.html' %} + {% endblock %} {% endblock content %} -- GitLab