mdb-ui-kit/index.html
2020-12-30 15:35:18 +01:00

118 lines
4.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Material Design for Bootstrap</title>
<!-- MDB icon -->
<link rel="icon" href="img/mdb-favicon.ico" type="image/x-icon" />
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" />
<!-- Google Fonts Roboto -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"
/>
<!-- MDB -->
<link rel="stylesheet" href="css/mdb.min.css" />
<!-- Custom styles -->
<style></style>
</head>
<body>
<!-- Start your project here-->
<div class="container">
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
<div class="text-center">
<!-- <i class="fas fa-ticket-alt fa-10x"></i> -->
<img
src="https://mdbootstrap.com/img/Marketing/other/mdb50off.png"
height="150px"
width="150px"
/>
<h5 class="mb-3">Release suprise! 50% OFF MDB 5 PRO</h5>
<p>
Use this coupon code before the next release to claim the reward.<br />Hurry up & don't
loose your chance.
</p>
<p>
<code class="text-uppercase h1 px-2 rounded bg-dark text-white">MB8XW23V</code>
</p>
<a
class="btn btn-primary btn-lg"
onclick="copy('MB8XW23V');toastr.info('Coupon code copied! Use it on the checkout.');"
target="_blank"
role="button"
>CLAIM DISCOUNT</a
>
<a
class="btn btn-outline-primary btn-lg"
href="https://mdbootstrap.com/docs/standard/getting-started/"
target="_blank"
role="button"
>START TUTORIAL</a
>
<h5 class="h1-responsive text-uppercase mt-3">
the code <span class="font-weight-bold"></span> expires in:<br />
<span class="font-weight-bold" id="time-counter"></span>
</h5>
</div>
</div>
</div>
<!-- End your project here-->
</body>
<!-- MDB -->
<script type="text/javascript" src="js/mdb.min.js"></script>
<!-- Custom scripts -->
<script type="text/javascript">
function copy(text) {
var textarea = document.createElement('textarea');
textarea.value = text;
document.body.appendChild(textarea);
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
}
// Ad counter
// Set the date we're counting down to
var countDownDate = new Date(Date.UTC(2020, 09, 30, 10, 00, 00));
var counterElement = document.getElementById('time-counter');
// Update the count down every 1 second
function startCounter() {
//wrapped in an if to prevent console errors if the element isn't found on the page
if (counterElement == null) {
return;
} else {
var x = setInterval(function () {
// Get todays date and time
var now = new Date().getTime();
// Find the distance between now an 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="demo"
counterElement.innerHTML = days + 'd ' + hours + 'h ' + minutes + 'm ' + seconds + 's';
// If the count down is finished, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById('time-counter').innerHTML =
'<p class="h3 grey-text">Sale ended :(</p>';
}
}, 1000);
}
}
startCounter();
</script>
</html>