Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • to/weby/voter-cards
  • vpfafrin/voter-cards
2 results
Select Git revision
Show changes
Commits on Source (9)
Showing
with 127 additions and 87 deletions
image: python:3-buster
variables:
SITE_NAME: prukazy.pirati.cz
ARTIFACTS_PATH: public
WEBHOOK_URL: https://ha-web.pirati.cz
build:
stage: build
script:
- mkdir public
- cp -r content/* public/
after_script:
- echo "{\"name\":\"$SITE_NAME\" }" > request.json
- "curl -H 'Content-Type: application/json' -X POST -d @request.json $WEBHOOK_URL"
artifacts:
expire_in: 30 min
paths:
- $ARTIFACTS_PATH
......@@ -27,13 +27,9 @@
>
<link
rel="stylesheet"
href="static/fonts/roboto-condensed/style.css"
>
<link
rel="stylesheet"
href="static/fonts/bebas-neue/style.css"
>
rel="stylesheet"
href="https://gfonts.pirati.cz/css2?family=Bebas+Neue&family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"
>
<link
rel="stylesheet"
......@@ -83,10 +79,39 @@
ho datovkou nebo dones osobně na úřad. Neboj se - vážíme si
tvého soukromí, nesbíráme žádná osobní data a vše
zpracovává výhradně tvůj prohlížeč.<br><br>
První kolo se bude konat 13. - 14. ledna 2023.<br>
Druhé kolo se bude konat 27. - 28. ledna 2023.
</p>
<h2 id="dates-header">Důležitá data</h2>
<ul id="dates">
<li>
<b>29. prosince 2022</b> - Domovské úřady začínají vydávat voličské průkazy.
</li>
<li>
<b>6. ledna 2023</b> - Poslední možnost doručit žádost o voličský průkaz na první kolo poštou.
</li>
<li>
<b>11. ledna 2023</b> - Poslední možnost podat žádost o voličský průkaz na první kolo osobně.
</li>
<li>
<b>13. ledna 2023 - 14. ledna 2023 - První kolo prezidentských voleb.</b>
</li>
<li>
<b>20. ledna 2023</b> - Poslední možnost doručit žádost o voličský průkaz na druhé kolo poštou.
</li>
<li>
<b>25. ledna 2023</b> - Poslední možnost podat žádost o voličský průkaz na druhé kolo osobně.
</li>
<li>
<b>27. ledna 2023 - 28. ledna 2023 - Případné druhé kolo prezidentských voleb.</b>
</li>
</ul>
</div>
</header>
......@@ -151,6 +176,13 @@
>
</div>
<input
type="text"
id="office-address"
placeholder="Adresa příslušného úřadu *"
required
>
<h2 class="info-type">Typ žádosti</h2>
<select
......@@ -250,5 +282,9 @@
<script
src="static/js/offices.js"
></script>
<!-- Matomo Image Tracker-->
<img referrerpolicy="no-referrer-when-downgrade" src="https://matomo.imaniti.org/matomo.php?idsite=16&amp;rec=1" style="border:0" alt="" />
<!-- End Matomo -->
</body>
</html>
......@@ -12,6 +12,14 @@
width:100%
}
#dates {
margin-bottom:15px
}
#dates-header {
margin-top:0
}
#finish,#download-paper-pdf,#download-electronic-pdf {
margin-top:20px
}
......@@ -34,8 +42,7 @@
#intro-text {
border-bottom:1px solid #000;
font-size:large;
margin-bottom:14px;
padding-bottom:14px
margin-bottom:0
}
#intro-wrapper {
......
/*
* Thanks to majodev for their Google webfont helper!
*/
/* bebas-neue-regular - latin-ext_latin */
@font-face {
font-family: 'Bebas Neue';
font-style: normal;
font-weight: 400;
src:
url('./bebas-neue-v9-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('./bebas-neue-v9-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/*
* Thanks to majodev for their Google webfont helper!
*/
/* roboto-condensed-regular - latin-ext_latin */
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: normal;
src: local(''),
url('roboto-condensed-v25-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('roboto-condensed-v25-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-condensed-700 - latin-ext_latin */
@font-face {
font-family: 'Roboto Condensed';
font-style: normal;
font-weight: bold;
src: local(''),
url('roboto-condensed-v25-latin-ext_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('roboto-condensed-v25-latin-ext_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
......@@ -84,7 +84,7 @@ const fillCanvas = async () => {
setHighestPossibleFontSize(
firstPageContext,
officeName,
"Open Sans",
"sans-serif",
firstPageCanvas.height * 0.015,
firstPageCanvas.width * 0.76
);
......@@ -135,6 +135,10 @@ const fillCanvas = async () => {
createCheckRound1();
createCheckRound2();
electionDate = (
"13. ledna 2023 - 14. ledna 2023 a 27. ledna 2023 - 28. ledna 2023"
);
break;
case "1. kolo":
createCheckRound1();
......@@ -153,7 +157,7 @@ const fillCanvas = async () => {
setHighestPossibleFontSize(
firstPageContext,
electionDate,
"Open Sans",
"sans-serif",
firstPageCanvas.height * 0.013,
firstPageCanvas.width * 0.51
);
......@@ -174,7 +178,7 @@ const fillCanvas = async () => {
setHighestPossibleFontSize(
firstPageContext,
fullName,
"Open Sans",
"sans-serif",
firstPageCanvas.height * 0.013,
firstPageCanvas.width * 0.51
);
......@@ -190,7 +194,7 @@ const fillCanvas = async () => {
const formattedBirthDate = (
birthDate.getDate()
+ ". "
+ birthDate.getMonth()
+ (birthDate.getMonth() + 1)
+ ". "
+ birthDate.getFullYear()
);
......@@ -198,7 +202,7 @@ const fillCanvas = async () => {
setHighestPossibleFontSize(
firstPageContext,
formattedBirthDate,
"Open Sans",
"sans-serif",
firstPageCanvas.height * 0.013,
firstPageCanvas.width * 0.51
);
......@@ -221,7 +225,7 @@ const fillCanvas = async () => {
setHighestPossibleFontSize(
firstPageContext,
address,
"Open Sans",
"sans-serif",
firstPageCanvas.height * 0.013,
firstPageCanvas.width * 0.51
);
......@@ -280,7 +284,7 @@ const fillCanvas = async () => {
setHighestPossibleFontSize(
secondPageContext,
deliveryAddress,
"Open Sans",
"sans-serif",
secondPageCanvas.height * 0.013,
secondPageCanvas.width * 0.51
);
......@@ -297,12 +301,13 @@ const fillCanvas = async () => {
$(window).ready(
() => {
const { jsPDF } = window.jspdf;
let foundOffice = false;
const currentDate = new Date();
$("#current-date").val(
currentDate.getDate()
+ ". "
+ currentDate.getMonth()
+ currentDate.getMonth() + 1
+ ". "
+ currentDate.getFullYear()
);
......@@ -333,7 +338,7 @@ $(window).ready(
properties.housenumber : ""
);
document.getElementById("street").value = (
$("#street").val(
street
+ (
(street !== "") ?
......@@ -342,8 +347,32 @@ $(window).ready(
+ houseNumber
);
if (properties.city !== undefined) document.getElementById("city").value = properties.city;
if (properties.postcode !== undefined) document.getElementById("zip").value = properties.postcode;
if (properties.city !== undefined) $("#city").val(properties.city);
if (properties.postcode !== undefined) $("#zip").val(properties.postcode);
const city = $("#city").val();
const zip = $("#zip").val().replace(" ", "");
for (const office of OFFICES) {
if (
office["address"]["city"] == city
&& office["address"]["zip"] == zip
) {
$("#office-address").val(
office["address"]["street"]
+ ", "
+ office["address"]["zip"]
+ " "
+ office["address"]["city"]
);
$("#office-ds-id-direction").html(office["ds_id"]);
foundOffice = true;
break;
}
}
}
);
......@@ -358,6 +387,14 @@ $(window).ready(
}
);
$("#office-address").on(
"input",
event => {
foundOffice = false;
$("#office-ds-id-direction").html("");
}
);
$("#finish").on(
"click",
async (event) => {
......@@ -376,34 +413,11 @@ $(window).ready(
// UI
const city = $("#city").val();
let foundOffice = false;
for (const office of OFFICES) {
if (
office["address"]["city"] == city
&& office["address"]["zip"] == $("#zip").val()
) {
$("#office-address-direction").html(
office["address"]["street"]
+ ", "
+ office["address"]["zip"]
+ " "
+ office["address"]["city"]
);
$("#office-ds-id-direction").html(office["ds_id"]);
$("#found-office").css("display", "block");
foundOffice = true;
break;
}
}
$("#office-address-direction").html($("#office-address").val());
if (!foundOffice) {
if (foundOffice) {
$("#found-office").css("display", "block");
} else {
$("#not-found-office").css("display", "block");
}
......
This diff is collapsed.