flask-contacts/templates/layouts/master.html

60 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="{{ lang }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %} | Contacts Flask </title>
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Contact Manager</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<form action="{{ url_for('search') }}" method="get" class="navbar-form navbar-left">
<div class="form-group">
<input type="text" name="name" class="form-control" placeholder="Name...">
</div>
<button type="submit" class="btn btn-default">Search</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ url_for('new_contact') }}">New</a></li>
<li><a href="{{ url_for('contacts') }}">View contacts</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
{# Flashed messages #}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div id="alert-{{ loop.index }}" class="alert alert-dismissable alert-{{ category }}" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true"><span class="glyphicon glyphicon-remove"></span></span>
</button>
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
{# End Flashed messages #}
{% block body %}{% endblock %}
</div>
<script src="{{ url_for('static', filename='js/jquery-3.2.1.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/bootstrap-confirmation.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>