diff --git a/Tweeder.py b/Tweeder.py index a06f5a1..3bfdb6a 100644 --- a/Tweeder.py +++ b/Tweeder.py @@ -30,6 +30,8 @@ def login(): status=login_attempt['status'], message=login_attempt['message']) elif request.method == 'GET': + if 'username' in session.keys(): + return redirect(url_for('logout')) return render_template('login.html') @@ -51,6 +53,8 @@ def register(): status="danger", message="Passwords do not match!") elif request.method == 'GET': + if 'username' in session.keys(): + return redirect(url_for('logout')) return render_template('register.html') diff --git a/static/index.css b/static/index.css index ef307a1..a15bd37 100644 --- a/static/index.css +++ b/static/index.css @@ -1,19 +1,19 @@ body { padding-top: 90px; } -.panel-login { +.card-login { border-color: #ccc; -webkit-box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.2); -moz-box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.2); box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.2); } -.panel-login>.panel-heading { +.card-login>.card-heading { color: #00415d; background-color: #fff; border-color: #fff; text-align:center; } -.panel-login>.panel-heading a{ +.card-login>.card-heading a{ text-decoration: none; color: #666; font-weight: bold; @@ -22,11 +22,11 @@ body { -moz-transition: all 0.1s linear; transition: all 0.1s linear; } -.panel-login>.panel-heading a.active{ +.card-login>.card-heading a.active{ color: #029f5b; font-size: 18px; } -.panel-login>.panel-heading hr{ +.card-login>.card-heading hr{ margin-top: 10px; margin-bottom: 0px; clear: both; @@ -37,7 +37,7 @@ body { background-image: -ms-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.15),rgba(0,0,0,0)); background-image: -o-linear-gradient(left,rgba(0,0,0,0),rgba(0,0,0,0.15),rgba(0,0,0,0)); } -.panel-login input[type="text"],.panel-login input[type="email"],.panel-login input[type="password"] { +.card-login input[type="text"],.card-login input[type="email"],.card-login input[type="password"] { height: 45px; border: 1px solid #ddd; font-size: 16px; @@ -45,8 +45,8 @@ body { -moz-transition: all 0.1s linear; transition: all 0.1s linear; } -.panel-login input:hover, -.panel-login input:focus { +.card-login input:hover, +.card-login input:focus { outline:none; -webkit-box-shadow: none; -moz-box-shadow: none; diff --git a/templates/login.html b/templates/login.html index 0e5a6fc..945d66b 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,94 +1,20 @@ - - - - - - - - Welcome to Tweeder! - - - +{% extends 'layout.html' %} +{% block content %}
{% if status %} {% endif %} -
-
- -
-
-
+
+
+

Login to Tweeder

+ Need an account? +
+ + + +
+
+
+ - - - - - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/templates/register.html b/templates/register.html index e63536a..6fbd828 100644 --- a/templates/register.html +++ b/templates/register.html @@ -1,94 +1,22 @@ - - - - - - - - Welcome to Tweeder! - - - +{% extends 'layout.html' %} +{% block content %}
{% if status %} {% endif %} -
-
- -
-
-
+
+
+

Register for Tweeder

+ Have an account? +
+ + + + + +
+
+
+ - - - - - \ No newline at end of file +{% endblock %} \ No newline at end of file