shelve .a11y in favor of aria-label, add admin link on top, fix a bug that makes impressum mandatory
This commit is contained in:
parent
b821f39bbf
commit
8361890d4a
8 changed files with 37 additions and 36 deletions
|
|
@ -39,7 +39,7 @@ class AppConfig(ConfigOptions):
|
|||
private_assets = ConfigValue(cast=ssv_list)
|
||||
jquery_url = ConfigValue(default='https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js')
|
||||
app_is_behind_proxy = ConfigValue(cast=bool, default=False)
|
||||
impressum = ConfigValue(cast=twocolon_list, default=None)
|
||||
impressum = ConfigValue(cast=twocolon_list, default='')
|
||||
|
||||
app_config = AppConfig()
|
||||
|
||||
|
|
|
|||
|
|
@ -171,12 +171,6 @@ body
|
|||
padding: 12px
|
||||
max-width: 960px
|
||||
|
||||
.a11y
|
||||
overflow: hidden
|
||||
width: 0
|
||||
height: 0
|
||||
display: inline-block
|
||||
|
||||
.centered
|
||||
text-align: center
|
||||
font-size: 110%
|
||||
|
|
|
|||
|
|
@ -387,3 +387,7 @@ textarea.create_text
|
|||
form.boundaryless &
|
||||
min-height: 8em
|
||||
|
||||
\:is(input, select, textarea).fullwidth
|
||||
width: 100%
|
||||
padding: 0
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
<link rel="stylesheet" href="{{ private_style }}" />
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body class="admin">
|
||||
<body class="admin {{ theme_classes(current_user.color_theme) }}">
|
||||
<header class="header">
|
||||
<h1><a href="{{ url_for('admin.homepage') }}"><span class="faint">{{ app_name }}:</span> Admin</a></h1>
|
||||
<h1><span class="faint">{{ app_name }}:</span> <a href="{{ url_for('admin.homepage') }}">Admin</a></h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
{% for message in get_flashed_messages() %}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
<input type="search" name="q" placeholder="Search among {{ post_count }} posts…">
|
||||
<input type="submit" value="Search">
|
||||
</form>
|
||||
<a href="/search">
|
||||
<i class="icon icon-search"></i><span class="a11y">search</span>
|
||||
<a href="/search" aria-label="Search" title="Search">
|
||||
{{ icon('search') }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
@ -47,26 +47,32 @@
|
|||
<!-- no user -->
|
||||
{% elif current_user.is_authenticated %}
|
||||
<li class="nomobile">
|
||||
<a class="round border-accent" href="/create" title="Create a post">
|
||||
<i class="icon icon-add"></i>
|
||||
<span class="a11y">create</span>
|
||||
<a class="round border-accent" href="/create" title="Create a post" aria-label="Create a post">
|
||||
{{ icon('add') }}
|
||||
<span>New post</span>
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="{{ current_user.url() }}" title="{{ current_user.handle() }}'s profile">{{ icon('profile')}}<span class="a11y">profile</span></a>
|
||||
{% if current_user.is_administrator %}
|
||||
<li class="nomobile">
|
||||
<a href="/admin" title="Admin Tools" aria-label="Admin Tools">
|
||||
{{ icon('mod') }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li><a href="{{ current_user.url() }}" title="{{ current_user.handle() }}'s profile" aria-label="User profile">{{ icon('profile') }}</a>
|
||||
<div class="header-username">
|
||||
<strong class="header-username-name">{{ current_user.handle() }}</strong>
|
||||
<span class="header-username-karma">{{ icon('karma') }} {{ current_user.karma }} karma</span>
|
||||
</div></li>
|
||||
<li><a href="/logout" title="Log out">
|
||||
{{ icon('logout') }} <span class="a11y">log out</span>
|
||||
<li><a href="/logout" title="Log out" aria-label="Log out">
|
||||
{{ icon('logout') }}
|
||||
</a></li>
|
||||
{% else %}
|
||||
<li><a href="/login" title="Log in">
|
||||
{{ icon('logout') }}<span class="a11y">log in</span>
|
||||
<li><a href="/login" title="Log in" aria-label="Log in">
|
||||
{{ icon('logout') }}
|
||||
</a></li>
|
||||
<li><a href="/register" title="Register">
|
||||
{{ icon('join') }}<span class="a11y">register</span>
|
||||
<li><a href="/register" title="Create account" aria-label="Create account">
|
||||
{{ icon('join') }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -16,11 +16,10 @@
|
|||
<p>Posting as <strong>{{ current_user.handle() }}</strong></p>
|
||||
<p>Post to: <input type="text" name="to" placeholder="{{ current_user.handle() }}"></p>
|
||||
<div>
|
||||
<span class="a11y">Title:</span><input type="text" name="title" placeholder="An interesting title" maxlength="256">
|
||||
<input type="text" name="title" placeholder="An interesting title" maxlength="256" class="fullwidth" />
|
||||
</div>
|
||||
<div>
|
||||
<span class="a11y">Text:</span>
|
||||
<textarea name="text" placeholder="What's happening?" class="create_text">{{ request.args['preload'] }}</textarea>
|
||||
<textarea name="text" placeholder="What's happening?" class="create_text fullwidth">{{ request.args['preload'] }}</textarea>
|
||||
</div>
|
||||
{#<dd id="fileInputContainer"><a href="javascript:attachFileInput();">Add a file...</a>#}
|
||||
<div>{{ privacy_select() }}</div>
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@
|
|||
<form action="{{ url_for('edit.edit_post', id=p.id) }}" method="POST" enctype="multipart/form-data" class="boundaryless">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div>
|
||||
<span class="a11y">Text:</span>
|
||||
<textarea name="text" placeholder="What's happening?" class="create_text">{{ p.text_content }}</textarea></dd>
|
||||
<textarea name="text" placeholder="What's happening?" class="create_text fullwidth">{{ p.text_content }}</textarea></dd>
|
||||
</div>
|
||||
<div>{{ privacy_select(p.privacy) }}</div>
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -26,22 +26,22 @@
|
|||
{% macro feed_upvote(postid, count, uservote=0) %}
|
||||
<div class="upvote-button" data-endpoint="{{ postid|to_b32l }}">
|
||||
{% if uservote > 0 %}
|
||||
<a href="javascript:void 0" class="upvote-button-up active">
|
||||
<i class="icon icon-upvote_fill"></i><span class="a11y">upvoted</span>
|
||||
<a href="javascript:void 0" class="upvote-button-up active" aria-label="upvoted">
|
||||
{{ icon('upvote', True) }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="javascript:void 0" class="upvote-button-up">
|
||||
<i class="icon icon-upvote"></i><span class="a11y">upvote</span>
|
||||
<a href="javascript:void 0" class="upvote-button-up" aria-label="upvote">
|
||||
{{ icon('upvote') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<strong class="upvote-count">{{ count }}</strong>
|
||||
{% if uservote < 0 %}
|
||||
<a href="javascript:void 0" class="upvote-button-down active">
|
||||
<i class="icon icon-downvote_fill"></i><span class="a11y">downvoted</span>
|
||||
<a href="javascript:void 0" class="upvote-button-down active" aria-label="downvoted">
|
||||
{{ icon('downvote', True) }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="javascript:void 0" class="upvote-button-down">
|
||||
<i class="icon icon-downvote"></i><span class="a11y">downvote</span>
|
||||
<a href="javascript:void 0" class="upvote-button-down" aria-label="downvote">
|
||||
{{ icon('downvote') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
@ -86,9 +86,8 @@
|
|||
|
||||
{% macro comment_count(c) %}
|
||||
<div class="comment-count">
|
||||
<a><i class="icon icon-comment"></i></a>
|
||||
<a aria-label="Comments">{{ icon('comment') }}</a>
|
||||
<strong>{{ c }}</strong>
|
||||
<span class="a11y">comments</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue