a fresh start :)
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% from 'common/macros.html' import sortable_list, sortable_list_item %}
|
||||
{% block title %}managing bookmark collections{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Manage bookmark collections</h1>
|
||||
<p>Drag collections to reoder them. You cannot move or remove the default collection, but you can rename it.</p>
|
||||
<bitty-7-0 data-connect="{{ '/static/js/bitties/pyrom-bitty.js' | cachebust }} CollectionsEditor">
|
||||
<button type="button" data-send="addCollection">Add new collection</button>
|
||||
{% set sorted_collections = collections | sort(attribute='sort_order') %}
|
||||
{% macro collection_inner(collection) %}
|
||||
<input type="text" class="collection-name" value="{{collection.name}}" placeholder="Collection name" required autocomplete="off" maxlength="60">
|
||||
<div>{{ collection.get_threads_count() }} {{ "thread" | pluralize(num=collection.get_threads_count()) }}, {{ collection.get_posts_count() }} {{ "post" | pluralize(num=collection.get_posts_count()) }}</div>
|
||||
{% if collection.is_default %}
|
||||
<i>Default collection</i>
|
||||
{% else %}
|
||||
<button type="button" class="delete-button critical" data-send="deleteCollection">Delete</button>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% call() sortable_list(attr={'data-receive': 'addCollection' }) %}
|
||||
{% call() sortable_list_item(key='collections', immovable=true, attr={'data-collection-id': sorted_collections[0].id, 'data-receive': 'deleteCollection getCollectionData testValidity'}) %}
|
||||
{{ collection_inner(sorted_collections[0]) }}
|
||||
{% endcall %}
|
||||
{% for collection in sorted_collections[1:] %}
|
||||
{% call() sortable_list_item(key='collections', attr={'data-collection-id': collection.id, 'data-receive': 'deleteCollection getCollectionData testValidity'}) %}
|
||||
{{ collection_inner(collection) }}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
<button data-use="saveCollections" type="button" id="save-button" data-submit-href="{{ url_for('api.manage_bookmark_collections', user_id=active_user.id) }}">Save</button>
|
||||
</div>
|
||||
<template id="new-collection-template">
|
||||
{% call() sortable_list_item(key='collections', attr={'data-receive': 'deleteCollection getCollectionData testValidity'}) %}
|
||||
<input type="text" class="collection-name" value="" placeholder="Collection name" required autocomplete="off" maxlength="60">
|
||||
<div>0 threads, 0 posts</div>
|
||||
<button type="button" class="delete-button critical" data-send="deleteCollection">Delete</button>
|
||||
{% endcall %}
|
||||
</template>
|
||||
</bitty-7-0>
|
||||
{#<script src="{{ "/static/js/manage-bookmark-collections.js" | cachebust }}"></script>#}
|
||||
{% endblock %}
|
||||
@@ -1,52 +0,0 @@
|
||||
{% from "common/macros.html" import accordion, full_post, bookmark_button %}
|
||||
{% from "common/icons.html" import icn_bookmark %}
|
||||
{% extends "base.html" %}
|
||||
{% block title %}bookmarks{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg inbox-container">
|
||||
<a class="linkbutton" href="{{ url_for('users.bookmark_collections', username=get_active_user().username) }}">Manage collections</a>
|
||||
{% for collection in collections | sort(attribute='sort_order') %}
|
||||
{% call(section) accordion(disabled=collection.is_empty()) %}
|
||||
{% if section == 'header' %}
|
||||
<h1 class="thread-title">{{ collection.name }}</h1>{{" (no bookmarks)" if collection.is_empty() else ""}}
|
||||
{% else %}
|
||||
{% call(inner_section) accordion(disabled=not collection.has_threads()) %}
|
||||
{% if inner_section == 'header' %}
|
||||
Threads{{" (no bookmarks)" if not collection.has_threads() else ""}}
|
||||
{% else %}
|
||||
<table class="colorful-table">
|
||||
<thead>
|
||||
<th>Title</th>
|
||||
<th>Memo</th>
|
||||
<th class="small">Manage</th>
|
||||
</thead>
|
||||
{% for thread in collection.get_threads() %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ url_for('threads.thread', slug=thread.get_thread().slug) }}">{{ thread.get_thread().title }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<i>{{ thread.note }}</i>
|
||||
</td>
|
||||
<td>
|
||||
{{ bookmark_button(type='thread', id=thread.thread_id, message='Manage…', require_reload=true) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% call(inner_section) accordion(disabled=not collection.has_posts()) %}
|
||||
{% if inner_section == 'header' %}
|
||||
Posts{{" (no bookmarks)" if not collection.has_posts() else ""}}
|
||||
{% else %}
|
||||
{% for post in collection.get_posts() %}
|
||||
{{ full_post(post.get_post().get_full_post_view(), no_reply=false, render_sig=false, show_thread_title=true, show_bookmark=true, memo=post.note, bookmark_message="Manage…", reload_after_bookmark=true) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}delete confirmation{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Confirm account deletion</h1>
|
||||
<p>Are you sure you want to delete your account on {{ config.SITE_NAME }}? <strong>This action is irreversible.</strong> Your posts and threads will remain accessible to preserve history but will be de-personalized, showing up as authored by a system user. Posts that @mention you will also mention the system user instead.</p>
|
||||
<p>If you wish for any and all content relating to you to be removed, you will have to <a href="{{url_for("guides.contact")}}" target="_blank">contact {{ config.SITE_NAME }}'s administrators separately.</a></p>
|
||||
<p>If you are sure, please confirm your current password below.</p>
|
||||
<form method="post">
|
||||
<label for="password">Confirm password</label>
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password">
|
||||
<input class="critical" type="submit" value="Delete account">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,65 +0,0 @@
|
||||
{% from "common/macros.html" import timestamp, full_post, accordion %}
|
||||
{% extends "base.html" %}
|
||||
{% block title %}inbox{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg inbox-container">
|
||||
{% set has_subscriptions = all_subscriptions is not none %}
|
||||
{% call(section) accordion(disabled=not has_subscriptions) %}
|
||||
{% if section == "header" %}
|
||||
{% if not has_subscriptions %}
|
||||
(You have no subscriptions)
|
||||
{% else %}
|
||||
Your subscriptions
|
||||
{% endif %}
|
||||
{% elif section == "content" and has_subscriptions %}
|
||||
<table class="colorful-table">
|
||||
<thead>
|
||||
<th>Thread</th>
|
||||
<th class="small">Unsubscribe</th>
|
||||
</thead>
|
||||
{% for sub in all_subscriptions %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href=" {{ url_for("threads.thread", slug=sub.thread_slug) }} ">{{ sub.thread_title }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<form class="modform" method="post" action="{{ url_for("threads.subscribe", slug = sub.thread_slug) }}">
|
||||
<input type="hidden" name="subscribe" value="unsubscribe">
|
||||
<input class="warn" type="submit" value="Unsubscribe">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% if has_subscriptions %}
|
||||
{% if not new_posts %}
|
||||
You have no unread posts.
|
||||
{% else %}
|
||||
You have {{ total_unreads_count }} total unread {{("post" | pluralize(num=total_unreads_count))}}:
|
||||
{% for thread in new_posts %}
|
||||
{% call(section) accordion() %}
|
||||
{% if section == "header" %}
|
||||
{% set latest_post_id = thread.posts[-1].id %}
|
||||
{% set unread_posts_text = " (" + (thread.unread_count | string) + (" unread post" | pluralize(num=thread.unread_count)) %}
|
||||
<a class="accordion-title" href="{{ url_for("threads.thread", slug=thread.thread_slug, after=latest_post_id, _anchor="post-" + (latest_post_id | string)) }}" title="Jump to latest post">{{thread.thread_title + unread_posts_text}}, latest at {{ timestamp(thread.newest_post_time) }})</a>
|
||||
<form class="modform" method="post" action="{{ url_for("threads.subscribe", slug = thread.thread_slug) }}">
|
||||
<input type="hidden" name="subscribe" value="read">
|
||||
<input type="submit" value="Mark thread as Read">
|
||||
</form>
|
||||
<form class="modform" method="post" action="{{ url_for("threads.subscribe", slug = thread.thread_slug) }}">
|
||||
<input type="hidden" name="subscribe" value="unsubscribe">
|
||||
<input class="warn" type="submit" value="Unsubscribe">
|
||||
</form>
|
||||
{% elif section == "content" %}
|
||||
{% for post in thread.posts %}
|
||||
{{ full_post(post, no_reply = true) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,36 +0,0 @@
|
||||
{% from 'common/macros.html' import accordion %}
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}invites{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg inbox-container">
|
||||
<p>To manage growth, {{ config.SITE_NAME }} disallows direct sign ups. Instead, users already with an account may invite people they know. You can create invite links here. Once an invite link is used to sign up, it can no longer be used.</p>
|
||||
{% call(section) accordion(disabled=invites | length == 0) %}
|
||||
{% if section == 'header' %}
|
||||
Your invites
|
||||
{% else %}
|
||||
{% if invites %}
|
||||
<table class="colorful-table">
|
||||
<thead>
|
||||
<th class='small'>Link</th>
|
||||
<th class='small'>Revoke</th>
|
||||
</thead>
|
||||
{% for invite in invites %}
|
||||
<tr>
|
||||
<td><a href="{{url_for('users.sign_up', key=invite.key)}}">Link</a></td>
|
||||
<td>
|
||||
<form method="post" action="{{ url_for('users.revoke_invite_link', username=active_user.username) }}">
|
||||
<input type=hidden value="{{ invite.key }}" name="key">
|
||||
<input type=submit class=warn value="Revoke">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
<form method="post" action="{{ url_for('users.create_invite_link', username=active_user.username) }}">
|
||||
<input type=submit value="Create new invite">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,14 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Log in{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Log in</h1>
|
||||
<form method="post">
|
||||
<label for="username">Username</label><br>
|
||||
<input type="text" id="username" name="username" required autocomplete="username"><br>
|
||||
<label for="password">Password</label><br>
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password"><br>
|
||||
<input type="submit" value="Log in">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Reset password{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Reset password for {{username}}</h1>
|
||||
<p>Send this link to {{username}} to allow them to reset their password.</p>
|
||||
<form method="post">
|
||||
<label for="password">New password</label><br>
|
||||
<input type="password" id="password" name="password" autocomplete="new-password" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required><br>
|
||||
<label for="password2">Confirm password</label><br>
|
||||
<input type="password" id="password2" name="password2" autocomplete="new-password" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required><br>
|
||||
<input type="submit" value="Reset password">
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,79 +0,0 @@
|
||||
{% from 'common/macros.html' import babycode_editor_component, badge_editor_single, sortable_list %}
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}settings{% endblock %}
|
||||
{% block content %}
|
||||
{% set disable_avatar = not is_logged_in() %}
|
||||
<div class='darkbg'>
|
||||
<h1>User settings</h1>
|
||||
<div class="settings-grid">
|
||||
<fieldset class="hfc">
|
||||
<legend>Set avatar</legend>
|
||||
<form class='avatar-form' method='post' action='{{ url_for('users.set_avatar', username=active_user.username) }}' enctype='multipart/form-data'>
|
||||
<img src='{{ active_user.get_avatar_url() }}'>
|
||||
<input id='file' type='file' name='avatar' accept='image/*' required>
|
||||
<div>
|
||||
<input type='submit' value='Save avatar' {{ 'disabled' if disable_avatar else '' }}>
|
||||
<input type='submit' value='Clear avatar' formaction='{{ url_for('users.clear_avatar', username=active_user.username) }}' formnovalidate {{ 'disabled' if active_user.is_default_avatar() else '' }}>
|
||||
</div>
|
||||
<span>1MB maximum size. Avatar will be cropped to square.</span>
|
||||
</form>
|
||||
</fieldset>
|
||||
<fieldset class="hfc">
|
||||
<legend>Change password</legend>
|
||||
<form method='post' action='{{ url_for('users.change_password', username=active_user.username) }}'>
|
||||
<label for="new_password">New password</label><br>
|
||||
<input type="password" id="new_password" name="new_password" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required autocomplete="new-password"><br>
|
||||
<label for="new_password2">Confirm new password</label><br>
|
||||
<input type="password" id="new_password2" name="new_password2" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required autocomplete="new-password"><br>
|
||||
<input class="warn" type="submit" value="Change password">
|
||||
</form>
|
||||
</fieldset>
|
||||
<fieldset class="hfc">
|
||||
<legend>Personalization</legend>
|
||||
<form method='post'>
|
||||
<label for='theme'>Theme (beta)</label>
|
||||
<select autocomplete='off' id='theme' name='theme'>
|
||||
{% for theme in config.allowed_themes %}
|
||||
<option value="{{ theme }}" {{ 'selected' if get_prefers_theme() == theme }}>{{ theme | theme_name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<label for='topic_sort_by'>Sort threads by:</label>
|
||||
<select id='topic_sort_by' name='topic_sort_by'>
|
||||
<option value='activity' {{ 'selected' if session['sort_by'] == 'activity' else '' }}>Latest activity</option>
|
||||
<option value='thread' {{ 'selected' if session['sort_by'] == 'thread' else '' }}>Thread creation date</option>
|
||||
</select>
|
||||
<label for='display_name'>Display name</label>
|
||||
<input type='text' id='display_name' name='display_name' value='{{ active_user.display_name }}' pattern="(?:[\w!#$%^*\(\)\-_=+\[\]\{\}\|;:,.?\s]{3,50})?" title='3-50 characters, no @, no <>, no &' placeholder='Optional. Will be shown in place of username.' autocomplete='off'></input>
|
||||
<label for='status'>Status</label>
|
||||
<input type='text' id='status' name='status' value='{{ active_user.status }}' maxlength=100 placeholder='Will be shown under your name. Max 100 characters.'>
|
||||
<input autocomplete='off' type='checkbox' id='subscribe_by_default' name='subscribe_by_default' {{ 'checked' if session.get('subscribe_by_default', default=true) else '' }}>
|
||||
<label for='subscribe_by_default'>Subscribe to thread by default when responding</label><br>
|
||||
<label for='babycode-content'>Signature</label>
|
||||
{{ babycode_editor_component(ta_name='signature', prefill=active_user.signature_original_markup, ta_placeholder='Will be shown under each of your posts', optional=true, banned_tags=SIG_BANNED_TAGS) }}
|
||||
<input type='submit' value='Save settings'>
|
||||
</form>
|
||||
</fieldset>
|
||||
<fieldset class="hfc">
|
||||
<legend>Badges</legend>
|
||||
<a href="{{ url_for('guides.guide_page', category='user-guides', slug='settings', _anchor='badges')}}">Badges help</a>
|
||||
<bitty-7-0 data-connect="{{ '/static/js/bitties/pyrom-bitty.js' | cachebust }} BadgeEditorForm" data-listeners="click input submit change">
|
||||
<form data-use="badgeEditorPrepareSubmit" data-init='loadBadgeEditor' method='post' enctype='multipart/form-data' action='{{ url_for('users.save_badges', username=active_user.username) }}'>
|
||||
<div>Loading badges…</div>
|
||||
<div>If badges fail to load, JS may be disabled.</div>
|
||||
</form>
|
||||
</bitty-7-0>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
<a class="linkbutton critical" href="{{ url_for('users.delete_page', username=active_user.username) }}">Delete account</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template id='badge-editor-template'>
|
||||
{{ badge_editor_single(options=uploads) }}
|
||||
</template>
|
||||
|
||||
<template id="badges-list-template">
|
||||
{{ sortable_list(attr={'data-receive': 'addBadge'}) }}
|
||||
</template>
|
||||
{% endblock %}
|
||||
@@ -1,25 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Sign up{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1>Sign up</h1>
|
||||
{% if inviter %}
|
||||
<p>You have been invited by <a href="{{ url_for('users.page', username=inviter.username) }}">{{ inviter.get_readable_name() }}</a> to join {{ config.SITE_NAME }}. Create an identity below.</p>
|
||||
{% endif %}
|
||||
<form method="post">
|
||||
{% if key %}
|
||||
<input type="hidden" value={{key}} name="key">
|
||||
{% endif %}
|
||||
<label for="username">Username</label><br>
|
||||
<input type="text" id="username" name="username" pattern="[a-zA-Z0-9_-]{3,20}" title="3-20 characters. Only upper and lowercase letters, digits, hyphens, and underscores" required autocomplete="username"><br>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,255}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required autocomplete="new-password"><br>
|
||||
<label for="password-confirm">Confirm Password</label>
|
||||
<input type="password" id="password-confirm" name="password-confirm" pattern="(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])(?!.*\s).{10,255}" title="10+ chars with: 1 uppercase, 1 lowercase, 1 number, 1 special char, and no spaces" required autocomplete="new-password"><br>
|
||||
<input type="submit" value="Sign up">
|
||||
</form>
|
||||
{% if not inviter %}
|
||||
<span>After you sign up, a moderator will need to confirm your account before you will be allowed to post.</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,101 +0,0 @@
|
||||
{% from 'common/macros.html' import timestamp, badge_button %}
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}{{ target_user.get_readable_name() }}'s profile{% endblock %}
|
||||
{% block content %}
|
||||
<div class="darkbg">
|
||||
<h1 class="thread-title"><i>{{ target_user.get_readable_name() }}</i>'s profile</h1>
|
||||
{% if active_user.id == target_user.id %}
|
||||
<div class="user-actions">
|
||||
<a class="linkbutton" href="{{ url_for("users.settings", username = active_user.username) }}">Settings</a>
|
||||
<form method="post" action="{{ url_for("users.log_out") }}">
|
||||
<input class="warn" type="submit" value="Log out">
|
||||
</form>
|
||||
</div>
|
||||
{% if active_user.is_guest() %}
|
||||
<h2>You are a guest. A Moderator needs to approve your account before you will be able to post.</h2>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if active_user and active_user.is_mod() and not target_user.is_system() %}
|
||||
<h1 class="thread-title">Moderation controls</h1>
|
||||
{% if target_user.is_guest() %}
|
||||
<p>This user is a guest. They signed up on {{ timestamp(target_user['created_at']) }}</p>
|
||||
<form class="modform" method="post" action="{{ url_for("users.confirm_user", user_id=target_user.id) }}">
|
||||
<input type="submit" value="Confirm user">
|
||||
</form>
|
||||
{% else %}
|
||||
<p>This user signed up on {{ timestamp(target_user['created_at']) }} and was confirmed on {{ timestamp(target_user['confirmed_on']) }}</p>
|
||||
{% if (target_user.permission | int) < (active_user.permission | int) %}
|
||||
<form class="modform" method="post" action="{{ url_for("users.guest_user", user_id=target_user.id) }}">
|
||||
<input class="warn" type="submit" value="Demote user to guest (soft ban)">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if active_user.is_admin() and not target_user.is_mod() %}
|
||||
<form class="modform" method="post" action="{{ url_for("users.mod_user", user_id=target_user.id) }}">
|
||||
<input class="warn" type="submit" value="Promote user to moderator">
|
||||
</form>
|
||||
{% elif target_user.is_mod() and (target_user.permission | int) < (active_user.permission | int) %}
|
||||
<form class="modform" method="post" action="{{ url_for("users.demod_user", user_id=target_user.id) }}">
|
||||
<input class="critical" type="submit" value="Demote user to regular user">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<div class="user-page-usercard">
|
||||
<div class="usercard-inner">
|
||||
<img class="avatar" src="{{ target_user.get_avatar_url() }}">
|
||||
<strong class="big">{{ target_user.get_readable_name() }}</strong>
|
||||
<em><abbr title="Mention">@{{ target_user.username }}</abbr></em>
|
||||
{% if target_user.status %}
|
||||
<em class="user-status">{{ target_user.status }}</em>
|
||||
{% endif %}
|
||||
{% if target_user.signature_rendered %}
|
||||
Signature:
|
||||
<div>{{ target_user.signature_rendered | safe }}</div>
|
||||
{% endif %}
|
||||
<div class="badges-container">
|
||||
{% for badge in target_user.get_badges() %}
|
||||
{{ badge_button(badge) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-page-stats">
|
||||
{% with stats = target_user.get_post_stats() %}
|
||||
<ul class="user-stats-list">
|
||||
<li>Permission: {{ target_user.permission | permission_string }}</li>
|
||||
<li>Posts created: {{ stats.post_count }}</li>
|
||||
<li>Threads started: {{ stats.thread_count }}</li>
|
||||
{% if stats.latest_thread_title %}
|
||||
<li>Latest started thread: <a href="{{ url_for("threads.thread", slug = stats.latest_thread_slug) }}">{{ stats.latest_thread_title }}</a>
|
||||
{% endif %}
|
||||
{% if stats.inviter_username %}
|
||||
<li>Invited by <a href="{{ url_for('users.page', username=stats.inviter_username) }}">{{ stats.inviter_display_name or stats.inviter_username }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endwith %}
|
||||
Latest posts:
|
||||
{% with posts = target_user.get_latest_posts() %}
|
||||
<div class="user-page-posts">
|
||||
{% for post in posts %}
|
||||
<div class="post-content-container">
|
||||
<div class="post-info">
|
||||
<a href="{{ url_for("threads.thread", slug=post.thread_slug, after=post.id) }}" title="permalink"><i>
|
||||
{% if (post.edited_at | int) > (post.created_at | int) %}
|
||||
Edited on {{ timestamp(post.edited_at) }}
|
||||
{% else %}
|
||||
Posted on {{ timestamp(post.edited_at) }}
|
||||
{% endif %}
|
||||
</i></a>
|
||||
</div>
|
||||
<div class="post-content user-page-post-preview">
|
||||
<div class="post-inner wider">{{ post.content | safe }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user