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

Target

Select target project
  • to/weby/regulacekonopi.cz-placeholder
  • marek.krejpsky/regulacekonopi.cz-placeholder
2 results
Show changes
Commits on Source (9)
image: python:3-buster
variables:
SITE_NAME: regulacekonopi.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
......@@ -49,3 +49,13 @@ main #timer-wrapper #timer {
margin-top: 15px;
font-family: "Roboto Condensed";
}
@media only screen and (max-width: 600px) {
main #heading {
font-size: 70px
}
main #description, main #timer-wrapper {
font-size: 40px;
}
}
content/assets/images/logo.png

3.11 KiB

......@@ -5,41 +5,41 @@ document.addEventListener(
"DOMContentLoaded",
function() {
// Set the date we're counting down to
var countDownDate = new Date("Sep 30, 2022 12:00:00").getTime();
var countDownDate = new Date("Sep 14, 2022 08:00:00").getTime();
function timer() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Display the result in the element with id="timer"
const element = document.getElementById("timer");
element.innerHTML = (
days + " dní, "
+ hours + " hodin, "
+ minutes + " minut a "
+ seconds + " sekund"
);
// If the count down is finished, write some text
if (distance < 0) {
clearInterval(timer);
element.innerHTML = "Dnes to bude!";
}
}
timer();
// Update the count down every 1 second
const timerInterval = setInterval(timer, 1000);
}
......
......@@ -2,7 +2,12 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link
rel="icon"
href="assets/images/logo.png"
>
<link
rel="stylesheet"
href="assets/css/base.css"
......@@ -19,28 +24,28 @@
rel="stylesheet"
href="assets/fonts/roboto-condensed/style.css"
>
<script
src="assets/js/timer.js"
type="text/javascript"
></script>
<title>Chystáme to!</title>
</head>
<body>
<main>
<div id="content">
<h1 id="heading">Chystáme to!</h1>
<p id="description">
30.9.2022 představíme dopadovou studii o legalizaci konopí.
14.9.2022 představíme dopadovou studii o regulaci konopí.
</p>
<p id="timer-wrapper">
Zbývá <span id="timer"></span>.
</p>
</div>
<div id="copyleft">
<span style="transform:scale(-1,1);display:inline-block">&copy;</span>
<span>Piráti, 2022. Všechna práva vyhlazena.</span>
......