diff options
author | B Stack <bgstack15@gmail.com> | 2022-02-15 16:44:06 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2022-02-15 16:44:06 -0500 |
commit | bee4591ac60f8f3bd85c2f2b12dc75e09e2c97d7 (patch) | |
tree | 053806ad9cb454717d362704184c9d6c8cf6ac85 /templates/layout.html | |
parent | pw-protect /admin endpoint (diff) | |
download | stackbin-bee4591ac60f8f3bd85c2f2b12dc75e09e2c97d7.tar.gz stackbin-bee4591ac60f8f3bd85c2f2b12dc75e09e2c97d7.tar.bz2 stackbin-bee4591ac60f8f3bd85c2f2b12dc75e09e2c97d7.zip |
split auth into separate python file
Flask can use Blueprint to load paths from two separate source
files, so the endpoints and logic can be grouped logically.
Diffstat (limited to 'templates/layout.html')
-rw-r--r-- | templates/layout.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/layout.html b/templates/layout.html index 3620a3a..329a485 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -10,13 +10,14 @@ <ul class=nav> <li><a href="{{ url_for('new_paste') }}">New Paste</a> {% if g.user and g.user == "admin" %}<li><a href="{{ url_for('admin') }}">admin</a></li>{% endif %} - {% if g.user %}<li><a href="{{ url_for('logout') }}">Sign out</a></li>{% endif %} + {% if g.user %}<li><a href="{{ url_for('logout') }}">Sign out</a></li> + {% else %}<li><a href="{{ url_for('login') }}">Sign in</a>{% endif %} {# {% if g.user %} <li><a href="{{ url_for('my_pastes') }}">My Pastes</a> <li><a href="{{ url_for('logout') }}">Sign out ({{ g.user.display_name }})</a> {% else %} - <li><a href="{{ url_for('login') }}">Sign in with Facebook</a> + <li><a href="{{ url_for('login') }}">Sign in</a> {% endif %} #} </ul> |