Add login/logout routes
This commit is contained in:
parent
d45d5c4284
commit
00bd1128d1
8 changed files with 107 additions and 12 deletions
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
{% block content %}
|
||||
<h1 id="firstHeading">{{ p.title }}</h1>
|
||||
<div class="preview-subtitle">Backlinks</div>
|
||||
<div class="preview-subtitle">{{ T('backlinks') }}</div>
|
||||
|
||||
{% if backlinks %}
|
||||
<ul>
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="placeholder">No other pages linking here. Is this page orphan?</p>
|
||||
<p class="placeholder">{{ T("backlinks-empty") }}</p>
|
||||
{% endif %}
|
||||
|
||||
<p>Back to <a href="{{ p.get_url() }}">{{ p.title }}</a>.</p>
|
||||
<p>{{ T("back-to") }} <a href="{{ p.get_url() }}">{{ p.title }}</a>.</p>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
<li><a href="/search/" title="{{ T('search') }}" rel="nofollow"><span class="material-icons">search</span></a></li>
|
||||
<li><a href="/p/random/" title="{{ T('random-page') }}" rel="nofollow"><span class="material-icons">shuffle</span></a></li>
|
||||
<li><a href="/create/" title="{{ T('new-note') }}" rel="nofollow"><span class="material-icons">create</span></a></li>
|
||||
<li><a href="/accounts/login/" title="{{ T('login') }}" rel="nofollow"><span class="material-icons">login</span></a></li>
|
||||
</ul>
|
||||
<div class="footer">
|
||||
<div class="footer-copyright">© 2020–2022 Sakuragasaki46.</div>
|
||||
|
|
|
|||
33
templates/login.html
Normal file
33
templates/login.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ T('login') }} – {{ app_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ T('login') }}</h1>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<div>
|
||||
<label>{{ T('username') }}:</label>
|
||||
<input type="text" name="username" />
|
||||
</div>
|
||||
<div>
|
||||
<label>{{ T('password') }}:</label>
|
||||
<input type="password" name="password" />
|
||||
</div>
|
||||
<div>
|
||||
<label>{{ T('remember-me-for') }}</label>
|
||||
<select name="remember">
|
||||
<option value="0">This session only</option>
|
||||
<option value="7">A week</option>
|
||||
<option value="30">A month</option>
|
||||
<option value="365">A year</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="{{ T('login') }}" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p>{{ T('no-account-sign-up') }}</p>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue