Skip to content

Commit

Permalink
navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
nils committed Dec 27, 2023
1 parent 4a04354 commit b2dc4b3
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 20 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[tkmoties.github.io](https://tkmoties.github.io)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Id":"f8fb2213-8ff3-413b-984e-dcde542db7ff","Nummer":"2022Z20766","Titel":"Spoor: vervoer- en beheerplan","Onderwerp":"Motie van het lid Madlener over de streefwaarde voor reizigerspunctualiteit wijzigen naar 96% op basis van drie minuten ","GewijzigdOp":"2023-02-07T11:47:07.79+01:00","Kabinetsappreciatie":"Verzocht motie aan te houden","Indieners":[["B. Madlener","PVV"]],"Stemmingen":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Id":"21bcad63-036e-400d-a294-0a06f60d954c","Nummer":"2023Z06900","Titel":"Initiatiefnota van het lid Hagen over een nieuw ontwerp voor de kledingindustrie: van wegwerpmaatschappij naar circulaire economie","Onderwerp":"Motie van de leden Hammelburg en Hagen over na de zomer een UPV schoenen instellen zodra is gebleken dat dit een positieve impact heeft ","GewijzigdOp":"2023-05-09T16:41:36.81+02:00","Kabinetsappreciatie":"Oordeel Kamer","Indieners":[["K.B. Hagen","D66"],["A.R. Hammelburg","D66"]],"Stemmingen":[{"Resultaat":"Aangenomen.","Fracties":{"SGP":"Voor","SP":"Voor","PvdD":"Voor","BIJ1":"Voor","Groep Van Haga":"Tegen","GroenLinks":"Voor","BBB":"Voor","D66":"Voor","DENK":"Voor","CDA":"Voor","ChristenUnie":"Voor","PVV":"Tegen","Fractie Den Haan":"Voor","VVD":"Voor","Omtzigt":"Voor","Volt":"Voor","Gündogan":"Niet deelgenomen","PvdA":"Voor","FVD":"Tegen","JA21":"Tegen"},"Voor":120,"Tegen":28,"Anders":1,"PercentVoor":81,"PercentTegen":19}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Id":"bfcca8c1-e6b2-45b7-9a81-56f0319b6f81","Nummer":"2023Z14806","Titel":"Landbouw- en Visserijraad","Onderwerp":"Motie van de leden Vestering en Bromet over tegen de nieuwe Europese toelating van glyfosaat stemmen","GewijzigdOp":"2023-09-07T13:54:24.453+02:00","Kabinetsappreciatie":"Ontraden","Indieners":[["L. Bromet","GroenLinks"],["L. Vestering","PvdD"]],"Stemmingen":[{"Resultaat":"Aangenomen.","Fracties":{"Groep Van Haga":"Tegen","BIJ1":"Niet deelgenomen","BBB":"Tegen","JA21":"Niet deelgenomen","GroenLinks":"Voor","ChristenUnie":"Voor","Omtzigt":"Voor","VVD":"Tegen","Ephraim":"Niet deelgenomen","D66":"Voor","CDA":"Tegen","SP":"Voor","DENK":"Voor","PVV":"Voor","SGP":"Tegen","Volt":"Voor","FVD":"Tegen","Gündogan":"Niet deelgenomen","PvdA":"Voor","PvdD":"Voor","Fractie Den Haan":"Niet deelgenomen"},"Voor":83,"Tegen":61,"Anders":5,"PercentVoor":57,"PercentTegen":43}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Id":"c803a5b2-2e92-4136-9e05-67923e0dd1ff","Nummer":"2023Z15200","Titel":"Vaststelling van de begrotingsstaten van Koninkrijksrelaties (IV) en het BES-fonds (H) voor het jaar 2023","Onderwerp":"Motie van het lid Wuite over een haalbaarheidsstudie naar de mogelijkheid van een regionale ontwikkelingsmaatschappij in het Caribische deel van het Koninkrijk ","GewijzigdOp":"2023-10-24T10:06:22.78+02:00","Kabinetsappreciatie":"Ontraden","Indieners":[["J. Wuite","D66"]],"Stemmingen":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Id":"4e1b5121-65b0-4836-a42d-acf2559bc702","Nummer":"2023Z20857","Titel":"Terrorismebestrijding","Onderwerp":"Motie van het lid Michon-Derkzen c.s. over onderzoeken of de huidige wettelijke kaders voldoende mogelijkheden bieden om effectief te kunnen optreden bij (dreigende) verstoringen van de openbare orde en het verspreiden van terroristisch gedachtegoed ","GewijzigdOp":"2023-12-22T10:02:07.8+01:00","Kabinetsappreciatie":"Oordeel Kamer","Indieners":[["I.J.M. Michon-Derkzen","VVD"],["D.J.H. (Diederik) van Dijk","SGP"],["D.G. Boswijk","CDA"]],"Stemmingen":[{"Resultaat":"Aangenomen.","Fracties":{"NSC":"Voor","Volt":"Voor","BBB":"Voor","ChristenUnie":"Voor","JA21":"Niet deelgenomen","DENK":"Tegen","FVD":"Tegen","SP":"Tegen","D66":"Voor","PVV":"Voor","CDA":"Voor","VVD":"Voor","SGP":"Voor","GroenLinks-PvdA":"Voor","PvdD":"Tegen"},"Voor":135,"Tegen":14,"Anders":1,"PercentVoor":90,"PercentTegen":10}]}
24 changes: 8 additions & 16 deletions _includes/motie-card.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
<div
id="{{ motie['Id'] }}"
class="card my-1 motie-card
{% if motie['Stemmingen'][0]['Resultaat'] == 'Aangenomen.' %}
border-success
{% assign resultColor = "" %}
{% if motie['Stemmingen'][0]['Resultaat'] contains "Aangenomen" %}
{% assign resultColor = "success" %}
{% endif %}
{% if motie['Stemmingen'][0]['Resultaat'] == 'Verworpen.' %}
border-danger
{% if motie['Stemmingen'][0]['Resultaat'] contains "Verworpen" %}
{% assign resultColor = "danger" %}
{% endif %}
">
<div class="card-header motie-onderwerp
{% if motie['Stemmingen'][0]['Resultaat'] == 'Aangenomen.' %}
text-bg-success
{% endif %}
{% if motie['Stemmingen'][0]['Resultaat'] == 'Verworpen.' %}
text-bg-danger
{% endif %}
">

<div id="{{ motie['Id'] }}" class="card my-1 motie-card border-{{ resultColor }}">
<div class="card-header motie-onderwerp text-bg-{{ resultColor }}">
{{ motie['Onderwerp'] }}
</div>
<div class="card-body">
Expand Down
9 changes: 9 additions & 0 deletions _includes/symbol-down1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<span class="" style="display: inline-flex; flex: 0 0 auto; width: 1.1em; height: 1.1em; align-items: center; justify-content: center;">
<svg viewBox="0 0 42 27">
<path
transform="translate(-35,-90)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,94 56,114 76,94"
/>
</svg>
</span>
9 changes: 9 additions & 0 deletions _includes/symbol-up1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<span class="" style="display: inline-flex; flex: 0 0 auto; width: 1.1em; height: 1.1em; align-items: center; justify-content: center;">
<svg viewBox="0 0 42 27">
<path
transform="translate(-35,-90)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,114 56,94 76,114"
/>
</svg>
</span>
14 changes: 14 additions & 0 deletions _includes/symbol-up2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<span class="" style="display: inline-flex; flex: 0 0 auto; width: 1.1em; height: 1.1em; align-items: center; justify-content: center;">
<svg viewBox="0 0 42 37">
<path
transform="translate(-35,-90)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,114 56,94 76,114"
/>
<path
transform="translate(-35,-80)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,114 56,94 76,114"
/>
</svg>
</span>
19 changes: 19 additions & 0 deletions _includes/symbol-up3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<span class="" style="display: inline-flex; flex: 0 0 auto; width: 1.1em; height: 1.1em; align-items: center; justify-content: center;">
<svg viewBox="0 0 42 47">
<path
transform="translate(-35,-90)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,114 56,94 76,114"
/>
<path
transform="translate(-35,-80)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,114 56,94 76,114"
/>
<path
transform="translate(-35,-70)"
style="fill:none;stroke:rgba(222, 226, 230, 0.75);stroke-width:3;stroke-opacity:1"
d="M 36,114 56,94 76,114"
/>
</svg>
</span>
2 changes: 2 additions & 0 deletions _sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

.date-separator:not(:empty)::before {
margin-right: .25em;
margin-left: .25em;
}

.date-separator:not(:empty)::after {
margin-right: .25em;
margin-left: .25em;
}
30 changes: 26 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,49 @@
<link rel="stylesheet" href="/assets/css/styles.css">
</head>
<body>
<div id="moties" class="container">
<div id="moties" class="container" data-bs-spy="scroll">
<h1>Moties met stemmingen van de Tweede Kamer 2023</h1>
<p>
Een overzicht van alle moties waarover gestemd is in de Tweede Kamer in 2023.
Data verzameld via de <a href="https://opendata.tweedekamer.nl/documentatie/odata-api">OData API</a> van de Tweede Kamer.
</p>

{% assign lastDate = 0 %}
{% assign lastDate = "" %}
{% for motieTuple in site.data.moties.y2023 reversed %}
{% assign motie = motieTuple[1] %}
{% if motie.Stemmingen.size != 0 %}
{% assign currentDate = motie.GewijzigdOp | slice: 0, 10 %}
{% if lastDate != currentDate %}
{% assign previousDate = lastDate %}
{% assign lastDate = currentDate %}
<div class="date-separator text-body-secondary sticky-top bg-body">{{ lastDate }}</div>
<div id="{{ lastDate }}"></div>

<div class="d-flex flex-nowrap sticky-top bg-body">
<div class="mx-1">
<a href="#{{ previousDate }}">{% include symbol-up1.html %}</a>
</div>
<div class="flex-fill date-separator text-body-secondary">
<a class="link-underline link-underline-opacity-0 text-body-secondary" href="#{{ lastDate }}">
{{ lastDate }}
</a>
</div>
<div class="mx-1">
<a href="#">{% include symbol-down1.html %}</a>
</div>
</div>
{% endif %}
{% include motie-card.html %}
{% endif %}
{% endfor %}

</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"/></script>
<script>
// Add forward links
const dateSeparators = document.querySelectorAll('.date-separator');
for (var idx = 0; idx < dateSeparators.length - 1; idx += 1) {
dateSeparators[idx].parentNode.childNodes[5].childNodes[1].href = dateSeparators[idx+1].childNodes[1].href;
}
</script>
</html>

0 comments on commit b2dc4b3

Please sign in to comment.