<html>

<head>
	<title>openvidu-mvc-node</title>

	<meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8"></meta>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"></link>

	<!-- Bootstrap -->
	<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
	    crossorigin="anonymous"></script>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	    crossorigin="anonymous"></link>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
	    crossorigin="anonymous"></script>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"></link>
	<!-- Bootstrap -->

	<link rel="styleSheet" href="style.css" type="text/css" media="screen"></link>
</head>

<body>

	<nav class="navbar navbar-default">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="/"><img class="demo-logo" src="images/openvidu_vert_white_bg_trans_cropped.png"/> MVC Node</a>
				<a class="navbar-brand nav-icon" href="https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-mvc-node" title="GitHub Repository"
				    target="_blank"><i class="fa fa-github" aria-hidden="true"></i></a>
				<a class="navbar-brand nav-icon" href="http://www.openvidu.io/docs/tutorials/openvidu-mvc-node/" title="Documentation" target="_blank"><i class="fa fa-book" aria-hidden="true"></i></a>
			</div>
		</div>
	</nav>

	<div id="main-container" class="container">
		<div id="logged">
			<div id="join" class="vertical-center">
				<div id="img-div"><img src="images/openvidu_grey_bg_transp_cropped.png" /></div>
				<div id="join-dialog" class="jumbotron">
					<h1>Join a video session</h1>
					<form class="form-group" action="/session" method="post">
						<p>
							<label>Participant</label>
							<input class="form-control" type="text" name="data" required="true"></input>
						</p>
						<p>
							<label>Session</label>
							<input class="form-control" type="text" name="sessionname" required="true"></input>
						</p>
						<p class="text-center">
							<button class="btn btn-lg btn-success" type="submit">Join!</button>
						</p>
					</form>
					<hr></hr>
					<div id="login-info">
						<div>Logged as <span id="name-user"><%= user %></span></div>
						<form action="/logout" method="post">
							<button id="logout-btn" class="btn btn-warning" type="submit">Log out</button>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>

	<footer class="footer">
		<div class="container">
			<div class="text-muted">OpenVidu © 2017</div>
			<a href="http://www.openvidu.io/" target="_blank"><img class="openvidu-logo" src="images/openvidu_globe_bg_transp_cropped.png"/></a>
		</div>
	</footer>

</body>

<script>
	window.onload = function () { // Generate participant info
		$("input[name='sessionname']").val("Session " + Math.floor(Math.random() * 10));
		$("input[name='data']").val("Participant " + Math.floor(Math.random() * 100));
	}
</script>

</html>