<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<meta name="author" content="Ranajoy, Anant">
	<title>Dashboard</title>
	<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
	<link href="https://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Bitter" rel="stylesheet">
    <style type="text/css">
    #lg {
    height: 4em;
    width: 100%;
    color: #34495E;
    background: #D4D4D4;
    border-radius: 2em;
    font-size: 1.2em;
    font-weight: bold;
	}
	.poster{
		max-height: 425px;
		border-radius: 5%;
		min-width: 325px;
		transition: all 0.5s;
	}
	.poster:hover{
                transform: scale(1.15);
    }
    header{
	background-color: #454545;
	padding-top: 5px;
	font-size: 28px;
	font-family: 'Droid Serif', serif;
	}
	.h{
		font-size: 18px;
		padding-top: 10px;
	}
	.ah{
		text-decoration: none;
		color: white;
	}
	.ah:hover{
		color: #C0C0C0;
		text-decoration: none;
	}
	@media only screen and (max-width: 500px){
		header{
			font-size: 20px;
		}
		.h{
			font-size: 14px;
		}
		.poster{
			max-height: 350px;
			min-width: 280px;
			padding-top: 15px;
		}
	}
    </style>
</head>
<body>
	<div class="container-fluid">
		<header class="row">
			<span class="col-md-6 col-xs-6">
				<a href="#" class="ah">Challengers</a>
			</span>
			<span class="col-md-6 col-xs-6 text-right h">
			<form action = "{{ url_for('logout') }}">
    <input type="submit" class = "ah" value="Logout" style="background-color:#454545;border:0;">
  </form>
  </span>

		</header>
	</div>
	<div class="container">
		<div class="row text-center">
			<h1 class="col-md-12" style="font-family:'Droid Serif', serif;">"The Moment you stop accepting challenges <br> is the moment you stop moving forward... "</h1>
		</div>
		<div class="row text-center">
			<h1 class="col-md-12" style="font-family: 'Bitter';">Hello user</h1>

		</div>
	</div>
	<div class="container" style="border: 2px solid #5D6D7E; margin-top: 20px; border-radius: 2%; padding-left: 30px; background-color: #EAECEE; margin-bottom: 15px; padding-bottom: 10px;">
		<div class="row">
			<h1 class="row" style="border-bottom:2px solid #5D6D7E; margin-right: 15px;margin-left: 15px;padding-bottom: 15px;font-family:'Droid Serif', serif; ">Recent Event</h1>
		</div>
		<div class="row">
			<div class="col-md-8">
				<h1 style="font-family: 'Bitter', serif;margin-bottom: 20px;">Hackathon</h1>
				<p style="line-height: 2; font-size: 18px;">Challengers invites you to the very first event organised by us!<br>
				A 24-hour coding competition for each and everyone<br>
				For the first time in Institute of Innovation in Technology and Management<br>
				Started On: 09 Sep, 09:00 A.M.<br>
				Ended On: 10 Sep, 11:59 A.M.</p>

				<h3 id="demo" class="col-md-8" style="color: black;padding-left: 0;"></h3>
                <script>
                        // Set the date we're counting down to
                        var countDownDate = new Date("Sep 10, 2017 12:00:00").getTime();
                        // Update the count down every 1 second
                        var countdownfunction = 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);

                            // Output the result in an element with id="demo"
                            document.getElementById("demo").innerHTML = days + "d " + hours + "h "
                            + minutes + "m " + seconds + "s ";

                            // If the count down is over, write some text
                            if (distance < 0) {
                                clearInterval(countdownfunction);
                                document.getElementById("demo").innerHTML = "EXPIRED";
                            }
                        }, 1000);
                </script>
                <h4 class="col-md-12 text-center" style="padding-left: 0;">Want to Practice?Have a look at the pattern of questions</h4>
                <form action = "{{ url_for('language') }}" method = "POST" class="text-center">
                <h4 style="padding-left:0;">Select Programming Language&emsp;
                    <select name="language" required="1">
                    <option disabled selected value> -- select an option -- </option>
                        <option value="c">C </option>
                        <option value="c++">C++ </option>
                        <option value="java">Java (1.8)</option>
                        <option value="python">Python 3</option>
                        <option value="fortran">Fortran </option>
                    </select>
                </h4>
                <a href="/practice" class="col-md-12" style="padding-left: 0;">
                	<input type="submit" id="lg" value="Start My Hackathon" style="{cursor:pointer;}:focus{border:none;}">
                </a>
			</div>
			<div class="col-md-4">
				<img src="poster.png" class="img-responsive poster">
			</div>
		</div>
	</div>
</body>
</html>