Update page layout.

This commit is contained in:
Patrick Jentsch 2019-07-09 16:59:04 +02:00
parent c15ac55fe3
commit 93b67cb297
8 changed files with 53 additions and 34 deletions

View File

@ -105,7 +105,7 @@ def password_reset_request():
flash('An email with instructions to reset your password has been ' flash('An email with instructions to reset your password has been '
'sent to you.') 'sent to you.')
return redirect(url_for('auth.login')) return redirect(url_for('auth.login'))
return render_template('auth/reset_password.html.j2', form=form, return render_template('auth/reset_password_request.html.j2', form=form,
title='Password Reset') title='Password Reset')

View File

@ -6,7 +6,7 @@ from flask_login import login_required
@main.route('/') @main.route('/')
def index(): def index():
return render_template('main/index.html.j2') return render_template('main/index.html.j2', title='Portal')
@main.route('/admin') @main.route('/admin')

View File

@ -1,30 +1,20 @@
{% extends "base.html.j2" %} {% extends "base.html.j2" %}
{% block page_content %} {% block page_content %}
<div class="col s12 m6"> <div class="col s12 m4">
<div class="card medium"> <h3>New to Opaque?</h3>
<div class="card-image"> <p>In case you are new to Opaque, you can create a free account at our register page.</p>
<img src="{{ url_for('static', filename='images/favicon.png') }}" alt=""> <p><a href="{{ url_for('auth.register') }}" class="waves-effect waves-light btn">Registration</a>
<span class="card-title grey-text text-darken-4">Welcome to Opaque!</span>
</div>
<div class="card-content">
<p>Sign in into an exisiting account or register a new one!</p>
</div>
<div class="card-action">
<a class="btn" href="{{url_for('auth.register')}}">Register</a>
</div>
</div>
</div> </div>
<div class="col s12 m6"> <div class="col s12 m8">
<div class="card medium"> <div class="card small">
<form method="POST"> <form method="POST">
<div class="card-content"> <div class="card-content">
<span class="card-title">Log In</span>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">person</i> <i class="material-icons prefix">person</i>
{{ form.login(class='validate') }} {{ form.login(class='validate', placeholder='Email address or username') }}
{{ form.login.label }} {{ form.login.label }}
{% for error in form.login.errors %} {% for error in form.login.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text" style="color:red;">{{ error }}</span>
@ -38,14 +28,14 @@
<span class="helper-text" style="color:red;">{{ error }}</span> <span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
<div class="switch left"> <a href="{{ url_for('auth.password_reset_request') }}" class="left">Forgot Password?</a>
<div class="switch right">
<label> <label>
Remember me Remember me
{{ form.remember_me() }} {{ form.remember_me() }}
<span class="lever"></span> <span class="lever"></span>
</label> </label>
</div> </div>
<a href="{{ url_for('auth.password_reset_request') }}" class="right">Forgot Password?</a>
</div> </div>
<div class="card-action"> <div class="card-action">
{{ form.submit(class='btn right') }} {{ form.submit(class='btn right') }}

View File

@ -1,14 +1,18 @@
{% extends "base.html.j2" %} {% extends "base.html.j2" %}
{% block page_content %} {% block page_content %}
<div class="col s12"> <div class="col s12 m4">
<h3>&nbsp;</h3>
<img src="{{ url_for('static', filename='images/logo_sfb_1288.png') }}" class="responsive-img">
</div>
<div class="col s12 m8">
<div class="card"> <div class="card">
<form method="POST"> <form method="POST">
<div class="card-content"> <div class="card-content">
<span class="card-title">Register</span>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field"> <div class="input-field">
<i class="material-icons prefix">account_circle</i> <i class="material-icons prefix">person</i>
{{ form.username(class='validate') }} {{ form.username(class='validate') }}
{{ form.username.label }} {{ form.username.label }}
{% for error in form.username.errors %} {% for error in form.username.errors %}

View File

@ -5,7 +5,6 @@
<div class="card"> <div class="card">
<form method="POST"> <form method="POST">
<div class="card-content"> <div class="card-content">
<span class="card-title">Reset Your Password</span>
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
<div class="input-field"> <div class="input-field">
{{ form.email(class='validate', type='email') }} {{ form.email(class='validate', type='email') }}

View File

@ -0,0 +1,23 @@
{% extends "base.html.j2" %}
{% block page_content %}
<div class="col s12">
<div class="card small">
<form method="POST">
<div class="card-content">
{{ form.hidden_tag() }}
<div class="input-field">
{{ form.email(class='validate', type='email') }}
{{ form.email.label }}
{% for error in form.email.errors %}
<span class="helper-text" style="color:red;">{{ error }}</span>
{% endfor %}
</div>
</div>
<div class="card-action">
{{ form.submit(class='btn right') }}
</div>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,14 +1,9 @@
{% extends "base.html.j2" %} {% extends "base.html.j2" %}
{% block page_content %} {% block page_content %}
<div class="col s12">
<h2>Settings</h2>
<p>&nbsp;</p>
</div>
<div class="col s12 m4"> <div class="col s12 m4">
<h3>Account</h3> <h3>Account</h3>
<p>Lo-fi you probably haven't heard of them etsy leggings raclette kickstarter four dollar toast. Raw denim fingerstache food truck chia health goth synth. Forage man bun intelligentsia freegan PBR&B banh mi asymmetrical chambray.</p> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
</div> </div>
<div class="col s12 m8"> <div class="col s12 m8">

View File

@ -28,9 +28,7 @@
</ul> </ul>
<nav> <nav>
<div class="nav-wrapper"> <div class="nav-wrapper">
<a href="#!" class="brand-logo"> <a href="{{ url_for('main.index') }}" class="brand-logo"><i class="material-icons">cloud</i> Opaque</a>
{% if title %}{{ title }}{% else %}Opaque{% endif %}
</a>
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a> <a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down"> <ul class="right hide-on-med-and-down">
<li><a id="nav-notifications" class="dropdown-trigger" href="#!" data-target="nav-notifications-dropdown"><i class="material-icons">notifications</i></a></li> <li><a id="nav-notifications" class="dropdown-trigger" href="#!" data-target="nav-notifications-dropdown"><i class="material-icons">notifications</i></a></li>
@ -48,6 +46,16 @@
<main class="grey lighten-5"> <main class="grey lighten-5">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col s12">
<h2>
{% if title %}
{{ title }}
{% else %}
Unnamed page
{% endif %}
</h2>
<p>&nbsp;</p>
</div>
{% block page_content %} {% block page_content %}
{% endblock %} {% endblock %}
</div> </div>