Skip to content
Snippets Groups Projects
Commit b4c7c1d2 authored by Daniel Kriz's avatar Daniel Kriz
Browse files

Merge branch 'feature/pirati-cz' into feature/pirati-cz-dan

parents 9752155e 9625c3c2
Branches
No related tags found
3 merge requests!607Pirati.cz,!588[FIX]17-meta-pro-bloky,!575Feature/pirati cz
Pipeline #9428 passed
Showing
with 483 additions and 87 deletions
......@@ -186,7 +186,7 @@ class OtherLinksBlock(StructBlock):
class SocialLinkBlock(LinkBlock):
icon = CharBlock(label="Ikona") # TODO CSS class name or somthing better?
icon = CharBlock(label="Ikona", help_text="Seznam ikon - https://styleguide.pirati.cz/latest/?p=viewall-atoms-icons") # TODO CSS class name or somthing better?
class Meta:
icon = "link"
......
# Generated by Django 4.0.7 on 2022-08-24 14:12
import django.db.models.deletion
import wagtail.blocks
import wagtail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("wagtailimages", "0024_index_image_file_hash"),
("main", "0015_mainarticlespage_last_import_log"),
]
operations = [
migrations.RemoveField(
model_name="mainpersonpage",
name="facebook",
),
migrations.RemoveField(
model_name="mainpersonpage",
name="instagram",
),
migrations.RemoveField(
model_name="mainpersonpage",
name="twitter",
),
migrations.AddField(
model_name="mainpersonpage",
name="main_image",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="+",
to="wagtailimages.image",
verbose_name="Hlavní obrázek",
),
),
migrations.AddField(
model_name="mainpersonpage",
name="people",
field=wagtail.fields.StreamField(
[
(
"people_group",
wagtail.blocks.StructBlock(
[
("title", wagtail.blocks.CharBlock(label="Titulek")),
(
"slug",
wagtail.blocks.CharBlock(
help_text="Není třeba vyplňovat, bude automaticky vyplněno",
label="Slug skupiny",
required=False,
),
),
(
"person_list",
wagtail.blocks.ListBlock(
wagtail.blocks.PageChooserBlock(
label="Detail osoby",
page_type=["main.MainPersonPage"],
),
label="Skupina osob",
),
),
],
label="Seznam osob",
),
)
],
blank=True,
use_json_field=None,
verbose_name="Lidé",
),
),
migrations.AddField(
model_name="mainpersonpage",
name="profile_image",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="+",
to="wagtailimages.image",
verbose_name="Profilový obrázek",
),
),
migrations.AddField(
model_name="mainpersonpage",
name="social_links",
field=wagtail.fields.StreamField(
[
(
"social_links",
wagtail.blocks.StructBlock(
[
(
"text",
wagtail.blocks.CharBlock(
label="Titulkek odkazu (text, který se zobrazí místo dlouhého odkazu)"
),
),
("link", wagtail.blocks.URLBlock(label="Odkaz")),
(
"icon",
wagtail.blocks.CharBlock(
help_text="Seznam ikon - https://styleguide.pirati.cz/latest/?p=viewall-atoms-icons",
label="Ikona",
),
),
]
),
)
],
blank=True,
use_json_field=None,
verbose_name="Odkazy na sociální sítě",
),
),
migrations.AlterField(
model_name="mainhomepage",
name="social_links",
field=wagtail.fields.StreamField(
[
(
"social_links",
wagtail.blocks.StructBlock(
[
(
"text",
wagtail.blocks.CharBlock(
label="Titulkek odkazu (text, který se zobrazí místo dlouhého odkazu)"
),
),
("link", wagtail.blocks.URLBlock(label="Odkaz")),
(
"icon",
wagtail.blocks.CharBlock(
help_text="Seznam ikon - https://styleguide.pirati.cz/latest/?p=viewall-atoms-icons",
label="Ikona",
),
),
]
),
)
],
blank=True,
use_json_field=None,
verbose_name="Odkazy na sociální sítě v zápatí webu",
),
),
]
# Generated by Django 4.0.7 on 2022-08-24 14:32
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("main", "0016_remove_mainpersonpage_facebook_and_more"),
]
operations = [
migrations.RemoveField(
model_name="mainarticlespage",
name="timeline",
),
]
......@@ -195,18 +195,6 @@ class MainArticlesPage(
ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin, Page
):
perex = models.TextField()
timeline = StreamField( # TODO delete
[
(
"article_list",
PageChooserBlock(
page_type="main.MainArticlePage", label="Vybrat aktualitu"
),
)
],
verbose_name="Timeline",
blank=True,
)
last_import_log = models.TextField(
"Výstup z posledního importu", null=True, blank=True
)
......@@ -238,7 +226,7 @@ class MainArticlesPage(
subpage_types = ["main.MainArticlePage"]
### PANELS
content_panels = Page.content_panels + [FieldPanel("perex"), FieldPanel("timeline")]
content_panels = Page.content_panels + [FieldPanel("perex")]
promote_panels = make_promote_panels()
### EDIT HANDLERS
......@@ -438,6 +426,23 @@ class MainPeoplePage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin, Page):
### FIELDS
main_image = models.ForeignKey(
"wagtailimages.Image",
on_delete=models.PROTECT,
blank=True,
null=True,
verbose_name="Hlavní obrázek",
related_name="+"
)
profile_image = models.ForeignKey(
"wagtailimages.Image",
on_delete=models.PROTECT,
blank=True,
null=True,
verbose_name="Profilový obrázek",
related_name="+"
)
before_name = models.CharField(
"Tituly před jménem", max_length=16, blank=True, null=True
)
......@@ -457,13 +462,23 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
max_length=32,
)
social_links = StreamField(
[
("social_links", blocks.SocialLinkBlock()),
],
verbose_name="Odkazy na sociální sítě",
blank=True,
)
people = StreamField(
[("people_group", blocks.PeopleGroupBlock(label="Seznam osob"))],
verbose_name="Lidé",
blank=True,
)
email = models.CharField("E-mail", max_length=128, blank=True, null=True)
phone = models.CharField("Telefonní kontakt", max_length=16, blank=True, null=True)
facebook = models.URLField("Odkaz na Facebook", blank=True, null=True)
twitter = models.URLField("Odkaz na Twitter", blank=True, null=True)
instagram = models.URLField("Odkaz na Instagram", blank=True, null=True)
settings_panels = []
### RELATIONS
......@@ -473,6 +488,8 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
### PANELS
content_panels = Page.content_panels + [
FieldPanel("main_image"),
FieldPanel("profile_image"),
FieldPanel("before_name"),
FieldPanel("after_name"),
FieldPanel("position"),
......@@ -481,9 +498,8 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
FieldPanel("text"),
FieldPanel("email"),
FieldPanel("phone"),
FieldPanel("facebook"),
FieldPanel("twitter"),
FieldPanel("instagram"),
FieldPanel("social_links"),
FieldPanel("people"),
]
def get_context(self, request):
......
<section class="grid-container mb-4 justify-start xl:mb-14">
<div class="grid-content-with-right-side">
<div class="leading-6">
<h2 class="head-6xl mb-8">
Články
</h2>
{{> molecules-person-article-preview }}
{{> molecules-person-article-preview }}
</div>
<div class="flex justify-center">
{{> atoms-button-animated(btn-text: "Zobrazit další", classes-btn-hidden: "bg-black") }}
</div>
</div>
</section>
<div class="grid-container article-section">
<div class="grid-full mb-8">
<div class="mb-4">
<h3 class="head-7xl mb-4 xl:hidden">Červenec</h3>
<div class="flex flex-col justify-between xl:flex-row">
<div class="xl:pt-8">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
<div class="relative border border-violet-400 mx-8 hidden xl:block">
<div class="absolute bg-violet-400 p-1 text-white font-bold" style="transform: translateX(-50%); top: -1rem">
Červenec
</div>
</div>
<div class="xl:pt-14">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
</div>
</div>
<div class="mb-4">
<h3 class="head-7xl mb-4 xl:hidden">Srpen</h3>
<div class="flex flex-col justify-between xl:flex-row">
<div class="xl:pt-8">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
<div class="relative border border-violet-400 mx-8 hidden xl:block">
<div class="absolute bg-violet-400 p-1 text-white font-bold" style="transform: translateX(-50%); top: -1rem">
Srpen
</div>
</div>
<div class="xl:pt-14">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
</div>
</div>
<div class="flex justify-center">
{{> atoms-button-animated(btn-text: "Zobrazit další", classes-btn-hidden: "bg-black") }}
</div>
</div>
</div>
......@@ -4,9 +4,6 @@
<main role="main">
<div class="grid-container mb-2 xl:mb-12">
<div class="grid-left-side">
{{> molecules-sidebar-menu }}
</div>
<div class="grid-content leading-6">
<h2 class="head-xl mb-2">
Piráti pracují pro občany ČR na všech úrovních. V zastupitelstev obcí působí 400 zastupitelů, dalších 100 v krajích.
......@@ -18,48 +15,26 @@
</div>
</div>
<div class="grid-container article-section">
<div class="grid-full mb-8">
<div class="mb-4">
<h3 class="head-7xl mb-4 xl:hidden">Červenec</h3>
<div class="flex flex-col justify-between xl:flex-row">
<div class="xl:pt-8">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
<div class="relative border border-violet-400 mx-8 hidden xl:block">
<div class="absolute bg-violet-400 p-1 text-white font-bold" style="transform: translateX(-50%); top: -1rem">
Červenec
</div>
</div>
<div class="xl:pt-14">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
</div>
</div>
<div class="mb-4">
<h3 class="head-7xl mb-4 xl:hidden">Srpen</h3>
<div class="flex flex-col justify-between xl:flex-row">
<div class="xl:pt-8">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
<div class="relative border border-violet-400 mx-8 hidden xl:block">
<div class="absolute bg-violet-400 p-1 text-white font-bold" style="transform: translateX(-50%); top: -1rem">
Srpen
</div>
</div>
<div class="xl:pt-14">
{{> molecules-work-article-preview }}
{{> molecules-work-article-preview }}
</div>
</div>
</div>
<div class="flex justify-center">
{{> atoms-button-animated(btn-text: "Zobrazit další", classes-btn-hidden: "bg-black") }}
</div>
</div>
<div class="__js-root">
<ui-view-provider :initial="{timeline: true, articles: false}" :sync-location="true"
v-slot="{ isCurrentView, toggleView }">
<div class="grid-container article-section mb-8">
<div class="grid-full">
<div class="switch">
<a @click="toggleView('timeline')" class="switch__item"
:class="{'switch__item--active': isCurrentView('timeline')}">Poslanecká sněmovna</a>
<a @click="toggleView('articles')" class="switch__item"
:class="{'switch__item--active': isCurrentView('articles')}">Vláda</a>
</div>
</div>
</div>
<template v-if="isCurrentView('timeline')">
{{> organisms-main-articles-timeline }}
</template>
<template v-if="isCurrentView('articles')">
{{> organisms-main-articles-article-list }}
</template>
</ui-view-provider>
</div>
</main>
{{> organisms-newsletter-section }}
......
......@@ -85,19 +85,19 @@
</h2>
<div class="__js-root twitter-carousel-root">
<ui-twitter-carousel>
<div class="md:w-1/3 lg:w-1/4 pr-2">
<div class="w-full flex max-w-xs">
{{> molecules-twitter-box }}
</div>
<div class="md:w-1/3 lg:w-1/4 pr-2">
<div class="w-full flex max-w-xs">
{{> molecules-twitter-box }}
</div>
<div class="md:w-1/3 lg:w-1/4 pr-2">
<div class="w-full flex max-w-xs">
{{> molecules-twitter-box }}
</div>
<div class="md:w-1/3 lg:w-1/4">
<div class="w-full flex max-w-xs">
{{> molecules-twitter-box }}
</div>
<div class="md:w-1/3 lg:w-1/4">
<div class="w-full flex max-w-xs">
{{> molecules-twitter-box }}
</div>
</ui-twitter-carousel>
......
......@@ -186,12 +186,12 @@
top: -2.6rem;
}
&:before {
background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(255,255,255,1) 100%);
content: '';
height: 100%;
position: absolute;
right: 0;
position: absolute;
width: 20%;
z-index: 100;
background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(255,255,255,1) 100%);
}
}
.map-polygon {
z-index: 1;
transition: all 300ms ease-out;
transition-delay: 100ms;
&:hover {
fill: #25A5B9;
transform: scale(1,1.05);
z-index: 10;
}
}
......@@ -27,6 +27,7 @@
@import "./molecules/carousels.pcss";
@import "./molecules/contact_box.pcss";
@import "./molecules/map.pcss";
@import "./molecules/sliding_button.pcss";
@import "./molecules/switch.pcss";
......
......@@ -11,6 +11,7 @@
<g>
<a xlink:href="#" v-for="region in regions" :key="region.id" @mouseover="current = region" @mouseout="current = null" @click="selectRegion(region)">
<path
class="map-polygon"
:class="{'region-map__region': true, 'region-map__region--current': current === region}"
:d="region.polygon"
></path>
......@@ -58,16 +59,6 @@ export default {
return {
current: null,
regions: [
{
id: "praha",
name: "Hlavní město Praha",
polygon: "M256.167,247.61L263.167,244.11L265.83399999999995,245.61C265.83399999999995,245.61,270.00299999999993,246.41500000000002,270.5009999999999,245.943S269.33399999999995,241.61,269.33399999999995,241.61L272.33399999999995,239.77700000000002L276.5009999999999,240.61L281.1679999999999,238.11L283.6679999999999,234.77700000000002L289.1679999999999,234.94400000000002L290.5009999999999,237.27700000000002L293.6679999999999,238.27700000000002L294.6679999999999,239.77700000000002L298.33499999999987,238.94400000000002L297.33499999999987,242.61100000000002L302.1679999999999,243.77800000000002L304.33499999999987,247.27800000000002H307.50199999999984L310.50199999999984,251.11100000000002L310.00199999999984,254.11100000000002L305.1689999999998,254.61100000000002L301.8359999999998,256.944L304.1689999999998,258.944L304.6689999999998,264.111L301.1689999999998,267.27799999999996L297.1689999999998,264.611L292,263.944L289.5,266.444L284.833,267.611L282.16600000000005,271.444L278.4990000000001,271.611L274.9990000000001,273.27799999999996L273.9990000000001,275.94499999999994L269.4990000000001,276.94499999999994L266.16600000000005,273.27799999999996L267.833,267.94499999999994L263.16600000000005,265.6119999999999L264.4990000000001,262.6119999999999L260.66600000000005,260.1119999999999L257.66600000000005,255.7789999999999L259.9990000000001,252.2789999999999L256.167,247.61Z",
},
{
id: "stredocesky",
name: "Středočeský kraj",
polygon: "M404.167,273.11L397.33399999999995,269.777L397.167,265.11L391.667,263.277L386,259.944L386.833,255.27700000000002L390.24800000000005,250.347L392.32000000000005,243.566L384.22100000000006,239.234L388.1770000000001,232.26500000000001L386.1050000000001,227.74400000000003L387.23500000000007,222.09400000000002L385.9170000000001,216.06600000000003L382.9030000000001,213.05200000000002L377.4410000000001,216.63100000000003L368.5880000000001,215.50100000000003V210.22700000000003L363.7850000000001,205.42400000000004L357.4750000000001,204.20000000000005L356.1570000000001,199.49100000000004L360.9600000000001,194.68800000000005L358.0410000000001,186.68300000000005L359.7360000000001,181.97400000000005L356.9110000000001,177.45300000000006L359.35700000000014,173.68500000000006L354.27200000000016,171.42500000000007V167.65800000000007L347.1610000000002,164.03200000000007L343.91200000000015,160.78300000000007H338.35500000000013L334.11700000000013,156.54500000000007L329.9730000000001,163.70200000000008L323.3800000000001,171.0480000000001L321.1200000000001,168.7880000000001L315.47000000000014,169.7290000000001V174.4380000000001L307.55900000000014,180.8420000000001L298.14100000000013,183.1020000000001L295.88100000000014,176.32100000000008L284.95300000000015,176.88600000000008L282.69300000000015,179.90100000000007L283.63500000000016,187.05900000000005H278.92600000000016L277.41900000000015,191.58000000000004H272.52200000000016L274.21700000000016,200.05600000000004L270.63800000000015,203.63500000000005L262.53900000000016,202.88200000000006L258.20600000000013,207.21500000000006H241.81900000000013L233.90800000000013,203.63600000000005L227.50400000000013,207.02600000000004V211.54700000000003L222.32400000000013,216.72700000000003H216.39100000000013L214.36600000000013,218.75100000000003L214.50800000000012,222.66000000000003L208.8570000000001,219.26900000000003L202.6420000000001,225.48400000000004L193.97700000000012,225.29600000000005L185.6890000000001,230.38200000000006L178.3430000000001,230.75800000000007L172.6920000000001,236.03200000000007L171.5620000000001,242.62400000000008L165.3460000000001,245.26100000000008L161.9560000000001,250.72300000000007L164.2510000000001,253.60700000000006L161.5010000000001,257.1070000000001L165.0010000000001,260.3570000000001L169.0010000000001,257.8570000000001L175.7510000000001,258.3570000000001L176.5010000000001,262.6070000000001L180.5010000000001,264.8570000000001L185.0010000000001,267.1070000000001L189.5010000000001,265.3570000000001L194.7510000000001,272.1070000000001L199.7510000000001,271.1070000000001L200.0010000000001,275.1070000000001L205.0010000000001,276.1070000000001L209.2510000000001,278.8570000000001L208.7510000000001,285.3570000000001L210.0010000000001,289.1070000000001L205.2510000000001,293.8570000000001L207.5010000000001,299.8570000000001L205.0010000000001,304.1070000000001L207.2510000000001,308.6070000000001L202.5010000000001,314.3570000000001H197L191.75,318.1070000000001L195.75,322.3570000000001L194,327.3570000000001L197.5,331.8570000000001L200.75,334.3570000000001L199.5,338.8570000000001L199.25,344.8570000000001L202.5,350.3570000000001L216.25,350.8570000000001L220.75,353.1070000000001L227.75,349.6070000000001L230.5,344.8570000000001H235.25L239,348.8570000000001L252.5,347.3570000000001L255.5,343.6070000000001H261.5L265.5,348.6070000000001L269.75,348.8570000000001L276,345.1070000000001L282.5,348.1070000000001L287,347.3570000000001L295,349.3570000000001L302.25,352.3570000000001L305.75,348.3570000000001L312.25,344.8570000000001L310.75,337.1070000000001L316,333.3570000000001L323.75,339.8570000000001L328,339.3570000000001L330.25,344.8570000000001L333.5,349.6070000000001L336.25,346.8570000000001L336.5,341.6070000000001L342,336.1070000000001L350.25,337.3570000000001L356.75,337.1070000000001L361.25,337.8570000000001L363.5,333.8570000000001L367.25,335.6070000000001L372,332.3570000000001L371.75,327.1070000000001L364,323.3570000000001L364.25,317.6070000000001L368,314.1070000000001L368.75,310.1070000000001L371.75,308.3570000000001L375.75,309.3570000000001L379,306.3570000000001H384.75L386.75,302.1070000000001L392.5,302.3570000000001L392,296.3570000000001L396,293.1070000000001L402,292.6070000000001L400,284.4410000000001L403.667,280.7740000000001L404.167,273.11ZM310,254.11L305.167,254.61L301.83399999999995,256.94300000000004L304.167,258.94300000000004L304.667,264.11L301.167,267.277L297.167,264.61L292,263.944L289.5,266.444L284.833,267.611L282.16600000000005,271.444L278.4990000000001,271.611L274.9990000000001,273.27799999999996L273.9990000000001,275.94499999999994L269.4990000000001,276.94499999999994L266.16600000000005,273.27799999999996L267.833,267.94499999999994L263.16600000000005,265.6119999999999L264.4990000000001,262.6119999999999L260.66600000000005,260.1119999999999L257.66600000000005,255.7789999999999L259.9990000000001,252.2789999999999L256.16600000000005,247.6119999999999L263.16600000000005,244.1119999999999L265.833,245.6119999999999L270.5,245.9449999999999L269.333,241.6119999999999L272.333,239.7789999999999L276.5,240.6119999999999L281.167,238.1119999999999L283.667,234.7789999999999L289.167,234.9459999999999L290.5,237.2789999999999L293.667,238.2789999999999L294.667,239.7789999999999L298.33399999999995,238.9459999999999L297.33399999999995,242.61299999999991L302.167,243.77999999999992L304.33399999999995,247.27999999999992H307.5009999999999L310.5009999999999,251.11299999999991L310,254.11Z",
},
{
id: "jihocesky",
name: "Jihočeský kraj",
......@@ -128,6 +119,16 @@ export default {
name: "Zlínský kraj",
polygon: "M737.5,365.046L731.75,362.36L730.5,356.61L723.5,352.11L723,347.61L717.5,349.86H712.25L706.25,345.61L698.25,343.86L690.25,347.11L685.25,342.86H679.5L675.375,346.985L671.25,345.61L664.5,350.11V357.11C664.5,357.11,660.164,361.736,659.125,362.485S653.25,355.86,653.25,355.86L645.5,358.61L647.75,365.36L641,367.36L636,365.86L631.875,369.985L629,375.11L625.125,371.235L618.5,371.61L616.5,366.86L612.5,370.36L614.75,378.11L611,381.86L608.75,385.36L599.25,386.86L593.375,392.735L589.75,397.61L592.75,402.86L591.25,408.11L598,408.86L597.25,413.86L592.75,416.86L587.75,422.11L591.5,426.86L599.75,423.61L602.75,426.86L602,432.61L608.25,436.11L616.5,437.11L616.25,442.86L621.5,442.61L627,447.61L633.5,445.11L639.25,448.61L639.5,452.61L645.75,454.11L649.5,459.61L651.646,462.31H656.5369999999999L663.6009999999999,457.963L668.4909999999999,449.54L678.5439999999999,448.997L680.3099999999998,435.548L684.2489999999998,431.609L697.2899999999998,430.522L704.0829999999999,420.742V409.06L707.6139999999998,399.007V391.944L713.0479999999998,383.522L720.3839999999998,381.62L727.1759999999998,378.088L733.1539999999998,375.915L737.5,365.046Z",
},
{
id: "stredocesky",
name: "Středočeský kraj",
polygon: "M404.167,273.11L397.33399999999995,269.777L397.167,265.11L391.667,263.277L386,259.944L386.833,255.27700000000002L390.24800000000005,250.347L392.32000000000005,243.566L384.22100000000006,239.234L388.1770000000001,232.26500000000001L386.1050000000001,227.74400000000003L387.23500000000007,222.09400000000002L385.9170000000001,216.06600000000003L382.9030000000001,213.05200000000002L377.4410000000001,216.63100000000003L368.5880000000001,215.50100000000003V210.22700000000003L363.7850000000001,205.42400000000004L357.4750000000001,204.20000000000005L356.1570000000001,199.49100000000004L360.9600000000001,194.68800000000005L358.0410000000001,186.68300000000005L359.7360000000001,181.97400000000005L356.9110000000001,177.45300000000006L359.35700000000014,173.68500000000006L354.27200000000016,171.42500000000007V167.65800000000007L347.1610000000002,164.03200000000007L343.91200000000015,160.78300000000007H338.35500000000013L334.11700000000013,156.54500000000007L329.9730000000001,163.70200000000008L323.3800000000001,171.0480000000001L321.1200000000001,168.7880000000001L315.47000000000014,169.7290000000001V174.4380000000001L307.55900000000014,180.8420000000001L298.14100000000013,183.1020000000001L295.88100000000014,176.32100000000008L284.95300000000015,176.88600000000008L282.69300000000015,179.90100000000007L283.63500000000016,187.05900000000005H278.92600000000016L277.41900000000015,191.58000000000004H272.52200000000016L274.21700000000016,200.05600000000004L270.63800000000015,203.63500000000005L262.53900000000016,202.88200000000006L258.20600000000013,207.21500000000006H241.81900000000013L233.90800000000013,203.63600000000005L227.50400000000013,207.02600000000004V211.54700000000003L222.32400000000013,216.72700000000003H216.39100000000013L214.36600000000013,218.75100000000003L214.50800000000012,222.66000000000003L208.8570000000001,219.26900000000003L202.6420000000001,225.48400000000004L193.97700000000012,225.29600000000005L185.6890000000001,230.38200000000006L178.3430000000001,230.75800000000007L172.6920000000001,236.03200000000007L171.5620000000001,242.62400000000008L165.3460000000001,245.26100000000008L161.9560000000001,250.72300000000007L164.2510000000001,253.60700000000006L161.5010000000001,257.1070000000001L165.0010000000001,260.3570000000001L169.0010000000001,257.8570000000001L175.7510000000001,258.3570000000001L176.5010000000001,262.6070000000001L180.5010000000001,264.8570000000001L185.0010000000001,267.1070000000001L189.5010000000001,265.3570000000001L194.7510000000001,272.1070000000001L199.7510000000001,271.1070000000001L200.0010000000001,275.1070000000001L205.0010000000001,276.1070000000001L209.2510000000001,278.8570000000001L208.7510000000001,285.3570000000001L210.0010000000001,289.1070000000001L205.2510000000001,293.8570000000001L207.5010000000001,299.8570000000001L205.0010000000001,304.1070000000001L207.2510000000001,308.6070000000001L202.5010000000001,314.3570000000001H197L191.75,318.1070000000001L195.75,322.3570000000001L194,327.3570000000001L197.5,331.8570000000001L200.75,334.3570000000001L199.5,338.8570000000001L199.25,344.8570000000001L202.5,350.3570000000001L216.25,350.8570000000001L220.75,353.1070000000001L227.75,349.6070000000001L230.5,344.8570000000001H235.25L239,348.8570000000001L252.5,347.3570000000001L255.5,343.6070000000001H261.5L265.5,348.6070000000001L269.75,348.8570000000001L276,345.1070000000001L282.5,348.1070000000001L287,347.3570000000001L295,349.3570000000001L302.25,352.3570000000001L305.75,348.3570000000001L312.25,344.8570000000001L310.75,337.1070000000001L316,333.3570000000001L323.75,339.8570000000001L328,339.3570000000001L330.25,344.8570000000001L333.5,349.6070000000001L336.25,346.8570000000001L336.5,341.6070000000001L342,336.1070000000001L350.25,337.3570000000001L356.75,337.1070000000001L361.25,337.8570000000001L363.5,333.8570000000001L367.25,335.6070000000001L372,332.3570000000001L371.75,327.1070000000001L364,323.3570000000001L364.25,317.6070000000001L368,314.1070000000001L368.75,310.1070000000001L371.75,308.3570000000001L375.75,309.3570000000001L379,306.3570000000001H384.75L386.75,302.1070000000001L392.5,302.3570000000001L392,296.3570000000001L396,293.1070000000001L402,292.6070000000001L400,284.4410000000001L403.667,280.7740000000001L404.167,273.11ZM310,254.11L305.167,254.61L301.83399999999995,256.94300000000004L304.167,258.94300000000004L304.667,264.11L301.167,267.277L297.167,264.61L292,263.944L289.5,266.444L284.833,267.611L282.16600000000005,271.444L278.4990000000001,271.611L274.9990000000001,273.27799999999996L273.9990000000001,275.94499999999994L269.4990000000001,276.94499999999994L266.16600000000005,273.27799999999996L267.833,267.94499999999994L263.16600000000005,265.6119999999999L264.4990000000001,262.6119999999999L260.66600000000005,260.1119999999999L257.66600000000005,255.7789999999999L259.9990000000001,252.2789999999999L256.16600000000005,247.6119999999999L263.16600000000005,244.1119999999999L265.833,245.6119999999999L270.5,245.9449999999999L269.333,241.6119999999999L272.333,239.7789999999999L276.5,240.6119999999999L281.167,238.1119999999999L283.667,234.7789999999999L289.167,234.9459999999999L290.5,237.2789999999999L293.667,238.2789999999999L294.667,239.7789999999999L298.33399999999995,238.9459999999999L297.33399999999995,242.61299999999991L302.167,243.77999999999992L304.33399999999995,247.27999999999992H307.5009999999999L310.5009999999999,251.11299999999991L310,254.11Z",
},
{
id: "praha",
name: "Hlavní město Praha",
polygon: "M256.167,247.61L263.167,244.11L265.83399999999995,245.61C265.83399999999995,245.61,270.00299999999993,246.41500000000002,270.5009999999999,245.943S269.33399999999995,241.61,269.33399999999995,241.61L272.33399999999995,239.77700000000002L276.5009999999999,240.61L281.1679999999999,238.11L283.6679999999999,234.77700000000002L289.1679999999999,234.94400000000002L290.5009999999999,237.27700000000002L293.6679999999999,238.27700000000002L294.6679999999999,239.77700000000002L298.33499999999987,238.94400000000002L297.33499999999987,242.61100000000002L302.1679999999999,243.77800000000002L304.33499999999987,247.27800000000002H307.50199999999984L310.50199999999984,251.11100000000002L310.00199999999984,254.11100000000002L305.1689999999998,254.61100000000002L301.8359999999998,256.944L304.1689999999998,258.944L304.6689999999998,264.111L301.1689999999998,267.27799999999996L297.1689999999998,264.611L292,263.944L289.5,266.444L284.833,267.611L282.16600000000005,271.444L278.4990000000001,271.611L274.9990000000001,273.27799999999996L273.9990000000001,275.94499999999994L269.4990000000001,276.94499999999994L266.16600000000005,273.27799999999996L267.833,267.94499999999994L263.16600000000005,265.6119999999999L264.4990000000001,262.6119999999999L260.66600000000005,260.1119999999999L257.66600000000005,255.7789999999999L259.9990000000001,252.2789999999999L256.167,247.61Z",
},
]
};
},
......
......@@ -65,7 +65,7 @@ export default {
this.$data.views = Object.assign({}, this.data.views, updates);
},
toggleView(viewId) {
this.setView(viewId, !this.isCurrentView(viewId), true);
!this.isCurrentView(viewId) && this.setView(viewId, !this.isCurrentView(viewId), true);
},
showView(viewId) {
this.setView(viewId, true, true);
......
{% load wagtailcore_tags %}
<header
class="bg-black flex items-center header-clip photo-header py-32 mb-20 w-full bg-no-repeat bg-cover bg-center"
style="background-image: url('{{ image_url | default_if_none:"https://cc.cz/wp-content/uploads/2022/04/bartos-otv.jpg" }}')"
>
<div class="grid-container header-max-width pt-16">
<div class="pl-4 pr-2 col-start-1 col-end-3 sm:col-start-2 sm:col-end-13 sm:pr-0">
<h1 class="font-alt text-white">
<span class="text-2xl">{{ before_title | default_if_none:"" }}</span><br>
<span class="font-alt text-7xl">{{ page.title | default_if_none:"" }}</span><span class="text-2xl">{{ after_title | default_if_none:"" }}</span><br>
<span class="font-alt">{{ subtitle | default_if_none:"" }}</span>
</h1>
</div>
</div>
</header>
......@@ -2,14 +2,16 @@
{% load static wagtailcore_tags wagtailimages_tags wagtailroutablepage_tags %}
{% block content %}
{% include 'main/includes/layout/simple_page_header.html' %}
{% image page.image max-3840x2160 as main_img %}
{% with before_title=page.date after_title=page.after_name subtitle=page.position image_url=main_img.url %}
{% include 'main/includes/layout/photo_page_header.html' %}
{% endwith %}
{# {% routablepageurl page.root_page.articles_page "tags" as articles_tag_page_url %}#}
<main role="main" class="mb-10 xl:mb-32">
<div class="grid-container mb-2 lg:mb-12">
<div class="grid-left-side h-full bg-grey-150 left-tab">
<div class="p-6">
<span class="font-bold 3xl:text-xl">AUTOR ČLÁNKU: <br> {{ page.author }}</span><br>
<span class="font-bold 3xl:text-xl">AUTOR ČLÁNKU: <br> {{ page.author_page.title }}</span><br>
</div>
</div>
<div class="grid-content leading-6">
......@@ -33,6 +35,7 @@
{% endif %}
{% endfor %}
</main>
{% include 'main/includes/newsletter_section.html' %}
{# {% if related_articles|length %}#}
{# <section class="mt-16 md:mt-24">#}
......
......@@ -3,8 +3,151 @@
{% block content %}
<main role="main">
{% image page.main_image max-3840x2160 as main_img %}
{% with before_title=page.before_name after_title=page.after_name subtitle=page.position image_url=main_img.url %}
{% include 'main/includes/layout/photo_page_header.html' %}
{% endwith %}
<div class="">
<section class="grid-container person-grid-container">
<div class="grid-content leading-6">
<article class="mb-4 xl:mb-24 xl:mr-2">
<p class="font-alt mb-5">
{{ page.perex }}
</p>
<p class="font-alt mb-5">
{{ page.text|richtext }}
</p>
</article>
</div>
{% if page.email or page.phone %}
<div class="grid-right-side mb-8 xl:mb-0">
<div class="bg-grey-100 mb-1 px-7 py-9">
{% if page.email %}
<div class="flex mb-2">
<i class="ico--envelope mr-2"></i>
<a href="mailto:{{ page.email }}" class="text-turquoise-500 underline">
{{ page.email }}
</a>
</div>
{% endif %}
{% if page.phone %}
<div class="flex mb-2">
<i class="ico--phone mr-2"></i>
<a href="tel:+{{ page.phone }}">
{{ page.phone }}
</a>
</div>
{% endif %}
</div>
{% endif %}
{% if page.social_links %}
<div class="bg-grey-100 px-7 py-9">
{% for social_block in page.social_links %}
<div class="flex mb-2">
<i class="{{ social_block.value.icon }} mr-2"></i>
<a href="{{ social_block.value.link }}">
{{ social_block.value.text }}
</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</section>
</div>
{% if tweet_list %}
<section class="grid-container no-max">
<div class="grid-content-with-right-side">
<h2 class="head-4xl text-center xl:text-left">
Aktuálně na Twitteru
</h2>
<div class="mb-8 flex flex-wrap">
{% for tweet in page.tweet_list %}
<div class="md:w-1/3 lg:w-1/4">
<div class="p-4 flex flex-col items-center text-center border border-grey-100">
<img class="rounded-full shadow-sm w-12 mb-2" src="https://randomuser.me/api/portraits/women/56.jpg"
alt="user image"/>
<h5 class="font-alt mb-2">{{ tweet.author_name }}</h5>
<small class="mb-4 text-turquoise-400">@{{ tweet.author_username }}</small>
<p class="text-base leading-6 mb-2">{{ tweet.text }}</p>
<a href="" class="hover:no-underline">
<i class="ico--twitter text-turquoise-400 text-xl"></i>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if article_page_list %}
<section class="grid-container mb-4 justify-start xl:mb-14">
<div class="grid-content">
<div class="leading-6">
<h2 class="head-4xl">
Články
</h2>
{% for article_preview in article_page_list %}
<div class="flex flex-col justify-between items-start mb-9">
<div class="flex font-bold mb-4 text-xs text-white uppercase">
<span class="bg-green-400 mr-1 px-1">{{ article_preview.date }}</span>
{% for tag in article_preview.tags.all %}
<span class="bg-violet-400 mr-1 px-1">{{ tag }}</span>
{% endfor %}
</div>
<h4 class="head-3xl mb-4">
{{ article_preview.title }}
</h4>
<p class="mb-6">
{{ article_preview.perex }}
</p>
{% include 'main/includes/button_animated.html' with btn_link=article_preview.url btn_text="Číst dále" %}
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% for people_group in page.people %}
<section class="grid-container person-grid-container mb-4 justify-start xl:mb-14">
<div class="grid-content-with-right-side">
<h2 class="head-4xl text-left">
{{ people_group.value.title }}
</h2>
{% for person in people_group.value.person_list %}
<div class="flex flex-wrap">
<div class="flex mb-16 person-box-medium">
<div class="shrink-0 mr-4">
{% image person.profile_image fill-250x250 as profile_image %}
<img
class="rounded-full shadow-sm w-20 mb-2 xl:w-44"
src="{{ profile_image.url }}"
alt=" {{ person.title }}"
>
</div>
<div class="flex flex-col justify-between py-4">
<div class="flex flex-col">
<h4 class="head-3xl">
{{ person.title }}
</h4>
<span
class="text-sm xl:text-base leading-6 mb-6">{{ person.position|default_if_none:"" }}</span>
<div>
{% include 'main/includes/button_animated.html' with btn_link=person.url btn_text="Detail" %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endfor %}
</div>
{% include 'main/includes/newsletter_section.html' %}
</main>
{% endblock content %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment