<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-3.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
	<title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE">SecureMail</title>
	<link rel="icon" type="image/x-icon" th:href="@{/resources/img/favicon.ico}" href="../static/img/favicon.ico"/>
	<link th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"></link>
	<style type="text/css">
	  /* Sticky footer styles
	  -------------------------------------------------- */

	  html,
	  body {
		height: 100%;
		/* The html and body elements cannot have any padding or margin. */
	  }

	  /* Wrapper for page content to push down footer */
	  #wrap {
		min-height: 100%;
		height: auto !important;
		height: 100%;
		/* Negative indent footer by it's height */
		margin: 0 auto -60px;
	  }

	  /* Set the fixed height of the footer here */
	  #push,
	  #footer {
		height: 60px;
	  }
	  #footer {
		background-color: #f5f5f5;
	  }

	  /* Lastly, apply responsive CSS fixes as necessary */
	  @media (max-width: 767px) {
		#footer {
		  margin-left: -20px;
		  margin-right: -20px;
		  padding-left: 20px;
		  padding-right: 20px;
		}
	  }



	  /* Custom page CSS
	  -------------------------------------------------- */
	  /* Not required for template or sticky footer method. */

	  .container {
		width: auto;
		max-width: 680px;
	  }
	  .container .credit {
		margin: 20px 0;
		text-align: center;
	  }
	  a {
		  color: green;
	  }
	  .navbar-form {
		margin-left: 1em;
	  }
	</style>
	<link th:href="@{/webjars/bootstrap/css/bootstrap-responsive.min.css}" href="/webjars/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"></link>

	<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	  <script th:src="@{/webjars/html5shiv/html5shiv.min.js}" src="/webjars/html5shiv/html5shiv.min.js"></script>
	<![endif]-->
</head>


<body>
	<div id="wrap">
	  <div class="navbar navbar-inverse navbar-static-top">
		<div class="navbar-inner">
		  <div class="container">
			<a class="brand" th:href="@{/}"><img th:src="@{/resources/img/logo.png}" alt="Spring Security Sample"/></a>

<div class="nav-collapse collapse"
	 th:with="currentUser=${#httpServletRequest.userPrincipal?.principal}">
<div th:if="${currentUser != null}">
	  <form class="navbar-form pull-right" th:action="@{/logout}" method="post">
		  <input type="submit" value="Log out" />
	  </form>
	  <p class="navbar-text pull-right" th:text="${currentUser.firstName}">
		sample_user
	  </p>
</div>
<ul class="nav">
	<li><a th:href="@{/}">IM</a></li>
	<li><a th:href="@{/h2-console/}">H2</a></li>
</ul>
</div>

		</div>
	  </div>
	</div>
	  <!-- Begin page content -->
	  <div class="container">
		<div class="alert alert-success"
			  th:if="${globalMessage}"
			  th:text="${globalMessage}">
			Some Success message
		</div>
		<div layout:fragment="content">
			Fake content
		</div>
	  </div>

	  <div id="push"><!--  --></div>
	</div>

	<div id="footer">
	  <div class="container">
		<p class="muted credit">Visit the <a href="http://spring.io/spring-security">Spring Security</a> site for more <a href="https://github.com/spring-projects/spring-security/blob/master/samples/">samples</a>.</p>
	  </div>
	</div>
</body>
</html>
