Structural changes

This commit is contained in:
Maxim Stewart 2020-11-05 12:50:45 -06:00
parent 6ad7183c17
commit e25d5c9fc9
12 changed files with 32 additions and 39 deletions

View File

@ -16,7 +16,7 @@ msgHandler = MessageHandler()
@app.route('/', methods=['GET', 'POST'])
def home():
if request.method == 'GET':
return render_template('index.html')
return render_template('pages/index.html')
return render_template('error.html',
title='Error!',
@ -26,7 +26,7 @@ def home():
@app.route('/about', methods=['GET', 'POST'])
def about():
if request.method == 'GET':
return render_template('about.html')
return render_template('pages/about.html')
return render_template('error.html', title = 'Error!',
message = 'Must use GET request type...')
@ -39,7 +39,7 @@ def protected_zone():
if current_user.is_authenticated or oidc.user_loggedin:
msg = "There is no secret! It was all a lie!"
return render_template('protected.html', secret = msg)
return render_template('pages/protected.html', secret = msg)
return render_template('error.html', title = 'Error!',
message = 'Must use GET request type...')

View File

@ -28,7 +28,7 @@ def app_login():
flash("Username or password incorrect! Please try again...", "danger")
return render_template('login.html', title=TITLE, form=_form)
return render_template('pages/login.html', title=TITLE, form=_form)
@app.route('/app-logout')

View File

@ -26,6 +26,6 @@ def app_register():
flash("Account created successfully!", "success")
return redirect(url_for("login"))
return render_template('register.html',
return render_template('pages/register.html',
title = TITLE,
form = _form)

View File

@ -27,6 +27,6 @@ def oidc_register():
flash("Account created successfully!", "success")
return redirect("/login")
return render_template('register.html',
return render_template('pages/register.html',
title = TITLE,
form = _form)

View File

@ -1,15 +1,13 @@
{% extends "layout.html" %}
{% block content %}
<div class="container">
<div class="row">
<div class="col justify-content-center text-center">
<!-- <p class="alert-danger" style="color:#ffffff;">....</p> -->
<h1 class="errorTxt">{{title}}</h1>
<p>{{message}}</p>
</div>
{% block body_content_additional %}
<div class="row">
<div class="col justify-content-center text-center">
<!-- <p class="alert-danger" style="color:#ffffff;">....</p> -->
<h1 class="errorTxt">{{title}}</h1>
<p>{{message}}</p>
</div>
</div>
{% endblock content %}
{% endblock body_content_additional %}
{% block scripts %}
<!-- Created scripts -->

View File

@ -58,10 +58,13 @@
{% endif %}
{% endwith %}
<div class="container">
{% block body_content %}
{% block body_content_additional %}
{% endblock body_content_additional%}
{% block body_content_additional %}
{% endblock body_content_additional%}
{% endblock %}
</div>
{% block body_footer %}

View File

@ -3,15 +3,13 @@
{% block body_header_additional %}
{% endblock body_header_additional %}
{% block body_content %}
<div class="container">
<div class="row">
<div class="col justify-content-center text-center">
<p>Login stub...</p>
</div>
{% block body_content_additional %}
<div class="row">
<div class="col justify-content-center text-center">
<p>Login stub...</p>
</div>
</div>
{% endblock body_content %}
{% endblock body_content_additional %}
{% block body_footer_additional %}

View File

@ -3,8 +3,7 @@
{% block body_header_additional %}
{% endblock body_header_additional %}
{% block body_content %}
<div class="container">
{% block body_content_additional %}
<div class="row">
<div class="col">
<!-- <div class="col justify-content-center text-center"> -->
@ -47,8 +46,7 @@
</form>
</div>
</div>
</div>
{% endblock body_content %}
{% endblock body_content_additional %}
{% block body_footer_additional %}

View File

@ -3,15 +3,13 @@
{% block body_header_additional %}
{% endblock body_header_additional %}
{% block body_content %}
<div class="container">
<div class="row">
<div class="col justify-content-center text-center">
<h1>{{secret}}</h1>
</div>
{% block body_content_additional %}
<div class="row">
<div class="col justify-content-center text-center">
<h1>{{secret}}</h1>
</div>
</div>
{% endblock body_content %}
{% endblock body_content_additional %}
{% block body_footer_additional %}

View File

@ -3,8 +3,7 @@
{% block body_header_additional %}
{% endblock body_header_additional %}
{% block body_content %}
<div class="container">
{% block body_content_additional %}
<div class="row">
<div class="col">
<!-- <div class="col justify-content-center text-center"> -->
@ -75,8 +74,7 @@
</div>
</div>
</div>
</div>
{% endblock body_content %}
{% endblock body_content_additional %}
{% block body_footer_additional %}