Skip to content
Snippets Groups Projects
Commit 6c5e5b02 authored by xaralis's avatar xaralis Committed by jan.bednarik
Browse files

fix(district,region): person page spacing and conditional logic

parent 98eea36c
Branches
No related tags found
2 merge requests!473Release,!471district, region: UI improvements
{% extends "district/base.html" %} {% extends "district/base.html" %}
{% load wagtailcore_tags wagtailimages_tags shared_filters %} {% load static wagtailcore_tags wagtailimages_tags shared_filters %}
{% block subheader %} {% block subheader %}
{% image page.get_background_photo width-1920 as bg_img %} {% image page.get_background_photo width-1920 as bg_img %}
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
</header> </header>
{% endblock %} {% endblock %}
{% block container_spacing %}py-8 lg:pb-24{% endblock %}
{% block content %} {% block content %}
<main> <main>
<div class="flex flex-col lg:flex-row lg:space-x-8 xl:space-x-16"> <div class="flex flex-col lg:flex-row lg:space-x-8 xl:space-x-16">
...@@ -36,6 +38,7 @@ ...@@ -36,6 +38,7 @@
</div> </div>
</div> </div>
{% if page.facebook_url or page.instagram_url or page.twitter_url or page.youtube_url or page.flickr_url or page.custom_web_url or page.other_urls %}
<div class="social-icon-group space-x-2 text-lg"> <div class="social-icon-group space-x-2 text-lg">
{% if page.facebook_url %} {% if page.facebook_url %}
<a href="{{ page.facebook_url }}" target="_blank" class="social-icon" rel="noreferrer noopener"> <a href="{{ page.facebook_url }}" target="_blank" class="social-icon" rel="noreferrer noopener">
...@@ -77,19 +80,22 @@ ...@@ -77,19 +80,22 @@
<i class="{% firstof person_link_block.value.custom_icon 'ico--globe' %}"></i> <i class="{% firstof person_link_block.value.custom_icon 'ico--globe' %}"></i>
</a> </a>
{% endfor %} {% endfor %}
{% endif %}
</div> </div>
{% if page.is_pirate %}
<hr> <hr>
{# <div class="flex items-center" TODO >#} <div class="flex items-center">
{# <div class="avatar w-6 mr-2">#} <div class="avatar w-6 mr-2">
{# <img src="http://placeimg.com/100/100/people" alt="Avatar">#} <img src="{% static "elections2021/images/logo-pirati-21px.svg" %}">
{# </div>#} </div>
{##} <span class="font-bold font-condensed">Pirátská strana</span>
{# <span class="font-bold font-condensed">Pirátská strana</span>#} </div>
{# </div>#} {% endif %}
{% if page.phone or page.email and page.show_email %}
<hr> <hr>
<div class="content-block"> <div class="content-block">
{% if page.phone or page.email and page.show_email %}
<div class="space-y-4"> <div class="space-y-4">
{% if page.phone %} {% if page.phone %}
<div> <div>
...@@ -99,25 +105,30 @@ ...@@ -99,25 +105,30 @@
</a> </a>
</div> </div>
{% endif %} {% endif %}
{% if page.email and page.show_email %} {% if page.email and page.show_email %}
<div> <div>
<h4>Email</h4> <h4>Email</h4>
<a href="mailto:{{ page.email }}" <a href="mailto:{{ page.email }}" class="contact-line icon-link content-block--nostyle">
class="contact-line icon-link content-block--nostyle ">
<i class="ico--envelope"></i><span>{{ page.email }}</span> <i class="ico--envelope"></i><span>{{ page.email }}</span>
</a> </a>
</div> </div>
{% endif %} {% endif %}
</div> </div>
<hr> </div>
{% endif %} {% endif %}
{% if random_people %}
<hr>
<div class="content-block">
<h2>Lidé</h2> <h2>Lidé</h2>
<div class="space-y-4 mt-4"> <div class="space-y-4 mt-4">
{% for person in random_people %} {% for person in random_people %}
{% include "shared/person_badge_snippet.html" with person_page=person skipcontacts=1 %} {% include "shared/person_badge_snippet.html" with person_page=person skipcontacts=1 %}
{% endfor %} {% endfor %}
</div> </div>
<a href="{{ page.root_page.people_page.url }}" <a href="{{ page.root_page.people_page.url }}"
class="btn btn--icon btn--violet-500 btn--fullwidth btn--hoveractive pt-4"> class="btn btn--icon btn--violet-500 btn--fullwidth btn--hoveractive pt-4">
<div class="btn__body-wrap"> <div class="btn__body-wrap">
...@@ -127,7 +138,9 @@ ...@@ -127,7 +138,9 @@
</div> </div>
</div> </div>
</a> </a>
<hr> </div>
{% endif %}
{% comment %} <hr> {% endcomment %}
{# <h2>Kancelář</h2>#} {# <h2>Kancelář</h2>#}
{# <h4>Poslanecká sněmovna</h4>#} {# <h4>Poslanecká sněmovna</h4>#}
{# <p>#} {# <p>#}
...@@ -139,9 +152,9 @@ ...@@ -139,9 +152,9 @@
{# aria-hidden="false" tabindex="0"></iframe>#} {# aria-hidden="false" tabindex="0"></iframe>#}
{# <h4>Otevírací doba</h4>#} {# <h4>Otevírací doba</h4>#}
{# <p>Pondělí 14:00 - 18:00 objednat se přes: kancelář-podebrady@pirati.cz nebo 778 111 462.</p>#} {# <p>Pondělí 14:00 - 18:00 objednat se přes: kancelář-podebrady@pirati.cz nebo 778 111 462.</p>#}
{# <!-- Mobile divider -->#}
{# <hr class="block lg:hidden">#} <!-- Mobile divider -->
</div> <hr class="block lg:hidden">
</div> </div>
</div> </div>
</section> </section>
......
{% extends "region/base.html" %} {% extends "region/base.html" %}
{% load wagtailcore_tags wagtailimages_tags shared_filters %} {% load static wagtailcore_tags wagtailimages_tags shared_filters %}
{% block subheader %} {% block subheader %}
{% image page.get_background_photo width-1920 as bg_img %} {% image page.get_background_photo width-1920 as bg_img %}
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
</header> </header>
{% endblock %} {% endblock %}
{% block container_spacing %}py-8 lg:pb-24{% endblock %}
{% block content %} {% block content %}
<main> <main>
<div class="flex flex-col lg:flex-row lg:space-x-8 xl:space-x-16"> <div class="flex flex-col lg:flex-row lg:space-x-8 xl:space-x-16">
...@@ -36,6 +38,7 @@ ...@@ -36,6 +38,7 @@
</div> </div>
</div> </div>
{% if page.facebook_url or page.instagram_url or page.twitter_url or page.youtube_url or page.flickr_url or page.custom_web_url or page.other_urls %}
<div class="social-icon-group space-x-2 text-lg"> <div class="social-icon-group space-x-2 text-lg">
{% if page.facebook_url %} {% if page.facebook_url %}
<a href="{{ page.facebook_url }}" target="_blank" class="social-icon" rel="noreferrer noopener"> <a href="{{ page.facebook_url }}" target="_blank" class="social-icon" rel="noreferrer noopener">
...@@ -61,11 +64,6 @@ ...@@ -61,11 +64,6 @@
<i class="ico--flickr"></i> <i class="ico--flickr"></i>
</a> </a>
{% endif %} {% endif %}
{% if page.flickr_url %}
<a href="{{ page.flickr_url }}" target="_blank" class="social-icon" rel="noreferrer noopener">
<i class="ico--flickr"></i>
</a>
{% endif %}
{% if page.custom_web_url %} {% if page.custom_web_url %}
<a href="{{ page.custom_web_url }}" target="_blank" class="social-icon" rel="noreferrer noopener"> <a href="{{ page.custom_web_url }}" target="_blank" class="social-icon" rel="noreferrer noopener">
<i class="ico--globe"></i> <i class="ico--globe"></i>
...@@ -82,19 +80,22 @@ ...@@ -82,19 +80,22 @@
<i class="{% firstof person_link_block.value.custom_icon 'ico--globe' %}"></i> <i class="{% firstof person_link_block.value.custom_icon 'ico--globe' %}"></i>
</a> </a>
{% endfor %} {% endfor %}
{% endif %}
</div> </div>
{% if page.is_pirate %}
<hr> <hr>
{# <div class="flex items-center" TODO >#} <div class="flex items-center">
{# <div class="avatar w-6 mr-2">#} <div class="avatar w-6 mr-2">
{# <img src="http://placeimg.com/100/100/people" alt="Avatar">#} <img src="{% static "elections2021/images/logo-pirati-21px.svg" %}">
{# </div>#} </div>
{##} <span class="font-bold font-condensed">Pirátská strana</span>
{# <span class="font-bold font-condensed">Pirátská strana</span>#} </div>
{# </div>#} {% endif %}
{% if page.phone or page.email and page.show_email %}
<hr> <hr>
<div class="content-block"> <div class="content-block">
{% if page.phone or page.email and page.show_email %}
<div class="space-y-4"> <div class="space-y-4">
{% if page.phone %} {% if page.phone %}
<div> <div>
...@@ -104,25 +105,30 @@ ...@@ -104,25 +105,30 @@
</a> </a>
</div> </div>
{% endif %} {% endif %}
{% if page.email and page.show_email %} {% if page.email and page.show_email %}
<div> <div>
<h4>Email</h4> <h4>Email</h4>
<a href="mailto:{{ page.email }}" <a href="mailto:{{ page.email }}" class="contact-line icon-link content-block--nostyle">
class="contact-line icon-link content-block--nostyle ">
<i class="ico--envelope"></i><span>{{ page.email }}</span> <i class="ico--envelope"></i><span>{{ page.email }}</span>
</a> </a>
</div> </div>
{% endif %} {% endif %}
</div> </div>
<hr> </div>
{% endif %} {% endif %}
{% if random_people %}
<hr>
<div class="content-block">
<h2>Lidé</h2> <h2>Lidé</h2>
<div class="space-y-4 mt-4"> <div class="space-y-4 mt-4">
{% for person in random_people %} {% for person in random_people %}
{% include "shared/person_badge_snippet.html" with person_page=person skipcontacts=1 %} {% include "shared/person_badge_snippet.html" with person_page=person skipcontacts=1 %}
{% endfor %} {% endfor %}
</div> </div>
<a href="{{ page.root_page.people_page.url }}" <a href="{{ page.root_page.people_page.url }}"
class="btn btn--icon btn--violet-500 btn--fullwidth btn--hoveractive pt-4"> class="btn btn--icon btn--violet-500 btn--fullwidth btn--hoveractive pt-4">
<div class="btn__body-wrap"> <div class="btn__body-wrap">
...@@ -132,7 +138,9 @@ ...@@ -132,7 +138,9 @@
</div> </div>
</div> </div>
</a> </a>
<hr> </div>
{% endif %}
{% comment %} <hr> {% endcomment %}
{# <h2>Kancelář</h2>#} {# <h2>Kancelář</h2>#}
{# <h4>Poslanecká sněmovna</h4>#} {# <h4>Poslanecká sněmovna</h4>#}
{# <p>#} {# <p>#}
...@@ -144,9 +152,9 @@ ...@@ -144,9 +152,9 @@
{# aria-hidden="false" tabindex="0"></iframe>#} {# aria-hidden="false" tabindex="0"></iframe>#}
{# <h4>Otevírací doba</h4>#} {# <h4>Otevírací doba</h4>#}
{# <p>Pondělí 14:00 - 18:00 objednat se přes: kancelář-podebrady@pirati.cz nebo 778 111 462.</p>#} {# <p>Pondělí 14:00 - 18:00 objednat se přes: kancelář-podebrady@pirati.cz nebo 778 111 462.</p>#}
{# <!-- Mobile divider -->#}
{# <hr class="block lg:hidden">#} <!-- Mobile divider -->
</div> <hr class="block lg:hidden">
</div> </div>
</div> </div>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment