mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
wcag - various
This commit is contained in:
parent
bc63e773e1
commit
23637b713a
33 changed files with 74 additions and 74 deletions
|
@ -401,7 +401,7 @@ function setupKeyboardShortcuts() {
|
|||
didSomething = true;
|
||||
}
|
||||
} else if (event.key === 'Enter') {
|
||||
if(currentPost) {
|
||||
if(currentPost && document.activeElement.tagName !== 'a') {
|
||||
currentPost.querySelector('.post_teaser_title_a').click();
|
||||
didSomething = true;
|
||||
}
|
||||
|
|
|
@ -401,7 +401,7 @@ body {
|
|||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
nav.navbar {
|
||||
div.navbar {
|
||||
border-bottom: 1px solid rgba(0, 40, 100, 0.12);
|
||||
min-height: 60px;
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ nav.navbar {
|
|||
}
|
||||
|
||||
.domain_link {
|
||||
color: #bbb;
|
||||
color: #777;
|
||||
font-size: 73%;
|
||||
}
|
||||
.domain_link a {
|
||||
|
|
|
@ -8,7 +8,7 @@ body {
|
|||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
nav.navbar {
|
||||
div.navbar {
|
||||
border-bottom: 1px solid rgba(0, 40, 100, 0.12);
|
||||
min-height: 60px;
|
||||
}
|
||||
|
@ -181,10 +181,10 @@ nav.navbar {
|
|||
}
|
||||
|
||||
.domain_link {
|
||||
color: $grey;
|
||||
color: #777;
|
||||
font-size: 73%;
|
||||
a {
|
||||
color: $dark-grey;
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
||||
{% if prev_url %}
|
||||
<a href="{{ prev_url }}" class="btn btn-primary" rel="nofollow">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
||||
{% if prev_url %}
|
||||
<a href="{{ prev_url }}" class="btn btn-primary">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
||||
{% if prev_url %}
|
||||
<a href="{{ prev_url }}" class="btn btn-primary">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
||||
{% if prev_url %}
|
||||
<a href="{{ prev_url }}" class="btn btn-primary">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
|
|
@ -91,11 +91,11 @@
|
|||
{% endblock %}
|
||||
</head>
|
||||
<body class="d-flex flex-column{{ ' low_bandwidth' if low_bandwidth }}">
|
||||
<a href="#outer_container" class="skip-link" role="navigation" aria-label="Skip main navigation">Skip to main content</a>
|
||||
<a href="#outer_container" class="skip-link" role="navigation" aria-label="Skip main navigation" tabindex="">Skip to main content</a>
|
||||
<!-- Page content -->
|
||||
{% block navbar %}
|
||||
<nav class="navbar navbar-expand-lg">
|
||||
<div class="{{ 'container-lg' if post_layout != 'masonry_wide' else 'container-fluid' }}">
|
||||
<div class="navbar navbar-expand-lg">
|
||||
<div class="{{ 'container-lg' if post_layout != 'masonry_wide' else 'container-fluid' }}" role="banner">
|
||||
<a class="navbar-brand" href="/">{% if not low_bandwidth %}<img src="/static/images/logo2.png" alt="Logo" width="50" height="50" />{% endif %}{{ g.site.name }}</a>
|
||||
{% if current_user.is_authenticated %}
|
||||
<a class="nav-link d-lg-none" href="/notifications" aria-label="{{ _('Notifications') }}">
|
||||
|
@ -115,14 +115,14 @@
|
|||
<ul class="nav navbar-nav ml-md-4">
|
||||
{% if current_user.is_anonymous %}
|
||||
<li class="nav-item dropdown{% if active_parent == 'home' %} active{% endif %}">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/home" role="button" aria-haspopup="true" aria-expanded="false">{{ _('Home') }}</a>
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/home" aria-haspopup="true" aria-expanded="false">{{ _('Home') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item{% if active_child == 'popular' %} active{% endif %}" href="/home"><span class="fe fe-home"></span>{{ _('Home') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'popular' %} active{% endif %}" href="/popular"><span class="fe fe-popular"></span>{{ _('Popular') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'all_posts' %} active{% endif %}" href="/all"><span class="fe fe-all"></span>{{ _('All posts') }}</a></li>
|
||||
</ul>
|
||||
<li class="nav-item dropdown{% if active_parent == 'communities' %} active{% endif %}">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/communities" role="button" aria-haspopup="true" aria-expanded="false">{{ _('Communities') }}</a>
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/communities" aria-haspopup="true" aria-expanded="false">{{ _('Communities') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item{% if active_child == 'list_communities' %} active{% endif %}" href="/communities">{{ _('Browse all') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'list_topics' %} active{% endif %}" href="/topics">{{ _('By topic') }}</a></li>
|
||||
|
@ -133,14 +133,14 @@
|
|||
<li class="nav-item"><a class="nav-link" href="/donate">{{ _('Donate') }}</a></li>
|
||||
{% else %}
|
||||
<li class="nav-item dropdown{% if active_parent == 'home' %} active{% endif %}">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/home" role="button" aria-haspopup="true" aria-expanded="false">{{ _('Home') }}</a>
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/home" aria-haspopup="true" aria-expanded="false">{{ _('Home') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item{% if active_child == 'popular' %} active{% endif %}" href="/home"><span class="fe fe-home"></span>{{ _('Home') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'popular' %} active{% endif %}" href="/popular"><span class="fe fe-popular"></span>{{ _('Popular') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'all_posts' %} active{% endif %}" href="/all"><span class="fe fe-all"></span>{{ _('All posts') }}</a></li>
|
||||
</ul>
|
||||
<li class="nav-item dropdown{% if active_parent == 'communities' %} active{% endif %}">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/communities" role="button" aria-haspopup="true" aria-expanded="false">{{ _('Communities') }}</a>
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/communities" aria-haspopup="true" aria-expanded="false">{{ _('Communities') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item{% if active_child == 'list_communities' %} active{% endif %}" href="/communities">{{ _('Browse all') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'list_topics' %} active{% endif %}" href="/topics">{{ _('By topic') }}</a></li>
|
||||
|
@ -159,7 +159,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="nav-item dropdown{% if active_parent == 'account' %} active{% endif %}">
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/u/{{ current_user.user_name }}" role="button" aria-haspopup="true" aria-expanded="false">{{ _('Account') }}</a>
|
||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="/u/{{ current_user.user_name }}" aria-haspopup="true" aria-expanded="false">{{ _('Account') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item{% if active_child == 'view_profile' %} active{% endif %}" href="/u/{{ current_user.user_name }}">{{ _('View profile') }}</a></li>
|
||||
<li><a class="dropdown-item{% if active_child == 'edit_profile' %} active{% endif %}" href="/u/{{ current_user.user_name }}/profile">{{ _('Edit profile') }}</a></li>
|
||||
|
@ -182,17 +182,17 @@
|
|||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item"><a class="nav-link" id="light_mode" aria-label="{{ _('Light mode') }}"><span class="fe fe-sun" title="{{ _('Light mode') }}"></span></a></li>
|
||||
<li class="nav-item"><a class="nav-link" id="dark_mode" aria-label="{{ _('Dark mode') }}"><span class="fe fe-moon" title="{{ _('Dark mode') }}"></span></a></li>
|
||||
<li class="nav-item" aria-label="{{ _('Light mode') }}"><a class="nav-link" id="light_mode" href="#" tabindex=""><span class="fe fe-sun" title="{{ _('Light mode') }}"></span></a></li>
|
||||
<li class="nav-item" aria-label="{{ _('Dark mode') }}"><a class="nav-link" id="dark_mode" href="#" tabindex=""><span class="fe fe-moon" title="{{ _('Dark mode') }}"></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="outer_container" class="{{ 'container-lg' if post_layout != 'masonry_wide' else 'container-fluid' }} flex-shrink-0">
|
||||
<div id="outer_container" class="{{ 'container-lg' if post_layout != 'masonry_wide' else 'container-fluid' }} flex-shrink-0" role="main">
|
||||
{% with messages = get_flashed_messages(with_categories=True) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
|
@ -204,7 +204,7 @@
|
|||
{# application content needs to be provided in the app_content block #}
|
||||
{% block app_content %}{% endblock %}
|
||||
</div>
|
||||
<footer class="footer mt-auto">
|
||||
<footer class="footer mt-auto" role="contentinfo">
|
||||
<p id="timeSpent" class="text-center mt-4" title="This is how long you have spent using PieFed during this month. We hope this use of your time aligns with your priorities and values."></p>
|
||||
{% if not low_bandwidth %}
|
||||
<p class="text-center mt-4"><a href="https://liberapay.com/PieFed/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="card mt-5">
|
||||
<div class="card-body p-6">
|
||||
<div class="card-title">{{ _('Create community') }}</div>
|
||||
<form method="post" enctype="multipart/form-data" id="add_local_community_form">
|
||||
<form method="post" enctype="multipart/form-data" id="add_local_community_form" role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.community_name) }}
|
||||
<div class="form-group">{{ form.url.label(class_="form-control-label required") }}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12 col-md-8 position-relative main_pane">
|
||||
<h1>{{ _('Create post') }}</h1>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<form method="post" enctype="multipart/form-data" role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.communities) }}
|
||||
<nav id="post_type_chooser">
|
||||
|
@ -95,7 +95,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h2>{{ community.title }}</h2>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<img class="community_icon_big bump_up rounded-circle" src="{{ community.icon_image() }}" />
|
||||
<img class="community_icon_big bump_up rounded-circle" src="{{ community.icon_image() }}" alt="Community icon" />
|
||||
<h1 class="mt-2">{{ community.title }}
|
||||
{% if current_user.is_authenticated %}
|
||||
{% include 'community/_notification_toggle.html' %}
|
||||
|
@ -36,7 +36,7 @@
|
|||
</ol>
|
||||
</nav>
|
||||
<div class="col-2">
|
||||
<img class="community_icon_big rounded-circle" src="{{ community.icon_image() }}" />
|
||||
<img class="community_icon_big rounded-circle" src="{{ community.icon_image() }}" alt="Community icon" />
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<h1 class="mt-3">{{ community.title }}
|
||||
|
@ -82,7 +82,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
||||
{% if prev_url %}
|
||||
<a href="{{ prev_url }}" class="btn btn-primary" rel='nofollow'>
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
@ -96,7 +96,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
@ -152,7 +152,7 @@
|
|||
<ul class="list-group list-group-flush">
|
||||
{% for community in related_communities %}
|
||||
<li class="list-group-item">
|
||||
<a href="/c/{{ community.link() }}"><img src="{{ community.icon_image() }}" class="community_icon rounded-circle" loading="lazy" />
|
||||
<a href="/c/{{ community.link() }}" aria-label="{{ _('Go to community') }}"><img src="{{ community.icon_image() }}" class="community_icon rounded-circle" loading="lazy" alt="" />
|
||||
{{ community.display_name() }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<p>Liberapay is preferred as it has lower fees.</p>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h2>{{ _('About %(site_name)s', site_name=g.site.name) }}</h2>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
||||
{% if prev_url %}
|
||||
<a href="{{ prev_url }}" class="btn btn-primary" rel="nofollow">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
@ -28,7 +28,7 @@
|
|||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<!-- <div class="card">
|
||||
<div class="card-body">
|
||||
<form method="get">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<ul class="list-group list-group-flush">
|
||||
{% for community in active_communities %}
|
||||
<li class="list-group-item">
|
||||
<a href="/c/{{ community.link() }}"><img src="{{ community.icon_image() }}" class="community_icon rounded-circle" loading="lazy" />
|
||||
<a href="/c/{{ community.link() }}"><img src="{{ community.icon_image() }}" class="community_icon rounded-circle" loading="lazy" alt="" />
|
||||
{{ community.display_name() }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h2>{{ _('About %(site_name)s', site_name=g.site.name) }}</h2>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% if topics %}
|
||||
<span class="mt-1 pl-4">
|
||||
<form method="get">Topic:
|
||||
<select name="topic_id" class="form-control-sm submit_on_change">
|
||||
<select name="topic_id" class="form-control-sm submit_on_change" aria-label="{{ _('Choose a topic to filter communities by') }}">
|
||||
<option value="0">All</option>
|
||||
{% for topic in topics %}
|
||||
<option value="{{ topic.id }}" {{ 'selected' if topic.id == topic_id }}>{{ topic.name }}</option>
|
||||
|
@ -44,23 +44,23 @@
|
|||
<table class="communities_table table table-striped table-hover w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> </th>
|
||||
<th scope="col" {% if not low_bandwidth %}colspan="2"{% endif %}>
|
||||
<th> </th>
|
||||
<th {% if not low_bandwidth %}colspan="2"{% endif %}>
|
||||
<a href="?sort_by=title{{ ' desc' if sort_by.text == 'community.title' }}" title="{{ _('Sort by name') }}" class="no-underline" rel="nofollow">{{ _('Community') }}
|
||||
<span class="{{ 'fe fe-chevron-up' if sort_by.text == 'community.title' }}{{ 'fe fe-chevron-down' if sort_by.text == 'community.title desc' }}"></span>
|
||||
</a>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<th>
|
||||
<a href="?sort_by=post_count{{ ' desc' if sort_by.text == 'community.post_count' }}" title="{{ _('Sort by post count') }}" class="no-underline" rel="nofollow">{{ _('Posts') }}
|
||||
<span class="{{ 'fe fe-chevron-up' if sort_by.text == 'community.post_count' }}{{ 'fe fe-chevron-down' if sort_by.text == 'community.post_count desc' }}"></span>
|
||||
</a>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<th>
|
||||
<a href="?sort_by=post_reply_count{{ ' desc' if sort_by.text == 'community.post_reply_count' }}" title="{{ _('Sort by reply count') }}" class="no-underline" rel="nofollow">{{ _('Comments') }}
|
||||
<span class="{{ 'fe fe-chevron-up' if sort_by.text == 'community.post_reply_count' }}{{ 'fe fe-chevron-down' if sort_by.text == 'community.post_reply_count desc' }}"></span>
|
||||
</a>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<th>
|
||||
<a href="?sort_by=last_active{{ ' desc' if sort_by.text == 'community.last_active' }}" title="{{ _('Sort by recent activity') }}" class="no-underline" rel="nofollow">{{ _('Active') }}
|
||||
<span class="{{ 'fe fe-chevron-up' if sort_by.text == 'community.last_active' }}{{ 'fe fe-chevron-down' if sort_by.text == 'community.last_active desc' }}"></span>
|
||||
</a>
|
||||
|
@ -83,10 +83,10 @@
|
|||
{% endif %}</td>
|
||||
{% if not low_bandwidth %}
|
||||
<td width="46">
|
||||
<a href="/c/{{ community.link() }}"><img src="{{ community.icon_image('tiny') }}" class="community_icon rounded-circle" loading="lazy" /></a>
|
||||
<a href="/c/{{ community.link() }}" aria-label="{{ _('View community') }}"><img src="{{ community.icon_image('tiny') }}" class="community_icon rounded-circle" loading="lazy" alt="" /></a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td scope="row" class="pl-0"><a href="/c/{{ community.link() }}">{{ community.display_name() }}</a></td>
|
||||
<td class="pl-0"><a href="/c/{{ community.link() }}" aria-label="{{ _('View community') }}">{{ community.display_name() }}</a></td>
|
||||
<td>{{ community.post_count }}</td>
|
||||
<td>{{ community.post_reply_count }}</td>
|
||||
<td>{{ moment(community.last_active).fromNow(refresh=True) }}</td>
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" height="50" loading="lazy" /></a>
|
||||
{% elif post.type == POST_TYPE_IMAGE %}
|
||||
{% if post.image_id %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" target="_blank"><img src="{{ post.image.thumbnail_url() }}"
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" aria-label="{{ _('View image') }}" target="_blank"><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" height="50" loading="lazy" /></a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}"><img src="{{ post.image.thumbnail_url() }}"
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" height="50" loading="lazy" /></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -34,16 +34,16 @@
|
|||
{% if post.url and 'youtube.com' in post.url %}
|
||||
<span class="fe fe-video"></span>
|
||||
{% endif %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" class="post_link">
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" class="post_link" aria-label="{{ _('Read article') }}">
|
||||
<img src="/static/images/external_link_black.svg" class="external_link_icon" alt="External link" />
|
||||
</a>
|
||||
<span class="domain_link">(<a href="/d/{{ post.domain_id }}">{{ post.domain.name }}</a>)</span>
|
||||
<span class="domain_link">(<a href="/d/{{ post.domain_id }}" aria-label="{{ _('All posts about this domain') }}">{{ post.domain.name }}</a>)</span>
|
||||
{% endif %}
|
||||
{% if post.reports and current_user.is_authenticated and post.community.is_moderator(current_user) %}
|
||||
<span class="red fe fe-report" title="{{ _('Reported. Check post for issues.') }}"></span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<span class="small">{% if show_post_community %}<strong><a href="/c/{{ post.community.link() }}">c/{{ post.community.name }}</a></strong>{% endif %}
|
||||
<span class="small">{% if show_post_community %}<strong><a href="/c/{{ post.community.link() }}" aria-label="{{ _('Go to community') }}">c/{{ post.community.name }}</a></strong>{% endif %}
|
||||
by {{ render_username(post.author) }} {{ moment(post.last_active if sort == 'active' else post.posted_at).fromNow() }}</span>
|
||||
|
||||
</div>
|
||||
|
@ -51,8 +51,8 @@
|
|||
</div>
|
||||
<div class="row utilities_row">
|
||||
<div class="col-6">
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}" aria-label="{{ _('View comments') }}"><span class="fe fe-reply"></span></a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}">{{ post.reply_count }}</a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}" aria-label="{{ _('View comments') }}"><span class="fe fe-reply"></span></a>
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}" aria-label="{{ _('View comments') }}">{{ post.reply_count }}</a>
|
||||
{% if post.type == POST_TYPE_IMAGE %}
|
||||
{% if post.image_id %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" class="preview_image" aria-label="{{ _('View image') }}"><span class="fe fe-magnify"></span></a>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12 col-md-8 position-relative main_pane">
|
||||
<h1>{{ _('Edit post') }}</h1>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<form method="post" enctype="multipart/form-data" role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.communities) }}
|
||||
<nav id="post_type_chooser">
|
||||
|
@ -116,7 +116,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<h2>{{ post.community.title }}</h2>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</ol>
|
||||
</nav>
|
||||
<h1 class="mt-2">{{ _('Delete %(username)s', username=user.link()) }}</h1>
|
||||
<form method='post'>
|
||||
<form method='post' role="form">
|
||||
<p class="btn-warning">{{ _('You are about to permanently delete the account with the username "<strong>%(username)s</strong>." This means your profile will disappear, pictures will be deleted. Text-based posts will stay but look like they are from someone named "deleted."', username=user.user_name) }}</p>
|
||||
<p>{{ _('Once you hit delete, nobody can use "%(username)s" as a username again. We are doing this so nobody pretends to be you.', username=user.user_name) }}</p>
|
||||
<p>{{ _("We will tell other websites (fediverse instances) that your account is gone. But it's up to them to decide what to do with any copies they have of your stuff. Some websites work differently than ours.") }}</p>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{% else %}
|
||||
<h1 class="mt-2">{{ _('Add filter') }}</h1>
|
||||
{% endif %}
|
||||
<form method='post'>
|
||||
<form method='post' role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.title) }}
|
||||
<h4>{{ _('Filter in these places') }}</h4>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</ol>
|
||||
</nav>
|
||||
<h1 class="mt-2">{{ _('Edit profile of %(name)s', name=user.user_name) }}</h1>
|
||||
<form method='post' enctype="multipart/form-data">
|
||||
<form method='post' enctype="multipart/form-data" role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.title) }}
|
||||
{{ render_field(form.email) }}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</ol>
|
||||
</nav>
|
||||
<h1 class="mt-2">{{ _('Change settings') }}</h1>
|
||||
<form method='post' enctype="multipart/form-data">
|
||||
<form method='post' enctype="multipart/form-data" role="form">
|
||||
{{ form.csrf_token() }}
|
||||
{{ render_field(form.newsletter) }}
|
||||
{{ render_field(form.ignore_bots) }}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<h1 class="mt-2">{{ _('Filters') }}</h1>
|
||||
<p>{{ _('Filters can hide posts that contain keywords you specify, either by making them less noticeable or invisible.') }}</p>
|
||||
{% if filters %}
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped" role="table">
|
||||
<tr>
|
||||
<th>{{ _('Name') }}</th>
|
||||
<th>{{ _('Keywords') }}</th>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<img class="community_icon_big bump_up rounded-circle" src="{{ user.avatar_image() }}" />
|
||||
<img class="community_icon_big bump_up rounded-circle" src="{{ user.avatar_image() }}" alt="{{ _('Profile pic') }}" />
|
||||
<h1 class="mt-2">{{ user.display_name() if user.is_local() else user.display_name() + ', ' + user.ap_id }}</h1>
|
||||
{% elif user.avatar_image() != '' %}
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<img class="community_icon_big rounded-circle" src="{{ user.avatar_image() }}" />
|
||||
<img class="community_icon_big rounded-circle" src="{{ user.avatar_image() }}" alt="{{ _('Profile pic') }}" />
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<h1 class="mt-3">{{ user.display_name() if user.is_local() else user.display_name() + ', ' + user.ap_id }}</h1>
|
||||
|
@ -38,7 +38,7 @@
|
|||
{% if current_user.is_authenticated %}
|
||||
<div class="profile_action_buttons">
|
||||
{% if user.matrix_user_id %}
|
||||
<a class="btn btn-primary" href="https://matrix.to/#/{{ user.matrix_user_id }}" rel="nofollow">{{ _('Send message') }}</a>
|
||||
<a class="btn btn-primary" href="https://matrix.to/#/{{ user.matrix_user_id }}" rel="nofollow" aria-label="{{ _('Send message with matrix chat') }}">{{ _('Send message') }}</a>
|
||||
{% endif %}
|
||||
{% if current_user.id != user.id %}
|
||||
{% if current_user.has_blocked_user(user.id) %}
|
||||
|
@ -60,7 +60,7 @@
|
|||
{% include 'post/_post_teaser.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="{{ _('Post pagination') }}" class="mt-4" role="navigation">
|
||||
{% if post_prev_url %}
|
||||
<a href="{{ post_prev_url }}" class="btn btn-primary">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
@ -83,7 +83,7 @@
|
|||
{% include 'post/_post_reply_teaser.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<nav aria-label="Pagination" class="mt-4">
|
||||
<nav aria-label="{{ _('Comment pagination') }}" class="mt-4" role="navigation">
|
||||
{% if replies_prev_url %}
|
||||
<a href="{{ replies_prev_url }}#comments" class="btn btn-primary">
|
||||
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
||||
|
@ -100,7 +100,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 side_pane">
|
||||
<div class="col-12 col-md-4 side_pane" role="complementary">
|
||||
{% if current_user.is_authenticated and current_user.id == user.id %}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
|
|
|
@ -26,7 +26,7 @@ import os
|
|||
def show_people():
|
||||
people = User.query.filter_by(ap_id=None, deleted=False, banned=False).all()
|
||||
return render_template('user/people.html', people=people, moderating_communities=moderating_communities(current_user.get_id()),
|
||||
joined_communities=joined_communities(current_user.get_id()))
|
||||
joined_communities=joined_communities(current_user.get_id()), title=_('People'))
|
||||
|
||||
|
||||
def show_profile(user):
|
||||
|
|
Loading…
Reference in a new issue