Added very basic and not-very-secure authentication. Smeagol is now usable.

This commit is contained in:
Simon Brooke 2014-11-11 12:24:44 +00:00
parent d437f07fc2
commit fc89b25a2f
12 changed files with 140 additions and 32 deletions

View file

@ -13,10 +13,19 @@
<body>
<!-- navbar -->
<div id="nav">
{% if user %}
<p class="user" id="user">You are logged in as {{user}}</p>
{% endif %}
<img id="nav-icon" src="{{servlet-context}}/img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class="{{home-selected}}"><a href="{{servlet-context}}/">Home</a></li>
<li class="{{wiki-selected}}"><a href="{{servlet-context}}/">Home</a></li>
<li class="{{edit-selected}}"><a href="{{servlet-context}}/edit?content={{title}}">Edit this page</a></li>
<li class="{{auth-selected}}"><a href="{{servlet-context}}/auth">
{% if user %}
Log out
{% else %}
Log in
{% endif %}</a></li>
</ul>
</div>