diff --git a/main/templates/main/main_contact_page.html b/main/templates/main/main_contact_page.html index ac27fe53bf9ab7310444a4c8d1285c4069a2b015..22176e0947380e255adb7eb97d8a288ca2c7a10b 100644 --- a/main/templates/main/main_contact_page.html +++ b/main/templates/main/main_contact_page.html @@ -7,26 +7,27 @@ <main role="main"> <section class="grid-container no-max mb-16"> <div class="grid-content-with-right-side flex flex-wrap"> - <div class="mb-12 xl:mb-0"> - <h2 class="font-alt text-3xl sm:text-4xl mb-5"> - Kontakty pro veřejnost - </h2> - {% for text_block in page.text %} - <div class="flex flex-wrap justify-between"> - <div class="leading-5 w-1/2"> - {{ text_block.value.text_column_1|richtext }} - </div> - <div class="leading-5 w-5/6 sm:w-5/12"> - {{ text_block.value.text_column_2|richtext }} + {% if page.text %} + <div class="mb-12 xl:mb-0"> + <h2 class="font-alt text-3xl sm:text-4xl mb-5"> + Kontakty pro veřejnost + </h2> + {% for text_block in page.text %} + <div class="flex flex-wrap justify-between"> + <div class="leading-5 w-1/2"> + {{ text_block.value.text_column_1|richtext }} + </div> + <div class="leading-5 w-5/6 sm:w-5/12"> + {{ text_block.value.text_column_2|richtext }} + </div> </div> - </div> - {% endfor %} - </div> + {% endfor %} + </div> + {% endif %} <div class="w-full max-w-2xl"> <h2 class="font-alt text-4xl mb-5"> Regionální kontakty </h2> - <div class="__js-root w-full flex max-w-2xl items-center"> <ui-region-map class="w-full"></ui-region-map> </div> @@ -35,68 +36,74 @@ </section> <div class="grid-container"> <section class="grid-content-with-right-side mb-20"> - <h2 class="font-alt text-4xl mb-5"> - Další kontakty - </h2> - <div class="flex flex-wrap"> - {% for contact_block in page.contact_boxes %} - <div class="contact-box"> - <div> - <div class="h-16 mx-auto w-16"> - hm, image... + {% if page.contact_boxes %} + <h2 class="font-alt text-4xl mb-5"> + Další kontakty + </h2> + + <div class="flex flex-wrap"> + {% for contact_block in page.contact_boxes %} + <div class="contact-box"> + <div> + <div class="h-16 mx-auto w-16"> + hm, image... + </div> + <h3 class="font-alt mb-3 text-xl"> + {{ contact_block.value.title }} + </h3> + <p> + {{ contact_block.value.subtitle }} + </p> </div> - <h3 class="font-alt mb-3 text-xl"> - {{ contact_block.value.title }} - </h3> - <p> - {{ contact_block.value.subtitle }} - </p> - </div> - <a href="{{ contact_block.value.button_link }}" class="btn btn__slide__wrap"> + <a href="{{ contact_block.value.button_link }}" class="btn btn__slide__wrap"> <span class="btn bg-black text-white w-32"> {{ contact_block.value.button_text }} </span> - <span class="btn bg-blue-300 text-white w-32"> + <span class="btn bg-blue-300 text-white w-32"> {{ contact_block.value.button_text }} </span> - </a> - </div> - {% endfor %} - </div> + </a> + </div> + {% endfor %} + </div> + {% endif %} </section> </div> <div class="grid-container no-max"> - <section class="grid-content-with-right-side mb-20"> - <h2 class="font-alt text-4xl mb-5"> - Kontakty pro média - </h2> - <div class="flex flex-wrap"> - {% for contact_person_box in page.contact_people %} - <div class="flex person-box mb-4 mr-4"> - <div class="mr-7"> - {% image contact_person_box.value.person.profile_image fill-250x250 as profile_image %} - <img class="rounded-full shadow-sm w-20 sm:w-40" src="{{ profile_image.url }}" - alt="user image"> - </div> - <div class="flex flex-col py-4"> - <h6 class="font-bold text-2xl sm:text-3xl"> - {{ contact_person_box.value.person.title }} - </h6> - <span class="mb-6 text-grey-300"> + {% if page.contact_people %} + <section class="grid-content-with-right-side mb-20"> + <h2 class="font-alt text-4xl mb-5"> + Kontakty pro média + </h2> + <div class="flex flex-wrap"> + {% for contact_person_box in page.contact_people %} + <div class="flex person-box mb-4 mr-4"> + <div class="mr-7"> + {% image contact_person_box.value.person.profile_image fill-250x250 as profile_image %} + <img class="rounded-full shadow-sm w-20 sm:w-40" src="{{ profile_image.url }}" + alt="user image"> + </div> + <div class="flex flex-col py-4"> + <h6 class="font-bold text-2xl sm:text-3xl"> + {{ contact_person_box.value.person.title }} + </h6> + <span class="mb-6 text-grey-300"> {{ contact_person_box.value.person.position }} </span> - <span> + <span> {{ contact_person_box.value.person.phone }} </span> - <span class="text-turquoise-500"> + <span class="text-turquoise-500"> {{ contact_person_box.value.person.email }} </span> + </div> </div> - </div> - {% endfor %} - </div> - </section> + {% endfor %} + </div> + </section> + {% endif %} </div> </main> + {% include 'main/includes/newsletter_section.html' %} {% endblock content %}