Initial commit
This commit is contained in:
BIN
public/homescreen.png
Normal file
BIN
public/homescreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
15
public/manifest.json
Normal file
15
public/manifest.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "Wie lange noch?",
|
||||
"short_name": "Corona-Uhr",
|
||||
"lang": "de-DE",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"theme_color": "#FD1D1D",
|
||||
"icons": [
|
||||
{
|
||||
"src": "homescreen.png",
|
||||
"sizes": "172x172"
|
||||
}
|
||||
]
|
||||
}
|
||||
14
public/script.js
Normal file
14
public/script.js
Normal file
@@ -0,0 +1,14 @@
|
||||
function onloaded() {
|
||||
const elems = document.getElementsByClassName("big-number");
|
||||
for (let i = 0; i < elems.length; i++) {
|
||||
const elem = elems[i];
|
||||
elem.innerText = parseInt(elem.dataset.value).toLocaleString();
|
||||
}
|
||||
const megaElems = document.getElementsByClassName("mega-date");
|
||||
for (let i = 0; i < megaElems.length; i++) {
|
||||
const elem = megaElems[i];
|
||||
const date = new Date();
|
||||
date.setTime(elem.dataset.value);
|
||||
elem.innerText = date.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });
|
||||
}
|
||||
}
|
||||
78
public/style.css
Normal file
78
public/style.css
Normal file
@@ -0,0 +1,78 @@
|
||||
html {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: white;
|
||||
background: rgb(131,58,180);
|
||||
background: linear-gradient(11deg, rgba(131,58,180,1) 0%, rgba(253,29,29,1) 50%, rgb(255,171,13) 100%);
|
||||
margin: 4rem;
|
||||
}
|
||||
|
||||
.index {
|
||||
font-size: 30pt;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.index p {
|
||||
line-height: 40pt;
|
||||
}
|
||||
|
||||
.big-number {
|
||||
text-decoration: underline;
|
||||
color: #41ffc3;
|
||||
}
|
||||
|
||||
.mega-date {
|
||||
font-weight: 900;
|
||||
font-size: 50pt;
|
||||
margin-top: 8rem;
|
||||
margin-bottom: 8rem;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.margin-top {
|
||||
margin-top: 8rem;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: white;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #41ffc3;
|
||||
}
|
||||
|
||||
h1:not(:first-child) {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
h2:not(:first-child) {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
h3:not(:first-child) {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@media (max-width:600px) {
|
||||
.index {
|
||||
font-size: 20pt;
|
||||
}
|
||||
body {
|
||||
margin: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:400px) {
|
||||
.index p {
|
||||
line-height: unset;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user