Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
6c5e5b02
Commit
6c5e5b02
authored
3 years ago
by
xaralis
Committed by
jan.bednarik
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(district,region): person page spacing and conditional logic
parent
98eea36c
Branches
Branches containing commit
No related tags found
2 merge requests
!473
Release
,
!471
district, region: UI improvements
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
district/templates/district/district_person_page.html
+102
-89
102 additions, 89 deletions
district/templates/district/district_person_page.html
region/templates/region/region_person_page.html
+102
-94
102 additions, 94 deletions
region/templates/region/region_person_page.html
with
204 additions
and
183 deletions
district/templates/district/district_person_page.html
+
102
−
89
View file @
6c5e5b02
{% 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>
...
...
This diff is collapsed.
Click to expand it.
region/templates/region/region_person_page.html
+
102
−
94
View file @
6c5e5b02
{% 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>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment