switch to absolute times when old enough

This commit is contained in:
Ville Rantanen
2023-07-28 15:29:16 +03:00
parent f1c453d3d4
commit 7fe10f05a2
4 changed files with 48 additions and 39 deletions

View File

@@ -11,13 +11,18 @@
{%- endif -%}
</head>
<body>
<nav>
<div>
<span> &laquo; </span><a href="{{ url_for('index') }}">Forum Home</a>
<span> | </span><a href="{{ url_for('admin') }}">Admin panel</a>
</div>
</nav>
<main class=admin>
<h1>{{ title }}</h1>
<p>
<span> &laquo; </span><a href="{{ url_for('index') }}">Forum Home</a>
<span> | </span><a href="{{ url_for('admin') }}">Admin panel</a>
</p>
{%- for category, msg in get_flashed_messages(True) -%}
<p class="flash {{ category }}">{{ msg }}</p>
{%- endfor %}
{%- block content %}{% endblock -%}
</main>
</body>

View File

@@ -44,8 +44,8 @@
<h3>Add user</h3>
<form method=post action=user/new/>
<table>
<tr><td>Name</td><td><input type=text name=name></td></tr>
<tr><td>Password</td><td><input type=password name=password></td></tr>
<tr><td class=config_label>Name</td><td><input type=text name=name></td></tr>
<tr><td class=config_label>Password</td><td><input type=password name=password></td></tr>
</table>
<input type=submit value="Add user">
</form>
@@ -82,11 +82,11 @@
<form method=post action="forum/new/">
<table>
<tr>
<td>Name</td>
<td class=config_label>Name</td>
<td><input type=text name=name></td>
</tr>
<tr>
<td>Description</td>
<td class=config_label>Description</td>
<td><textarea name=description></textarea></td>
</tr>
</table>
@@ -99,27 +99,27 @@
<form action=config/edit/ method=post>
<table>
<tr>
<td>Server name</td>
<td class=config_label>Server name</td>
<td><input type=text name=server_name value="{{ config.server_name }}"></td>
</tr>
<tr>
<td>Server description</td>
<td class=config_label>Server description</td>
<td><textarea name=server_description>{{ config.server_description }}</textarea></td>
</tr>
<tr>
<td>Registration enabled</td>
<td class=config_label>Registration enabled</td>
<td><input name=registration_enabled type=checkbox {{ 'checked' if config.registration_enabled else '' }}></td>
</tr>
<tr>
<td>Login required</td>
<td class=config_label>Login required</td>
<td><input name=login_required type=checkbox {{ 'checked' if config.login_required else '' }}></td>
</tr>
<tr>
<td>Number of threads per page</td>
<td class=config_label>Number of threads per page</td>
<td><input type=number name=threads_per_page value="{{ config.threads_per_page }}"></td>
</tr>
<tr>
<td>User defined CSS file in static/ folder</td>
<td class=config_label>User defined CSS file in static/ folder</td>
<td><input type=text name=user_css value="{{ config.user_css }}"></td>
</tr>
</table>