Dateien hochladen nach „willkommen“
This commit is contained in:
parent
dd86dcfbf1
commit
2066fc9079
54
willkommen/willkommen.css
Normal file
54
willkommen/willkommen.css
Normal file
@ -0,0 +1,54 @@
|
||||
body {
|
||||
background-image: url("https://images.unsplash.com/photo-1495195129352-aeb325a55b65?ixlib=rb-1.2.1&auto=format&fit=zoom&w=1024&q=80");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-attachment: fixed;
|
||||
background-position: right;
|
||||
font-family: sans-serif;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.ct1 {
|
||||
background-color: rgba(020,020,020,0.4);
|
||||
color: white;
|
||||
margin-top: 30px;
|
||||
font-size: 1.8em;
|
||||
display: inline-block;
|
||||
}
|
||||
.txt1 {
|
||||
padding: 4px;
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
.ct2 {
|
||||
color: #333;
|
||||
position: absolute;
|
||||
top: 44%;
|
||||
left: 20%;
|
||||
right: 20%;
|
||||
font-size: 1em;
|
||||
display: inline-block;
|
||||
}
|
||||
.txt2 {
|
||||
text-align: center;
|
||||
}
|
||||
.txt2 span {
|
||||
font-size: 60%;
|
||||
}
|
||||
footer {
|
||||
background-color: rgba(020,020,020,0.4);
|
||||
color: white;
|
||||
position: fixed;
|
||||
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 130px;
|
||||
height: 130px;
|
||||
border-top-right-radius: 130px;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
.txt3 {
|
||||
position: relative;
|
||||
top: 46%;
|
||||
margin-left: 9%;
|
||||
}
|
62
willkommen/willkommen.js
Normal file
62
willkommen/willkommen.js
Normal file
@ -0,0 +1,62 @@
|
||||
var params = window.location.search.slice(1).split("&");
|
||||
console.log(params);
|
||||
for(var p=0; p<params.length; p++) {
|
||||
var nv = params[p].split("=");
|
||||
var name = nv[0], value = nv[1];
|
||||
console.log(name + " = " + value);
|
||||
}
|
||||
// Stopzeitpunkt setzten
|
||||
// h = Stunde
|
||||
// m = Minute -> 0 stoppt zur vollen Stunde
|
||||
var h = 16;
|
||||
var m = 45;
|
||||
|
||||
var d = new Date();
|
||||
var countdownEnde = new Date(d.getFullYear(), d.getMonth(), d.getDate(), h, m).getTime();
|
||||
|
||||
// die Funktion wird jede Sekunde aufgerufen
|
||||
var t = setInterval(function() {
|
||||
|
||||
// aktueller Zeitstempel
|
||||
var jetzt = new Date().getTime();
|
||||
|
||||
// Unterschied zwischen aktuellem Zeitstempel und CountdownEnde berechnen
|
||||
var abstand = countdownEnde - jetzt;
|
||||
|
||||
// Minuten und Sekunden berechnen
|
||||
var m = ("0" + Math.floor((abstand % (1000 * 60 * 60)) / (1000 * 60))).slice (-2);
|
||||
var s = ("0" + Math.floor((abstand % (1000 * 60)) / 1000)).slice (-2);
|
||||
|
||||
// Ergebnis in element mit id="countdown" anzeigen
|
||||
document.getElementById("countdown").innerHTML = m + ":" + s;
|
||||
|
||||
// wenn der Countdown abgelaufen ist, Intervall stoppen und "00:00" anzeigen
|
||||
if (abstand < 0) {
|
||||
clearInterval(d);
|
||||
document.getElementById("countdown").innerHTML = "00:00";
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// Funktion zum Anpassen der Elemente an die Anzeigegröße
|
||||
var grNeu = function() {
|
||||
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
||||
var grWk = width / 1.7;
|
||||
var grWkTxt = Math.round(grWk / 350 * 100);
|
||||
var grVsTxt = Math.round(grWk / 350 * 100);
|
||||
var grCd = Math.min(width / 5, height / 5);
|
||||
var grCdTxt = Math.round(grCd / 130 * 100);
|
||||
|
||||
document.getElementById('willkommenTxt').style.fontSize = grWkTxt + '%';
|
||||
document.getElementById('versCt').style.fontSize = grVsTxt + '%';
|
||||
|
||||
document.getElementById('fusszeile').style.width = grCd + 'px';
|
||||
document.getElementById('fusszeile').style.height = grCd + 'px';
|
||||
document.getElementById('fusszeile').style.borderTopRightRadius = grCd + 'px';
|
||||
document.getElementById('countdown').style.fontSize = grCdTxt + '%';
|
||||
}
|
||||
|
||||
grNeu();
|
||||
|
||||
// Überwachen der Anzeigegröße und anpassen der Element
|
||||
window.addEventListener("resize", function() { grNeu(); }, true);
|
Loading…
x
Reference in New Issue
Block a user