Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Regulacekonopi.cz placeholder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Weby
Regulacekonopi.cz placeholder
Commits
3dc83ae2
Commit
3dc83ae2
authored
2 years ago
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
date update
parent
3db2c8f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#9713
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
content/assets/js/timer.js
+10
-10
10 additions, 10 deletions
content/assets/js/timer.js
content/index.html
+8
-8
8 additions, 8 deletions
content/index.html
with
18 additions
and
18 deletions
content/assets/js/timer.js
+
10
−
10
View file @
3dc83ae2
...
@@ -5,41 +5,41 @@ document.addEventListener(
...
@@ -5,41 +5,41 @@ document.addEventListener(
"
DOMContentLoaded
"
,
"
DOMContentLoaded
"
,
function
()
{
function
()
{
// Set the date we're counting down to
// Set the date we're counting down to
var
countDownDate
=
new
Date
(
"
Sep
9
, 2022 12:00:00
"
).
getTime
();
var
countDownDate
=
new
Date
(
"
Sep
16
, 2022 12:00:00
"
).
getTime
();
function
timer
()
{
function
timer
()
{
// Get today's date and time
// Get today's date and time
var
now
=
new
Date
().
getTime
();
var
now
=
new
Date
().
getTime
();
// Find the distance between now and the count down date
// Find the distance between now and the count down date
var
distance
=
countDownDate
-
now
;
var
distance
=
countDownDate
-
now
;
// Time calculations for days, hours, minutes and seconds
// Time calculations for days, hours, minutes and seconds
var
days
=
Math
.
floor
(
distance
/
(
1000
*
60
*
60
*
24
));
var
days
=
Math
.
floor
(
distance
/
(
1000
*
60
*
60
*
24
));
var
hours
=
Math
.
floor
((
distance
%
(
1000
*
60
*
60
*
24
))
/
(
1000
*
60
*
60
));
var
hours
=
Math
.
floor
((
distance
%
(
1000
*
60
*
60
*
24
))
/
(
1000
*
60
*
60
));
var
minutes
=
Math
.
floor
((
distance
%
(
1000
*
60
*
60
))
/
(
1000
*
60
));
var
minutes
=
Math
.
floor
((
distance
%
(
1000
*
60
*
60
))
/
(
1000
*
60
));
var
seconds
=
Math
.
floor
((
distance
%
(
1000
*
60
))
/
1000
);
var
seconds
=
Math
.
floor
((
distance
%
(
1000
*
60
))
/
1000
);
// Display the result in the element with id="timer"
// Display the result in the element with id="timer"
const
element
=
document
.
getElementById
(
"
timer
"
);
const
element
=
document
.
getElementById
(
"
timer
"
);
element
.
innerHTML
=
(
element
.
innerHTML
=
(
days
+
"
dní,
"
days
+
"
dní,
"
+
hours
+
"
hodin,
"
+
hours
+
"
hodin,
"
+
minutes
+
"
minut a
"
+
minutes
+
"
minut a
"
+
seconds
+
"
sekund
"
+
seconds
+
"
sekund
"
);
);
// If the count down is finished, write some text
// If the count down is finished, write some text
if
(
distance
<
0
)
{
if
(
distance
<
0
)
{
clearInterval
(
timer
);
clearInterval
(
timer
);
element
.
innerHTML
=
"
Dnes to bude!
"
;
element
.
innerHTML
=
"
Dnes to bude!
"
;
}
}
}
}
timer
();
timer
();
// Update the count down every 1 second
// Update the count down every 1 second
const
timerInterval
=
setInterval
(
timer
,
1000
);
const
timerInterval
=
setInterval
(
timer
,
1000
);
}
}
...
...
This diff is collapsed.
Click to expand it.
content/index.html
+
8
−
8
View file @
3dc83ae2
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
<link
rel=
"icon"
rel=
"icon"
href=
"assets/images/logo.png"
href=
"assets/images/logo.png"
>
>
<link
<link
rel=
"stylesheet"
rel=
"stylesheet"
href=
"assets/css/base.css"
href=
"assets/css/base.css"
...
@@ -24,28 +24,28 @@
...
@@ -24,28 +24,28 @@
rel=
"stylesheet"
rel=
"stylesheet"
href=
"assets/fonts/roboto-condensed/style.css"
href=
"assets/fonts/roboto-condensed/style.css"
>
>
<script
<script
src=
"assets/js/timer.js"
src=
"assets/js/timer.js"
type=
"text/javascript"
type=
"text/javascript"
></script>
></script>
<title>
Chystáme to!
</title>
<title>
Chystáme to!
</title>
</head>
</head>
<body>
<body>
<main>
<main>
<div
id=
"content"
>
<div
id=
"content"
>
<h1
id=
"heading"
>
Chystáme to!
</h1>
<h1
id=
"heading"
>
Chystáme to!
</h1>
<p
id=
"description"
>
<p
id=
"description"
>
9
.9.2022 představíme dopadovou studii o regulaci konopí.
16
.9.2022 představíme dopadovou studii o regulaci konopí.
</p>
</p>
<p
id=
"timer-wrapper"
>
<p
id=
"timer-wrapper"
>
Zbývá
<span
id=
"timer"
></span>
.
Zbývá
<span
id=
"timer"
></span>
.
</p>
</p>
</div>
</div>
<div
id=
"copyleft"
>
<div
id=
"copyleft"
>
<span
style=
"transform:scale(-1,1);display:inline-block"
>
©
</span>
<span
style=
"transform:scale(-1,1);display:inline-block"
>
©
</span>
<span>
Piráti, 2022. Všechna práva vyhlazena.
</span>
<span>
Piráti, 2022. Všechna práva vyhlazena.
</span>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment