aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/templates')
-rw-r--r--pyaggr3g470r/templates/layout.html15
-rw-r--r--pyaggr3g470r/templates/login.html29
2 files changed, 38 insertions, 6 deletions
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index c6d26e50..659c573c 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -38,12 +38,15 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
- <li><a href="/fetch">Fetch</a></li>
- <li><a href="/management/">Management</a></li>
- <li><a href="#services">History</a></li>
- <li><a href="/favorites/">Favorites</a></li>
- <li><a href="/unread/">Unread</a></li>
- <li><a href="/about/">About</a></li>
+ {% if g.user.is_authenticated() %}
+ <li><a href="/fetch">Fetch</a></li>
+ <li><a href="/management/">Management</a></li>
+ <li><a href="#services">History</a></li>
+ <li><a href="/favorites/">Favorites</a></li>
+ <li><a href="/unread/">Unread</a></li>
+ <li><a href="/about/">About</a></li>
+ <li><a href="{{ url_for('logout') }}">Logout</a></li>
+ {% endif %}
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
diff --git a/pyaggr3g470r/templates/login.html b/pyaggr3g470r/templates/login.html
new file mode 100644
index 00000000..fce29054
--- /dev/null
+++ b/pyaggr3g470r/templates/login.html
@@ -0,0 +1,29 @@
+{% extends "layout.html" %}
+
+{% block content %}
+<div align="center">
+ <h2>Log In</h2>
+
+ {% for message in form.email.errors %}
+ <div class="flash">{{ message }}</div>
+ {% endfor %}
+
+ {% for message in form.password.errors %}
+ <div class="flash">{{ message }}</div>
+ {% endfor %}
+
+ <form action="{{ url_for('login') }}" method=post>
+ {{ form.hidden_tag() }}
+
+ {{ form.email.label }}
+ {{ form.email }}
+ <br />
+ {{ form.password.label }}
+ {{ form.password }}
+
+ <br />
+ {{ form.submit(class_="btn") }}
+ </form>
+</div>
+
+{% endblock %}
bgstack15