commit
6739104ef7
@ -1,49 +1,50 @@ |
|||||||
{% raw %} |
{% raw %} |
||||||
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> |
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> |
||||||
<div class="container"> |
|
||||||
|
|
||||||
<!-- Brand and toggle get grouped for better mobile display --> |
|
||||||
<div class="navbar-header"> |
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> |
|
||||||
<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="{{ url_for('public.home') }}"> |
<a class="navbar-brand" href="{{ url_for('public.home') }}"> |
||||||
{% endraw %} |
{% endraw %} {{cookiecutter.project_name}} {% raw %} |
||||||
{{cookiecutter.project_name}} |
|
||||||
{% raw %} |
|
||||||
</a> |
</a> |
||||||
</div> |
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" |
||||||
<!-- Collect the nav links, forms, and other content for toggling --> |
aria-expanded="false" aria-label="Toggle navigation"> |
||||||
<div class="collapse navbar-collapse navbar-ex1-collapse"> |
<span class="navbar-toggler-icon"></span> |
||||||
<ul class="nav navbar-nav"> |
</button> |
||||||
<li><a href="{{ url_for('public.home') }}">Home</a></li> |
|
||||||
<li><a href="{{ url_for('public.about') }}">About</a></li> |
<div class="collapse navbar-collapse" id="navbarSupportedContent"> |
||||||
|
<ul class="navbar-nav mr-auto"> |
||||||
|
<li class="nav-item active"> |
||||||
|
<a class="nav-link" href="{{ url_for('public.home') }}">Home |
||||||
|
<span class="sr-only">(current)</span> |
||||||
|
</a> |
||||||
|
</li> |
||||||
|
<li class="nav-item"> |
||||||
|
<a class="nav-link" href="{{ url_for('public.about') }}">About</a> |
||||||
|
</li> |
||||||
</ul> |
</ul> |
||||||
{% if current_user and current_user.is_authenticated %} |
{% if current_user and current_user.is_authenticated %} |
||||||
<ul class="nav navbar-nav navbar-right"> |
<ul class="navbar-nav my-auto"> |
||||||
<li> |
<li class="nav-item active"> |
||||||
<p class="navbar-text"><a class="navbar-link" href="{{ url_for('user.members') }}">Logged in as {{ current_user.username }}</a></p> |
<a class="nav-link" href="{{ url_for('user.members') }}">Logged in as {{ current_user.username }}</a> |
||||||
|
</li> |
||||||
|
<li class="nav-item"> |
||||||
|
<a class="nav-link" href="{{ url_for('public.logout') }}"> |
||||||
|
<i class="fa fa-sign-out"></i> |
||||||
|
</a> |
||||||
</li> |
</li> |
||||||
<li><a class="navbar-link" href="{{ url_for('public.logout') }}"><i class="fa fa-sign-out"></i></a></li> |
|
||||||
|
|
||||||
</ul> |
</ul> |
||||||
{% elif form %} |
{% elif form %} |
||||||
<ul class="nav navbar-nav navbar-right"> |
<form class="form-inline" id="loginForm" method="POST" action="/" role="login"> |
||||||
<li><a href="{{ url_for('public.register') }}">Create account</a></li> |
|
||||||
</ul> |
|
||||||
<form id="loginForm" method="POST" class="navbar-form form-inline navbar-right" action="/" role="login"> |
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> |
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> |
||||||
<div class="form-group"> |
<div class="input-group mb-2 mr-sm-2"> |
||||||
{{ form.username(placeholder="Username", class_="form-control") }} |
{{ form.username(placeholder="Username", class_="form-control mr-sm-1 my-auto") }} {{ form.password(placeholder="Password", |
||||||
{{ form.password(placeholder="Password", class_="form-control") }} |
class_="form-control mr-sm-1 my-auto") }} |
||||||
|
<button class="btn btn-light btn-primary m-auto" type="submit">Login</button> |
||||||
</div> |
</div> |
||||||
<button type="submit" class="btn btn-default">Log in</button> |
|
||||||
</form> |
</form> |
||||||
|
<ul class="navbar-nav my-auto"> |
||||||
|
<li class="nav-item"> |
||||||
|
<a class="nav-link navbar-text" href="{{ url_for('public.register') }}">Create account</a> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
{% endif %} |
{% endif %} |
||||||
</div><!-- /.navbar-collapse --> |
</div><!-- /.navbar-collapse --> |
||||||
</div><!-- /.container --> |
|
||||||
</nav> |
</nav> |
||||||
{% endraw %} |
{% endraw %} |
@ -1,7 +1,9 @@ |
|||||||
{% raw %} |
{% raw %} |
||||||
{% extends "layout.html" %} |
{% extends "layout.html" %} |
||||||
{% block content %} |
{% block content %} |
||||||
|
<div class="container"> |
||||||
<h1>Welcome {{ current_user.username }}</h1> |
<h1>Welcome {{ current_user.username }}</h1> |
||||||
<h3>This is the members-only page.</h3> |
<h3>This is the members-only page.</h3> |
||||||
|
</div> |
||||||
{% endblock %} |
{% endblock %} |
||||||
{% endraw%} |
{% endraw%} |
||||||
|
Loading…
Reference in new issue