a fresh start :)
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}creating a topic{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Create topic</h1>
|
||||
<form method="post">
|
||||
<label for=name>Name</label>
|
||||
<input type="text" name="name" id="name" required><br>
|
||||
<label for="description">Description</label>
|
||||
<textarea id="description" name="description" required rows=5></textarea><br>
|
||||
<input type="submit" value="Create topic">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,16 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}creating a topic{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Editing topic {{ topic['name'] }}</h1>
|
||||
<form method="post">
|
||||
<label for=name>Name</label>
|
||||
<input type="text" name="name" id="name" required value="{{ topic['name'] }}"><br>
|
||||
<label for="description">Description</label>
|
||||
<textarea id="description" name="description" required rows=5>{{ topic['description'] }}</textarea><br>
|
||||
<input type="submit" value="Save changes">
|
||||
<a class="linkbutton warn" href={{ url_for("topics.topic", slug=topic['slug'] )}}>Cancel</a><br>
|
||||
<i> Note: to preserve history, you cannot change the topic URL.</i>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,20 +0,0 @@
|
||||
{% extends 'base.atom' %}
|
||||
{% from 'common/macros.html' import rss_html_content %}
|
||||
{% block title %}latest threads in {{target_topic.name}}{% endblock %}
|
||||
{% block canonical_link %}{{url_for('topics.topic', slug=target_topic.slug, _external=true)}}{% endblock %}
|
||||
{% block content %}
|
||||
<subtitle>{{ target_topic.description }}</subtitle>
|
||||
{% for thread in threads_list %}
|
||||
<entry>
|
||||
<title>[new thread] {{ thread.title | escape }}</title>
|
||||
<link href="{{ url_for('threads.thread', slug=thread.slug, _external=true)}}" />
|
||||
<link rel="replies" type="application/atom+xml" href="{{ url_for('threads.thread_atom', slug=thread.slug, _external=true)}}" />
|
||||
<id>{{ url_for('threads.thread', slug=thread.slug, _external=true)}}</id>
|
||||
<updated>{{ thread.created_at | iso8601 }}</updated>
|
||||
{{rss_html_content(thread.original_post_content)}}
|
||||
<author>
|
||||
<name>{{thread.started_by_display_name}} @{{ thread.started_by }}</name>
|
||||
</author>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -1,97 +0,0 @@
|
||||
{% from 'common/macros.html' import pager, timestamp, motd, rss_button %}
|
||||
{% from 'common/icons.html' import icn_lock, icn_sticky %}
|
||||
{% extends "base.html" %}
|
||||
{% block title %}browsing topic {{ topic['name'] }}{% endblock %}
|
||||
{% block content %}
|
||||
<nav class="darkbg">
|
||||
<h1 class="thread-title">All threads in "{{topic['name']}}"</h1>
|
||||
<span>{{topic['description']}}</span>
|
||||
<div class="thread-actions">
|
||||
{% if active_user %}
|
||||
{% if not (topic['is_locked']) | int or active_user.is_mod() %}
|
||||
<a class="linkbutton" href="{{ url_for("threads.create", topic_id=topic['id']) }}">New thread</a>
|
||||
{% endif %}
|
||||
{% if active_user.is_mod() %}
|
||||
<a class="linkbutton" href="{{url_for("topics.edit", slug=topic['slug'])}}">Edit topic</a>
|
||||
<form class="modform" method="post" action="{{url_for("topics.edit", slug=topic['slug']) }}">
|
||||
<input type="hidden" name="is_locked" value="{{ (not topic.is_locked) | int }}">
|
||||
<input class="warn" type="submit" id="lock" value="{{"Unlock topic" if topic['is_locked'] else "Lock topic"}}">
|
||||
</form>
|
||||
<button type="button" class="critical" id="topic-delete-dialog-open">Delete</button>
|
||||
{{ rss_button(url_for('topics.topic_atom', slug=topic.slug)) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% if topic['is_locked'] %}
|
||||
{{ infobox("This topic is locked.;Only moderators can create new threads.", InfoboxKind.INFO) }}
|
||||
{% endif %}
|
||||
|
||||
{%- with motds = get_motds() -%}
|
||||
{%- if motds -%}
|
||||
{%- for motd_obj in motds -%}
|
||||
{{- motd(motd_obj) -}}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endwith -%}
|
||||
|
||||
{% if threads_list | length == 0 %}
|
||||
<p>There are no threads in this topic.</p>
|
||||
{% else %}
|
||||
{% for thread in threads_list %}
|
||||
<div class="thread">
|
||||
<div class="thread-sticky-container contain-svg">
|
||||
{% if thread['is_stickied'] %}
|
||||
{{ icn_sticky(48) }}
|
||||
<i>Stickied</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="thread-info-container">
|
||||
<span class="thread-info-header">
|
||||
<span>
|
||||
<span class="thread-title"><a href="{{ url_for("threads.thread", slug=thread['slug']) }}">{{thread['title']}}</a>
|
||||
{% if thread['id'] in subscriptions %}
|
||||
({{ subscriptions[thread['id']] }} unread)
|
||||
{% endif %}
|
||||
</span>
|
||||
•
|
||||
<span>
|
||||
Started by <a href="{{ url_for("users.page", username=thread['started_by']) }}">{{ thread['started_by_display_name'] or thread['started_by'] }}</a> on {{ timestamp(thread['created_at']) }}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
Latest post by <a href="{{ url_for("users.page", username=thread['latest_post_username']) }}">{{ thread['latest_post_display_name'] or thread['latest_post_username'] }}</a>
|
||||
on <a href="{{ url_for("threads.thread", slug=thread['slug'], after=thread['latest_post_id']) }}">on {{ timestamp(thread['latest_post_created_at']) }}</a>:
|
||||
</span>
|
||||
<span class="thread-info-post-preview">
|
||||
{{ thread['latest_post_content'] | safe }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="thread-locked-container contain-svg">
|
||||
{% if thread['is_locked'] %}
|
||||
{{ icn_lock(48) }}
|
||||
<i>Locked</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<nav id="bottomnav">
|
||||
{{ pager(current_page = current_page, page_count = page_count) }}
|
||||
</nav>
|
||||
|
||||
<dialog id="delete-dialog">
|
||||
<div class="delete-dialog-inner">
|
||||
Are you sure you want to delete this topic?
|
||||
<span>
|
||||
<button id=topic-delete-dialog-close>Cancel</button>
|
||||
<button class="critical" form=topic-delete-form>Delete</button>
|
||||
<form id="topic-delete-form" method="post" action="{{ url_for("topics.delete", slug = topic.slug) }}"></form>
|
||||
</span>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<script src="{{ "/static/js/topic.js" | cachebust }}"></script>
|
||||
{% endblock %}
|
||||
@@ -1,51 +0,0 @@
|
||||
{% from 'common/icons.html' import icn_lock %}
|
||||
{% from 'common/macros.html' import timestamp, motd %}
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<nav class="darkbg">
|
||||
<h1 class="thread-title">All topics</h1>
|
||||
{% if active_user and active_user.is_mod() %}
|
||||
<a class="linkbutton" href={{ url_for("topics.create") }}>Create new topic</a>
|
||||
<a class="linkbutton" href={{ url_for("mod.sort_topics") }}>Sort topics</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{%- with motds = get_motds() -%}
|
||||
{%- if motds -%}
|
||||
{%- for motd_obj in motds -%}
|
||||
{{- motd(motd_obj) -}}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endwith -%}
|
||||
{% if topic_list | length == 0 %}
|
||||
<p>There are no topics.</p>
|
||||
{% else %}
|
||||
{% for topic in topic_list %}
|
||||
<div class="topic">
|
||||
<div class="topic-info-container">
|
||||
<a class="thread-title" href="{{ url_for("topics.topic", slug=topic['slug']) }}">{{ topic['name'] }}</a>
|
||||
{{ topic['description'] }}
|
||||
{% if topic['latest_thread_username'] %}
|
||||
<span>
|
||||
Latest thread: <a href="{{ url_for("threads.thread", slug=topic['latest_thread_slug'])}}">{{topic['latest_thread_title']}}</a> by <a href="{{url_for("users.page", username=topic['latest_thread_username'])}}">{{topic['latest_thread_display_name'] or topic['latest_thread_username']}}</a> on {{ timestamp(topic['latest_thread_created_at']) }}
|
||||
</span>
|
||||
{% if topic['id'] in active_threads %}
|
||||
{% with thread=active_threads[topic['id']] %}
|
||||
<span>
|
||||
Latest post in: <a href="{{ url_for("threads.thread", slug=thread['thread_slug'])}}">{{ thread['thread_title'] }}</a> by <a href="{{ url_for("users.page", username=thread['username'])}}">{{ thread['display_name'] or thread['username'] }}</a> at <a href="{{ get_post_url(thread.post_id, _anchor=true) }}">{{ timestamp(thread['post_created_at']) }}</a>
|
||||
</span>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<i>No threads yet.</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="topic-locked-container contain-svg">
|
||||
{% if topic['is_locked'] %}
|
||||
{{ icn_lock(48) }}
|
||||
<i>Locked</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user