hh
gghh<div class="container">
<div class="date" id="printDate"></div>
<div class="date" id="printDay"></div>
<div class="date" id="printTime"></div>
</div>
<h2>token id</h2>
<h1 id="count">0</h1>
<h4>take screenshot when you get points.</h4>
<h4>submit the screenshot within 1 hours</h4>
<h3>only 5 time point be alloted every hour</h3>
<style>@import url('https://fonts.googleapis.com/css?family=Muli&display=swap');
* {
box-sizing: border-box;
}
body {
background-color: #192a56;
color: #fff;
font-family: 'Muli', sans-serif;
flex-direction: column;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
.cld{ font-size: 50px;
margin: 0;
color:red;
}
h1 {
font-size: 50px;
margin: 0;
}
p {
color: rgba(255, 255, 255, 0.8);
letter-spacing: 2px;
margin: 0;
}
</style><script>var date = new Date();
const elementDate = document.getElementById("printDate");
const elementDay = document.getElementById("printDay");
const elementTime = document.getElementById("printTime");
const listOfDays = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
];
function printDate() {
var day = date.getDate();
var month = date.getMonth();
var year = date.getFullYear();
elementDate.innerHTML = day + " / " + month + " / " + year;
}
function printDay() {
date = new Date();
var numberOfDay = date.getDay();
var day = listOfDays[numberOfDay];
elementDay.innerHTML = day;
}
function printTime() {
date = new Date();
var hours = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
if (seconds < 10) {
seconds = "0" + seconds;
}
if (minutes < 10) {
minutes = "0" + minutes;
}
if (hours > 12) {
hours = hours - 12;
elementTime.innerHTML = hours + " : " + minutes + " : " + seconds + " PM ";
} else if (hours < 12) {
elementTime.innerHTML = hours + " : " + minutes + " : " + seconds + " AM ";
} else if (hours = 12) {
elementTime.innerHTML = hours + " : " + minutes + " : " + seconds + " PM ";
}
}
setInterval(function() {
printTime();
printDate();
printDay();
}, 1000);
const countEl = document.getElementById('count');
updateVisitCount();
function updateVisitCount() {
fetch('https://api.countapi.xyz/update/florin-popcom/codepen/?amount=1')
.then(res => res.json())
.then(res => {
countEl.innerHTML = res.value;
})
}
function nameDefined(ckie,nme)
{
var splitValues
var i
for (i=0;i<ckie.length;++i)
{
splitValues=ckie[i].split("=")
if (splitValues[0]==nme) return true
}
return false
}
function delBlanks(strng)
{
var result=""
var i
var chrn
for (i=0;i<strng.length;++i) {
chrn=strng.charAt(i)
if (chrn!=" ") result += chrn
}
return result
}
function getCookieValue(ckie,nme)
{
var splitValues
var i
for(i=0;i<ckie.length;++i) {
splitValues=ckie[i].split("=")
if(splitValues[0]==nme) return splitValues[1]
}
return ""
}
function insertCounter() {
readCookie()
displayCounter()
}
function displayCounter() {
document.write('<H2 ALIGN="CENTER">')
document.write("")
if(counter==1) document.write("5 points")
if(counter==2) document.write("5 points")
if(counter==3) document.write("5 points")
if(counter==4) document.write("5 points")
if(counter==5) document.write("5 points")
document.writeln('</H2>')
}
function readCookie() {
var cookie=document.cookie
counter=0
var chkdCookie=delBlanks(cookie) //are on the client computer
var nvpair=chkdCookie.split(";")
if(nameDefined(nvpair,"pageCount"))
counter=parseInt(getCookieValue(nvpair,"pageCount"))
++counter
var futdate = new Date()
var expdate = futdate.getTime()
expdate += 100 * 60 *60 //expires in 1 hour
futdate.setTime(expdate)
var newCookie="pageCount="+counter
newCookie += "; expires=" + futdate.toGMTString()
window.document.cookie=newCookie
}
insertCounter();
</script>
<a class="cld" href="mailto:example@example.com">submit screenshot</a>