[TWIG] Fix empty accessibility menu anchor, accesskey anchors placement

[CSS] Dark theme hover/focus border, settings page form visibility
This commit is contained in:
2021-12-01 20:13:24 +00:00
parent 030c966b74
commit e7ee558f4a
15 changed files with 99 additions and 135 deletions

View File

@@ -1,24 +0,0 @@
{% block leftpanel %}
<label class="panel-left-icon" for="panel-left-toggle" aria-hidden="true" tabindex="-1">{{ icon('menu', 'icon icon-left') | raw }}</label>
<input type="checkbox" id="panel-left-toggle" aria-hidden="true" tabindex="-1">
<section class="header-panel section-panel-left">
<a id="anchor-left-panel" class="anchor-hidden" title="{{ 'Press tab to access selected region!' | trans }}"></a>
<aside class="panel-content accessibility-target">
{% if app.user %}
<section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
{% block profile_view %}{% include 'cards/profile/view.html.twig' with { actor: current_actor } %}{% endblock profile_view %}
{{ block("profile_current_actor", "cards/navigation/view.html.twig") }}
</section>
{% else %}
<section>
{{ block("profile_security", "cards/navigation/view.html.twig") }}
</section>
{% endif %}
{{ block("feeds", "cards/navigation/view.html.twig") }}
{{ block("footer", "cards/navigation/view.html.twig") }}
</aside>
</section>
{% endblock leftpanel %}

View File

@@ -21,7 +21,7 @@ declare(strict_types = 1);
// }}}
namespace Component\Left\Controller;
namespace Component\LeftPanel\Controller;
use App\Core\Cache;
use App\Core\Controller;

View File

@@ -19,14 +19,14 @@ declare(strict_types = 1);
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}}
namespace Component\Left;
namespace Component\LeftPanel;
use App\Core\Event;
use App\Core\Modules\Component;
use App\Core\Router\RouteLoader;
use Component\Left\Controller as C;
use Component\LeftPanel\Controller as C;
class Left extends Component
class LeftPanel extends Component
{
public function onAddRoute(RouteLoader $r): bool
{

View File

@@ -0,0 +1,25 @@
{% block leftpanel %}
<label class="panel-left-icon" for="panel-left-toggle" aria-hidden="true"
tabindex="-1">{{ icon('menu', 'icon icon-left') | raw }}</label>
<input type="checkbox" id="panel-left-toggle" aria-hidden="true" tabindex="-1">
<a id="anchor-left-panel" class="anchor-hidden" title="{{ 'Press tab to access selected region!' | trans }}"></a>
<section class="header-panel section-panel-left accessibility-target">
<aside class="panel-content">
{% if app.user %}
<section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
{% block profile_view %}{% include 'cards/profile/view.html.twig' with { actor: current_actor } %}{% endblock profile_view %}
{{ block("profile_current_actor", "cards/navigation/view.html.twig") }}
</section>
{% else %}
<section>
{{ block("profile_security", "cards/navigation/view.html.twig") }}
</section>
{% endif %}
{{ block("feeds", "cards/navigation/view.html.twig") }}
{{ block("footer", "cards/navigation/view.html.twig") }}
</aside>
</section>
{% endblock leftpanel %}

View File

@@ -1,33 +0,0 @@
{% block rightpanel %}
<label class="panel-right-icon" for="panel-right-toggle" aria-hidden="true" tabindex="-1">{{ icon('notes', 'icon icon-right') | raw }}</label>
<input type="checkbox" id="panel-right-toggle" aria-hidden="true" tabindex="-1">
<div class="header-panel section-panel-right">
<a id="anchor-right-panel" class="anchor-hidden" title="{{ 'Press tab to access selected region!' | trans }}"></a>
<aside class="panel-content accessibility-target">
{% set blocks = handle_event('AppendRightPostingBlock', request) %}
{% if blocks['post_form'] is defined %}
<section class="section-widget" title={{ 'Create a new note.' | trans }}>
<details class="section-title-details" title={{ 'Expand if you want to access more options.' | trans }}>
<summary class="section-title-summary">
{{ "Create a note" | trans }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}
</summary>
</details>
<div class="section-form">
<fieldset>
{{ form(blocks['post_form']) }}
</fieldset>
</div>
</section>
{% endif %}
{% set current_path = app.request.get('_route') %}
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path, 'vars': right_panel_vars | default }) %}
{{ block | raw }}
{% endfor %}
</aside>
</div>
{% endblock rightpanel %}

View File

@@ -19,12 +19,12 @@ declare(strict_types = 1);
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}}
namespace Component\Right;
namespace Component\RightPanel;
use App\Core\Event;
use App\Core\Modules\Component;
class Right extends Component
class RightPanel extends Component
{
/**
* Output our dedicated stylesheet

View File

@@ -0,0 +1,35 @@
{% block rightpanel %}
<label class="panel-right-icon" for="panel-right-toggle" aria-hidden="true"
tabindex="-1">{{ icon('notes', 'icon icon-right') | raw }}</label>
<input type="checkbox" id="panel-right-toggle" aria-hidden="true" tabindex="-1">
<a id="anchor-right-panel" class="anchor-hidden" title="{{ 'Press tab to access selected region!' | trans }}"></a>
<div class="header-panel section-panel-right accessibility-target">
<aside class="panel-content">
{% set blocks = handle_event('AppendRightPostingBlock', request) %}
{% if blocks['post_form'] is defined %}
<section class="section-widget" title={{ 'Create a new note.' | trans }}>
<details class="section-title-details"
title={{ 'Expand if you want to access more options.' | trans }}>
<summary class="section-title-summary">
{{ "Create a note" | trans }}{{ icon('arrow-down', 'icon icon-details-open') | raw }}
</summary>
</details>
<div class="section-form">
<fieldset>
{{ form(blocks['post_form']) }}
</fieldset>
</div>
</section>
{% endif %}
{% set current_path = app.request.get('_route') %}
{% for block in handle_event('AppendRightPanelBlock', {'path': current_path, 'vars': right_panel_vars | default }) %}
{{ block | raw }}
{% endfor %}
</aside>
</div>
{% endblock rightpanel %}