diff --git a/_assets/css/main.scss b/_assets/css/main.scss index bf6c7e5..167c4d2 100644 --- a/_assets/css/main.scss +++ b/_assets/css/main.scss @@ -1,3 +1,40 @@ @charset "UTF-8"; -// non-critical CSS \ No newline at end of file +// non-critical CSS + +// map of election district feature + +#election_map svg { + height: auto; + width: 100%; + margin: 0 auto; + display: block; +} + +#election_map g { + fill: #ccc; +} + +#election_map g:visited { + /*fill: #fc0 !important;*/ + fill: #fc0; +} +#election_map g:hover { + fill: #228B22; + cursor: pointer; +} + +#election_map g:active { + fill: #fc0; +} + +.info_panel { + background-color: rgba(255,255,255, .8); + /*background-color: rgba(255,204,0, .8);*/ + padding: 5px; + font-size: 10px; + position: absolute; + border: 1px solid #333; + color: #333; + white-space: nowrap; +} diff --git a/_assets/javascripts/main.js b/_assets/javascripts/main.js index c64203a..8ebecb8 100644 --- a/_assets/javascripts/main.js +++ b/_assets/javascripts/main.js @@ -1,6 +1,6 @@ "use strict"; -$(function() { +$(function () { let mainMenu = $("#mainmenuNavbar"); mainMenu.on("show.bs.collapse", function () { $("#submenuNavbar").addClass("invisible"); @@ -34,11 +34,13 @@ $(function() { }); let countdownSpan = $("#countdown"); - countdown.setFormat({singular: " Millisekunde| Sekunde| Minute| Stunde| Tag| Woche| Monat| Jahr| Jahrzehnt| Jahrhundert| Jahrtausend", - plural: " Millisekunden| Sekunden| Minuten| Stunden| Tage| Wochen| Monate| Jahre| Jahrzehnte| Jahrhunderte| Jahrtausende", - last: " und ", - delim: ", "}); - let counterID = countdown(function(timestamp) { + countdown.setFormat({ + singular: " Millisekunde| Sekunde| Minute| Stunde| Tag| Woche| Monat| Jahr| Jahrzehnt| Jahrhundert| Jahrtausend", + plural: " Millisekunden| Sekunden| Minuten| Stunden| Tage| Wochen| Monate| Jahre| Jahrzehnte| Jahrhunderte| Jahrtausende", + last: " und ", + delim: ", " + }); + let counterID = countdown(function (timestamp) { countdownSpan.html(timestamp.toString()); }, new Date(2019, 4, 26, 18, 0), countdown.DAYS | @@ -47,4 +49,46 @@ $(function() { countdown.SECONDS ); + // election map feature + // v0.1 + + let stadtteil_svg = $("#election_map g.stadtteil"); + + stadtteil_svg.mouseenter(function (e) { + const region_data = $(this).data(); + let tooltip = $("
Am 26. Mai 2019 findet die kombinierte Wahl des EU-Parlaments und der Bezirksversammlungen in Hamburg statt. Dabei trete ich im Bezirk Eimsbüttel für die GRÜNEN an. Die listenaufstellende Mitgliederversammlung