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

feat(district): improve geo feature detail page looks

parent 90621ed0
Branches
No related tags found
2 merge requests!487Release,!481Embedded map & map feature collection support
Pipeline #7859 passed
...@@ -4,12 +4,21 @@ ...@@ -4,12 +4,21 @@
{% block subheader %} {% block subheader %}
{% image page.image width-1920 as bg_img %} {% image page.image width-1920 as bg_img %}
<header class="hero hero--image py-16 " style="--image-url: url({{ bg_img.url }})"> <header class="hero hero--image pt-16 pb-24 lg:pt-32 pb-24" style="--image-url: url({{ bg_img.url }})">
<div class="container container--default"> <div class="container container--default text-center lg:text-left">
<h1 class="head-alt-md md:head-alt-lg max-w-2xl"> {% comment %} Page index for screens up to md {% endcomment %}
{% if page.index %}
<div class="text-center relative mb-4 lg:hidden">
<span class="rounded-full inline-flex items-center justify-center bg-grey-125 font-bold text-center text-4xl md:text-5xl w-20 h-20 md:w-24 md:h-24 border-white border-8 text-black">{{ page.index }}</span>
</div>
{% endif %}
<h1 class="head-alt-md md:head-alt-xl max-w-2xl mx-auto lg:mx-0">
{{ page.title }} {{ page.title }}
</h1> </h1>
<h2 class="head-xs mt-4">
<h2 class="head-xs max-w-xl mb-2 mx-auto lg:mx-0">
{{ page.perex }} {{ page.perex }}
</h2> </h2>
</div> </div>
......
{% extends "district/base.html" %} {% extends "district/base.html" %}
{% load static wagtailcore_tags wagtailimages_tags %} {% load static wagtailcore_tags wagtailimages_tags %}
{% block content %} {% block subheader %}
<article> {% image page.image width-1920 as bg_img %}
<link itemprop="mainEntityOfPage" href="{{ page.url }}"> <header class="hero hero--image pt-16 pb-24 lg:pt-32 pb-24" style="--image-url: url({{ bg_img.url }})">
<meta itemprop="datePublished" content="{{ page.last_published_at }}"> <div class="container container--default text-center lg:text-left">
<meta itemprop="dateModified" content="{{ page.latest_revision_created_at }}"> {% comment %} Page index for screens up to md {% endcomment %}
{% if page.index %}
<div class="text-center relative mb-4 lg:hidden">
<span class="rounded-full inline-flex items-center justify-center bg-grey-125 font-bold text-center text-4xl md:text-5xl w-20 h-20 md:w-24 md:h-24 border-white border-8 text-black">{{ page.index }}</span>
</div>
{% endif %}
<h2 class="head-heavy-xs sm:head-heavy-sm md:head-heavy-base max-w-5xl mb-2"> <h2 class="head-xs max-w-xl mb-2 mx-auto lg:mx-0">
<a href="{% pageurl page.get_parent %}">{{ page.get_parent.title }}</a> <a href="{% pageurl page.get_parent %}">{{ page.get_parent.title }}</a>
</h2> </h2>
<h1 itemprop="headline" class="flex items-center justify-between"> <h1 class="head-alt-md md:head-alt-xl max-w-2xl mx-auto lg:mx-0">
<span class="head-alt-sm sm:head-alt-md md:head-alt-lg max-w-5xl">{{ page.title }}</span> {{ page.title }}
<span v-if="page.index" class="rounded-full inline-flex items-center justify-center bg-grey-125 font-bold text-center text-sm sm:text-lg md:text-4xl w-6 h-6 sm:w-8 sm:h-8 md:w-16 md:h-16 ml-4 md:mb-2">{{ page.index }}</span>
</h1> </h1>
</div>
</header>
{% endblock %}
{% block container_spacing %}py-8 lg:pb-16{% endblock %}
<div class="lg:flex mt-2 lg:space-x-16"> {% block content %}
<div class="lg:w-2/3"> <article>
<figure class="figure mb-4"> <link itemprop="mainEntityOfPage" href="{{ page.url }}">
{% image page.image width-2000 as img %} <meta itemprop="datePublished" content="{{ page.last_published_at }}">
<img src="{{ img.url }}" alt="{{ page.title }}" /> <meta itemprop="dateModified" content="{{ page.latest_revision_created_at }}">
</figure>
<div class="content-block mb-8"> <div class="flex flex-col lg:flex-row lg:space-x-8 xl:space-x-16">
<section class="lg:w-3/5 xl:w-2/3 space-y-8" itemprop="description">
<div class="content-block w-full">
<p> <p>
<strong>{{ page.perex }}</strong> <strong>{{ page.perex }}</strong>
</p> </p>
</div> </div>
{% for block in page.content %} {% for block in page.content %}
<div class="content-block {% if not forloop.last %}mb-8{% endif %}"> <div class="content-block">
{% include_block block %} {% include_block block %}
</div> </div>
{% endfor %} {% endfor %}
</div> </section>
<div class="pt-8 lg:w-1/3 md:pt-0"> <section class="lg:w-2/5 xl:w-1/3 pt-8 lg:pt-0 candidate-detail__sidebar">
<div class="space-y-8"> <div class="space-y-8">
<div class="lg:card lg:elevation-10"> <div class="lg:card lg:elevation-10">
<div class="lg:card__body"> <div class="lg:card__body">
<h2 class="head-heavy-sm mb-4"<a href="{% pageurl page.get_parent %}">{{ page.get_parent.title }}</a></h2>
{% comment %} Page index for screens bigger than md {% endcomment %}
{% if page.index %}
<div class="text-center mb-8 h-40 -mt-28 hidden lg:block">
<span class="rounded-full inline-flex items-center justify-center bg-grey-125 font-bold text-center text-7xl w-40 h-40 border-white border-8">{{ page.index }}</span>
</div>
{% endif %}
<hr />
<h2 class="head-heavy-xs mb-2">Za tohle ručí</h2>
<div itemprop="author" itemtype="http://schema.org/Person" itemscope="">
<meta itemprop="name" content="{{ page.guarantor }}">
{% include "shared/person_badge_snippet.html" with person_page=page.guarantor %}
</div>
<hr />
<div <div
class="v-geo-feature-collection" class="v-geo-feature-collection"
...@@ -63,14 +90,6 @@ ...@@ -63,14 +90,6 @@
<hr /> <hr />
<h2 class="head-heavy-xs mb-2">Za tohle ručí</h2>
<div itemprop="author" itemtype="http://schema.org/Person" itemscope="">
<meta itemprop="name" content="{{ page.guarantor }}">
{% include "shared/person_badge_snippet.html" with person_page=page.guarantor %}
</div>
<hr />
<div class="space-y-4"> <div class="space-y-4">
{% for category, features in features_by_category %} {% for category, features in features_by_category %}
<div class="js-feature-collection" style="border-right: 4px #{{ category.hex_color }} solid;"> <div class="js-feature-collection" style="border-right: 4px #{{ category.hex_color }} solid;">
...@@ -120,7 +139,7 @@ ...@@ -120,7 +139,7 @@
</div> </div>
</div> </div>
</div> </section>
</article> </article>
{% endblock %} {% endblock %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block subheader %} {% block subheader %}
{% image page.get_background_photo width-1920 as bg_img %} {% image page.get_background_photo width-1920 as bg_img %}
<header class="hero hero--image pt-16 pb-24 lg:pt-32 pb-24 candidate-detail__hero" <header class="hero hero--image pt-16 pb-24 lg:pt-32 pb-24"
style="--image-url: url({{ bg_img.url }})" style="--image-url: url({{ bg_img.url }})"
> >
<div class="container container--default text-center lg:text-left"> <div class="container container--default text-center lg:text-left">
...@@ -20,14 +20,13 @@ ...@@ -20,14 +20,13 @@
{% block container_spacing %}py-8 lg:pb-16{% endblock %} {% block container_spacing %}py-8 lg:pb-16{% endblock %}
{% block content %} {% block content %}
<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">
<section class="lg:w-3/5 xl:w-2/3"> <section class="lg:w-3/5 xl:w-2/3">
<div class="content-block w-full"> <div class="content-block w-full">
{{ page.text|richtext }} {{ page.text|richtext }}
</div> </div>
</section> </section>
<section class="lg:w-2/5 xl:w-1/3 pt-8 lg:pt-0 order-first lg:order-last candidate-detail__sidebar"> <section class="lg:w-2/5 xl:w-1/3 pt-8 lg:pt-0 order-first lg:order-last candidate-detail__sidebar">
<div class="container-padding--zero lg:card lg:elevation-10 lg:container-padding--auto"> <div class="container-padding--zero lg:card lg:elevation-10 lg:container-padding--auto">
<div class="card__body p-4 lg:p-8"> <div class="card__body p-4 lg:p-8">
...@@ -159,6 +158,5 @@ ...@@ -159,6 +158,5 @@
</div> </div>
</section> </section>
</div> </div>
</main>
{% endblock %} {% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment