From 064cbf38f645849cdda3c09f45962cae81200628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jitka=20Novotn=C3=A1?= Date: Sun, 25 Nov 2018 14:28:15 +0100 Subject: [PATCH] [feature] regions crossroad --- _includes/regions/crossroad.html | 40 +++++++++++++++ _layouts/regions.html | 16 ++++++ _sass/components/region.scss | 83 ++++++++++++++++++++++++++++++++ _sass/pirati.scss | 1 + regiony/index.html | 28 +++++++++++ 5 files changed, 168 insertions(+) create mode 100644 _includes/regions/crossroad.html create mode 100644 _layouts/regions.html create mode 100644 _sass/components/region.scss create mode 100644 regiony/index.html diff --git a/_includes/regions/crossroad.html b/_includes/regions/crossroad.html new file mode 100644 index 0000000..2167f28 --- /dev/null +++ b/_includes/regions/crossroad.html @@ -0,0 +1,40 @@ + +
+ {% for place in include.places %} +
+
+
+
{{ place.locality }}
+
+

{{ place.locality }}

+ + {% if place.note %} +

{{ place.note }}

+ {% endif %} + + {% if place.link %} + + {% endif %} + {% if place.programLink %} + + {% endif %} + {% if place.candidateListLink %} + + {% endif %} + {% if place.candidateListWithProgramLink %} + + {% endif %} +
+
+
+
+ {% endfor %} +
diff --git a/_layouts/regions.html b/_layouts/regions.html new file mode 100644 index 0000000..0766f40 --- /dev/null +++ b/_layouts/regions.html @@ -0,0 +1,16 @@ +--- +layout: page +--- + +
+
{{ content }}
+
+ + +{% if page.regions %} +{% include regions/crossroad.html places=page.regions %} +{% endif %} +{% if site.data.regions %} +{% include regions/crossroad.html places=site.data.regions %} +{% endif %} + diff --git a/_sass/components/region.scss b/_sass/components/region.scss new file mode 100644 index 0000000..4d0b4fb --- /dev/null +++ b/_sass/components/region.scss @@ -0,0 +1,83 @@ +.pk-election-crossroad .pk-election-crossroad__place { + display: flex; + height: 100%; + padding-bottom: 2.5rem; +} + +.pk-election-crossroad .pk-election-crossroad__place-body { + display: flex; + height: 100%; + width: 100%; +} + +.pk-election-crossroad__coa { + display: flex; + align-items: center; + max-width: 6rem; + min-width: 6rem; + background: #fff; + padding: 1rem; + border: 2px $light-gray solid; +} + +.pk-election-crossroad__link { + display: inline-block; + + .fa { + color: $dark-gray; + } + + @include breakpoint(small down) { + display: block; + } +} + +.pk-election-crossroad__link + .pk-election-crossroad__link { + margin-left: 1rem; + + @include breakpoint(small down) { + margin-left: 0; + } +} + +.pce-hero { + padding: 4rem 1rem; + text-align: center; + + &--entry { + padding: 6rem 2rem 3rem; + } + + @include breakpoint(medium up) { + padding: 6rem 2rem; + + &--entry { + padding: 10rem 2rem 6rem; + } + } +} + +.pce-hero__content { + margin: auto; + max-width: 60em; +} + +.pce-hero__cta { + margin-top: 2rem; + display: flex; + flex-direction: column; + + @include breakpoint(medium up) { + margin-top: 4rem; + flex-direction: row; + justify-content: center; + } +} + +.pce-hero__cta-item { + margin: .5rem 0; + + @include breakpoint(medium up) { + margin: 0 1rem; + } +} diff --git a/_sass/pirati.scss b/_sass/pirati.scss index 70a481f..8e152f8 100644 --- a/_sass/pirati.scss +++ b/_sass/pirati.scss @@ -32,6 +32,7 @@ @import 'components/member-list'; @import 'components/metadata-block'; @import 'components/multicolumn'; +@import 'components/region'; @import 'components/pagination'; @import 'components/person'; @import 'components/profile-badge'; diff --git a/regiony/index.html b/regiony/index.html new file mode 100644 index 0000000..a6c448c --- /dev/null +++ b/regiony/index.html @@ -0,0 +1,28 @@ +--- +layout: regions +title: Místní sdružení +regions: +- locality: Pardubice + link: https://pardubice.pirati.cz + programLink: https://pardubice.pirati.cz/komunalni-volby-2018/ + candidateListLink: https://pardubice.pirati.cz/komunalni-volby-2018/ + coa: https://upload.wikimedia.org/wikipedia/commons/0/0e/Pardubice_CoA_CZ.svg +- locality: Svitavy + link: https://www.piratisvitavy.cz/ + programLink: https://www.piratisvitavy.cz/volebni-program/ + candidateListLink: https://www.piratisvitavy.cz/kandidati/ + coa: https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Svitavy_znak_2.jpeg/394px-Svitavy_znak_2.jpeg +- locality: Radhošť + uid: radhost + note: Kandidujeme na společné kandidátce Změna pro Radhošť. + coa: https://upload.wikimedia.org/wikipedia/commons/3/3c/Radho%C5%A1%C5%A5_UO_CoA.jpg + link: https://radhost.info/ + programLink: https://radhost.info/program/ + candidateListLink: https://radhost.info/team/ +- locality: Rudoltice + uid: rudoltice + candidateListWithProgramLink: komunalni-volby/praha2018.html + coa: https://upload.wikimedia.org/wikipedia/commons/7/76/Znak_obce_Rudoltice.gif +--- + +Tady můžu dát např klikací mapu