layout.html 2.34 KB
Newer Older
1
2
3
4
5
6
7
8
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE-edge"/>
	<title> {% block title %} {% endblock %} </title>
	<meta name="viewport" content="with-device-width, initial-scale-1"/>
	<link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
Vladislav Rykov's avatar
Vladislav Rykov committed
9
	<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/custom.css') }}"/>
10
11
12
13
14
15
16
17
18
19
20
</head>
<body>
	<nav class="navbar navbar-inverse">
      		<div class="container">
        		<div class="navbar-header">
          			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            				<span class="sr-only">Toggle navigation</span>
	            			<span class="icon-bar"></span>
	        	    		<span class="icon-bar"></span>
        	    			<span class="icon-bar"></span>
	        	  	</button>
Vladislav Rykov's avatar
Vladislav Rykov committed
21
        			<a class="navbar-brand" href="/">HPC&A IoT Server</a>
22
23
	        	</div>
        		<div id="navbar" class="collapse navbar-collapse">
Vladislav Rykov's avatar
Vladislav Rykov committed
24
25
26
27
	        		<ul class="nav navbar-nav navbar-left">
					<li><a href="/">Home</a></li>
					{% if not session['name'] %}
					<li><a href="/login">Login</a></li>
28
29
30
        	    			<li><a href="/signup">Signup</a></li>
					{% endif %}
	         		</ul>
Vladislav Rykov's avatar
Vladislav Rykov committed
31
32
33
34
35
				{% if session['name'] %}
				<ul class="nav navbar-nav navbar-right">
	            			<li><a href="/logout">Logout</a></li>
				</ul>
				{% endif %}
36
37
38
39
40
41
        		</div><!--/.nav-collapse -->
      		</div>
    	</nav>

    	<div class="container">
		{% block content %} {% endblock %}
Vladislav Rykov's avatar
Vladislav Rykov committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
		
		<div class="col-md-6 col-md-offset-3">
		{% with messages = get_flashed_messages(with_categories=true) %}
			{% if messages %}
				{% for category, message in messages %}
					<div class="alert alert-{{ category }} alert-dismissiblei" role="alert">
						<button type="button" class="close" data-dismiss="alert" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						{{ message }}
					</div>
				{% endfor %}
			{% endif %}
		{% endwith %}
		</div>
57
58
59
60
    	</div><!-- /.container -->

	<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>	
Vladislav Rykov's avatar
Vladislav Rykov committed
61
	{% block script %} {% endblock %}
62
63
</body>
</html>