Add a nav bar
authorDavid Kerkeslager <kerkeslager@gmail.com>
Fri, 4 Mar 2022 04:23:43 +0000 (23:23 -0500)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Fri, 4 Mar 2022 04:23:43 +0000 (23:23 -0500)
src/core/templates/core/base.html

index 1879ad8..b1e0ece 100644 (file)
   </head>
 
   <body>
+    <nav>
+      {% if request.path == '/' %}
+        <span>Home</span>
+      {% else %}
+        <span><a href=''>Home</a></span>
+      {% endif %}
+
+      {% if request.path == '/c/' %}
+        <span>Climbs</span>
+      {% else %}
+        <span><a href='/c/'>Climbs</a></span>
+      {% endif %}
+
+      {% if request.path == '/n/' %}
+        <span>Nutrition</span>
+      {% else %}
+        <span><a href='/n/'>Nutrition</a></span>
+      {% endif %}
+
+      {% if request.path == '/t/' %}
+        <span>Training</span>
+      {% else %}
+        <span><a href='/t/'>Training</a></span>
+      {% endif %}
+    </nav>
+
     {% block content %}{% endblock %}
   </body>
 </html>