Skip to content

Commit

Permalink
[feature] regions crossroad
Browse files Browse the repository at this point in the history
  • Loading branch information
jitka committed Nov 25, 2018
1 parent 2a5d3f8 commit 064cbf3
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 0 deletions.
40 changes: 40 additions & 0 deletions _includes/regions/crossroad.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

<section class="pk-election-crossroad row u-uniform-size-row">
{% for place in include.places %}
<div class="columns medium-6">
<article class="pk-election-crossroad__place">
<div class="c-tile c-tile--fill pk-election-crossroad__place-body">
<div class="pk-election-crossroad__coa"><img src="{{ place.coa }}" alt="{{ place.locality }}"></div>
<div class="c-tile__body">
<h2 class="t-h4">{{ place.locality }}</h2>

{% if place.note %}
<p>{{ place.note }}</p>
{% endif %}

{% if place.link %}
<div class="pk-election-crossroad__link">
<span class="fa fa-globe"></span> <a href="{{ place.link }}" class="c-emphasized-anchor" target="_blank" rel="noopener">Web</a>
</div>
{% endif %}
{% if place.programLink %}
<div class="pk-election-crossroad__link">
<span class="fa fa-book"></span> <a href="{{ place.programLink }}" class="c-emphasized-anchor" target="_blank" rel="noopener">Program</a>
</div>
{% endif %}
{% if place.candidateListLink %}
<div class="pk-election-crossroad__link">
<span class="fa fa-users"></span> <a href="{{ place.candidateListLink }}" class="c-emphasized-anchor" target="_blank" rel="noopener">Kandidátka</a>
</div>
{% endif %}
{% if place.candidateListWithProgramLink %}
<div class="pk-election-crossroad__link">
<span class="fa fa-book"></span> <a href="{{ place.candidateListWithProgramLink | relative_url }}" class="c-emphasized-anchor">Program a kandidátka</a>
</div>
{% endif %}
</div>
</div>
</article>
</div>
{% endfor %}
</section>
16 changes: 16 additions & 0 deletions _layouts/regions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: page
---

<div class="o-section">
<div class="c-content-block c-emphasized-text">{{ content }}</div>
</div>


{% if page.regions %}
{% include regions/crossroad.html places=page.regions %}
{% endif %}
{% if site.data.regions %}
{% include regions/crossroad.html places=site.data.regions %}
{% endif %}

83 changes: 83 additions & 0 deletions _sass/components/region.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
1 change: 1 addition & 0 deletions _sass/pirati.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
28 changes: 28 additions & 0 deletions regiony/index.html
Original file line number Diff line number Diff line change
@@ -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 <b>Změna pro Radhošť</b>.
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

0 comments on commit 064cbf3

Please sign in to comment.