mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Added very basic and not-very-secure authentication. Smeagol is now usable.
This commit is contained in:
parent
d437f07fc2
commit
fc89b25a2f
12 changed files with 140 additions and 32 deletions
33
resources/templates/auth.html
Normal file
33
resources/templates/auth.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{% extends "templates/base.html" %}
|
||||
{% block content %}
|
||||
<div id="header" class="wiki">
|
||||
<h1>{{title}}</h1>
|
||||
{{header|safe}}
|
||||
</div>
|
||||
<div id="left-bar" class="wiki">
|
||||
{{left-bar|safe}}
|
||||
</div>
|
||||
<div id="content" class="wiki">
|
||||
<form action="{{servlet-context}}/auth" method="POST">
|
||||
{% if user %}
|
||||
<p class="widget">
|
||||
<label for="submit">To finish editing</label>
|
||||
<input name="action" id="action" type="submit" class="action-dangerous" value="Logout!"/>
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="widget">
|
||||
<label for="username">Your username</label>
|
||||
<input name="username" id="username" type="text"/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="password">Your password</label>
|
||||
<input name="password" id="password" type="password"/>
|
||||
</p>
|
||||
<p class="widget">
|
||||
<label for="submit">To edit this wiki</label>
|
||||
<input name="action" id="action" type="submit" class="action" value="Login!"/>
|
||||
</p>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue