a fresh start :)

This commit is contained in:
2026-04-12 08:48:21 +03:00
parent 40219f2b54
commit af57e2f10c
64 changed files with 0 additions and 12402 deletions

View File

@@ -1,17 +0,0 @@
{% from 'common/macros.html' import babycode_editor_component %}
{% extends 'base.html' %}
{% block title %}editing MOTD{% endblock %}
{% block content %}
<div class="darkbg">
<h1>Edit Message of the Day</h1>
<p>The Message of the Day will show up on the main page and in every topic.</p>
<form method="POST">
<label for="title">Title</label>
<input name="title" id="title" type="text" required autocomplete="off" placeholder="Required" value="{{ current.title }}"><br>
<label for="body">Body</label>
{{ babycode_editor_component('body', ta_placeholder='MOTD body (required)', banned_tags=MOTD_BANNED_TAGS, prefill=current.body_original_markup) }}
<input type="submit" value="Save">
<input class="critical" type="submit" formaction="{{ url_for('mod.motd_delete') }}" value="Delete MOTD" formnovalidate {{"disabled" if not current else ""}}>
</form>
</div>
{% endblock %}

View File

@@ -1,12 +0,0 @@
{% extends "base.html" %}
{% block title %}moderation{% endblock %}
{% block content %}
<div class="darkbg">
<h1>Moderation actions</h1>
<ul>
<li><a href="{{ url_for('mod.user_list') }}">User list</a></li>
<li><a href="{{ url_for('mod.sort_topics') }}">Sort topics</a></li>
<li><a href="{{ url_for('mod.motd_editor') }}">Message of the Day</a></li>
</ul>
</div>
{% endblock %}

View File

@@ -1,20 +0,0 @@
{% extends "base.html" %}
{% from 'common/macros.html' import sortable_list, sortable_list_item %}
{% block content %}
<div class="darkbg">
<h1>Change topics order</h1>
<p>Drag topic titles to reoder them. Press "Save order" when done. The topics will appear to users in the order set here.</p>
<form method="post">
<input type=submit value="Save order">
{% call() sortable_list() %}
{% for topic in topics %}
{% call() sortable_list_item(key="topics") %}
<div class="thread-title">{{ topic.name }}</div>
<div>{{ topic.description }}</div>
<input type="hidden" name="topics[]" value="{{ topic.id }}" class="topic-input">
{% endcall %}
{% endfor %}
{% endcall %}
</form>
</div>
{% endblock %}

View File

@@ -1,69 +0,0 @@
{% from "common/macros.html" import timestamp, accordion %}
{% extends "base.html" %}
{% block content %}
<div class="darkbg inbox-container">
{% set guests = (users | selectattr('permission', 'eq', PermissionLevel.GUEST.value) | list) %}
{% set not_guests = (users | selectattr('permission', 'gt', PermissionLevel.GUEST.value) | list) %}
{% call(section) accordion(disabled=(guests | count==0)) %}
{% if section == "header" %}
<span>Unconfirmed guests</span>
{% elif section == "content" %}
<table class="colorful-table">
<thead>
<th>Username</th>
<th class="small">Signed up on</th>
</thead>
{% for user in guests %}
<tr>
<td>
<a href="{{url_for("users.page", username=user['username'])}}">{{user['username']}}
</a>
</td>
<td>
{{ timestamp(user.created_at) }}
</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endcall %}
{% call(section) accordion() %}
{% if section == "header" %}
<span>Other users</span>
{% elif section == "content" %}
<table class="colorful-table">
<thead>
<th>Username</th>
<th class="small">Permission</th>
<th class="small">Signed up on</th>
{% if active_user.is_admin() %}
<th class="small">Create password reset link</th>
{% endif %}
</thead>
{% for user in not_guests %}
<tr>
<td>
<a href="{{url_for("users.page", username=user['username'])}}">{{user['username']}}
</a>
</td>
<td>
{{ user.permission | permission_string }}
</td>
<td>
{{ timestamp(user.created_at) }}
</td>
{% if active_user.is_admin() %}
<td>
<form method="post" action="{{url_for('mod.create_reset_pass', user_id=user.id)}}">
<input type="submit" class="warn" value="Create password reset link">
</form>
</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endif %}
{% endcall %}
</div>
{% endblock %}