Nicer display of currently logged-in user
[climbing.kerkeslager.com] / src / core / templates / core / base.html
1 <!doctype html>
2
3 <html lang='en'>
4   <head>
5     <meta charset='utf-8'>
6     <meta name='viewport' content='width=device-width, initial-scale=1'>
7
8     <title>Climbing</title>
9     <meta name='author' content='David Kerkeslager'>
10   </head>
11
12   <body>
13     <nav>
14       {% if request.path == '/' %}
15         <span>Home</span>
16       {% else %}
17         <span><a href=''>Home</a></span>
18       {% endif %}
19
20       {% if request.path == '/c/' %}
21         <span>Climbs</span>
22       {% else %}
23         <span><a href='/c/'>Climbs</a></span>
24       {% endif %}
25
26       {% if request.path == '/n/' %}
27         <span>Nutrition</span>
28       {% else %}
29         <span><a href='/n/'>Nutrition</a></span>
30       {% endif %}
31
32       {% if request.path == '/t/' %}
33         <span>Training</span>
34       {% else %}
35         <span><a href='/t/'>Training</a></span>
36       {% endif %}
37
38       {% if request.user.is_authenticated %}
39       <span>Logged in as <a href='{% url "user:self-profile-detail" %}'>{{ request.user.username }}</a>.</span>
40       {% endif %}
41     </nav>
42
43     {% block content %}{% endblock %}
44   </body>
45 </html>