UI polish: global modern styles; Admin button pinned top-left across app and generated pages; index redirects to login for guests
This commit is contained in:
40
templates/admin.html
Normal file
40
templates/admin.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
<h1>Публикация HTML-страниц</h1>
|
||||
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<label for="html">HTML-код</label>
|
||||
<textarea id="html" name="html" placeholder="<h1>Заголовок</h1>\n<p>Мой контент...</p>" required></textarea>
|
||||
</div>
|
||||
<button class="btn" type="submit">Опубликовать</button>
|
||||
<span class="muted">После публикации создаётся ссылка с UUID.</span>
|
||||
</form>
|
||||
|
||||
<h2 style="margin-top:2rem;">Опубликованные страницы</h2>
|
||||
{% if pages %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>UUID</th>
|
||||
<th>Ссылка</th>
|
||||
<th>Создано</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for p in pages %}
|
||||
<tr>
|
||||
<td>{{ p.id }}</td>
|
||||
<td><code>{{ p.uuid }}</code></td>
|
||||
<td><a href="{{ base_url }}/p/{{ p.uuid }}" target="_blank">{{ base_url }}/p/{{ p.uuid }}</a></td>
|
||||
<td>{{ p.created_at }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="muted">Страниц пока нет.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user