Make list of organisations expandable

lektura
max.mehl 2017-09-21 00:02:13 +02:00
parent d0029c8e32
commit dc1fc25c4b
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92
2 changed files with 43 additions and 4 deletions

View File

@ -6,6 +6,9 @@
<hr /> <hr />
<!-- replace the URL defined in config.toml because this snipped is used in sub-pages too --> <!-- replace the URL defined in config.toml because this snipped is used in sub-pages too -->
<p>{{ replace .Site.Params.organisations.text "openletter/" ("/openletter" | relLangURL) | markdownify }}</p> <p>{{ replace .Site.Params.organisations.text "openletter/" ("/openletter" | relLangURL) | markdownify }}</p>
<div class="expand" tabindex="0">
<i class="fa fa-share" aria-hidden="true"></i>
</div>
<div class="orgs"> <div class="orgs">
<ul> <ul>
{{ $orgs := getJSON "data/organisations/organisations.json" }} {{ $orgs := getJSON "data/organisations/organisations.json" }}
@ -15,7 +18,7 @@
{{ $.Scratch.Add "lower_names" (lower .name) }} {{ $.Scratch.Add "lower_names" (lower .name) }}
{{ end }} {{ end }}
{{ range sort ($.Scratch.Get "lower_names") }} {{ range shuffle ($.Scratch.Get "lower_names") }}
{{ $lower_int := . }} {{ $lower_int := . }}
{{ range $int := $orgs }} {{ range $int := $orgs }}
@ -24,7 +27,6 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -101,11 +101,10 @@ blockquote p {
#organisations ul li a { #organisations ul li a {
display: block; display: block;
position: relative; position: relative;
width: 12vw;
height: 8vw;
max-width: 120px; max-width: 120px;
max-height: 80px; max-height: 80px;
min-width: 120px; min-width: 120px;
min-height: 80px;
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
@ -118,6 +117,44 @@ blockquote p {
transform: scale(0.9); transform: scale(0.9);
z-index: 5; z-index: 5;
} }
/* expand organisation grid */
.orgs {
position: relative;
height: 350px;
overflow: hidden;
transition: height 0s 10000s;
-webkit-transition: height 0s 10000s;
background-color: white;
}
.expand {
position: relative;
top: 400px;
width: 94%;
padding: 15px 0;
margin: -80px 3% 0 3%;
font-size: 40px;
background-color: white;
box-shadow: 0px -20px 50px 30px rgba(255, 255, 255, 1);
z-index: 1;
transition: z-index 0s 10000s;
-webkit-transition: z-index 0s 10000s;
cursor: pointer;
}
.expand i {
transform: rotate(-35deg) scaleY(-1) ;
}
.expand:focus {
z-index: 0;
transition: z-index 0s;
-webkit-transition: z-index 0s;
}
.expand:focus + .orgs {
height: 100%;
overflow: unset;
transition: height 0s;
-webkit-transition: height 0s;
}
/* SIGN FORM */ /* SIGN FORM */
#actionintro strong { #actionintro strong {