diff --git a/plugins/Directory/Directory.php b/plugins/Directory/Directory.php index f3c79020d4..52cb16c871 100644 --- a/plugins/Directory/Directory.php +++ b/plugins/Directory/Directory.php @@ -48,8 +48,8 @@ class Directory extends Plugin */ public function onAddMainNavigationItem(array $vars, array &$res): bool { - $res[] = ['title' => 'Actors', 'path' => Router::url('directory_actors', [])]; - $res[] = ['title' => 'Groups', 'path' => Router::url('directory_groups', [])]; + $res[] = ['title' => 'Actors', 'path' => Router::url('directory_actors', []), 'path_id' => 'directory_actors']; + $res[] = ['title' => 'Groups', 'path' => Router::url('directory_groups', []), 'path_id' => 'directory_groups']; return Event::next; } } diff --git a/plugins/Favourite/Controller/Favourite.php b/plugins/Favourite/Controller/Favourite.php index ef4107e54a..7f069dc183 100644 --- a/plugins/Favourite/Controller/Favourite.php +++ b/plugins/Favourite/Controller/Favourite.php @@ -41,8 +41,9 @@ class Favourite Event::handle('FormatNoteList', [$notes, &$notes_out]); return [ - '_template' => 'network/public.html.twig', - 'notes' => $notes_out, + '_template' => 'network/feed.html.twig', + 'notes' => $notes_out, + 'page_title' => 'Favourites timeline.', ]; } public function favouritesByActorNickname(Request $request, string $nickname) @@ -74,8 +75,9 @@ class Favourite Event::handle('FormatNoteList', [$notes, &$notes_out]); return [ - '_template' => 'network/reversefavs.html.twig', + '_template' => 'network/feed.html.twig', 'notes' => $notes, + 'page_title' => 'Reverse favourites timeline.', ]; } public function reverseFavouritesByActorNickname(Request $request, string $nickname) diff --git a/plugins/Favourite/Favourite.php b/plugins/Favourite/Favourite.php index d412c5917b..1606b83533 100644 --- a/plugins/Favourite/Favourite.php +++ b/plugins/Favourite/Favourite.php @@ -116,8 +116,8 @@ class Favourite extends NoteHandlerPlugin public function onAddProfileNavigationItem(array $vars, array &$res): bool { - $res[] = ['title' => 'Favourites', 'path' => Router::url('actor_favourites_nickname', ['nickname' => $vars['nickname']])]; - $res[] = ['title' => 'Reverse Favourites', 'path' => Router::url('actor_reverse_favourites_nickname', ['nickname' => $vars['nickname']])]; + $res[] = ['title' => 'Favourites', 'path' => Router::url('actor_favourites_nickname', ['nickname' => $vars['nickname']]), 'path_id' => 'actor_favourites_nickname']; + $res[] = ['title' => 'Reverse Favourites', 'path' => Router::url('actor_reverse_favourites_nickname', ['nickname' => $vars['nickname']]), 'path_id' => 'actor_reverse_favourites_nickname']; return Event::next; } diff --git a/public/assets/css/base.css b/public/assets/css/base.css index a16e340656..a9aa352f27 100644 --- a/public/assets/css/base.css +++ b/public/assets/css/base.css @@ -349,6 +349,10 @@ hr { vertical-align: middle; } +.note-actions .form-group { + all: unset; +} + .button-container { all: unset; border: none !important; @@ -446,6 +450,10 @@ hr { color: var(--white); } +.section-widget hr { + margin-bottom: var(--unit-size); +} + .section-widget-padded { padding: var(--unit-size); } diff --git a/src/Controller/Network.php b/src/Controller/Network.php index 80ad2b2d11..839574b154 100644 --- a/src/Controller/Network.php +++ b/src/Controller/Network.php @@ -60,8 +60,9 @@ class Network extends Controller Event::handle('FormatNoteList', [$notes, &$notes_out]); return [ - '_template' => 'network/public.html.twig', + '_template' => 'network/feed.html.twig', 'notes' => $notes_out, + 'page_title' => 'Public timeline.', ]; } @@ -103,8 +104,9 @@ END; Event::handle('FormatNoteList', [$notes, &$notes_out]); return [ - '_template' => 'network/public.html.twig', + '_template' => 'network/feed.html.twig', 'notes' => $notes_out, + 'page_title' => 'Home timeline.', ]; } @@ -116,8 +118,9 @@ END; Event::handle('FormatNoteList', [$notes, &$notes_out]); return [ - '_template' => 'network/public.html.twig', + '_template' => 'network/feed.html.twig', 'notes' => $notes_out, + 'page_title' => 'Network timeline.', ]; } @@ -132,8 +135,9 @@ END; Event::handle('FormatNoteList', [$notes, &$notes_out]); return [ - '_template' => 'network/public.html.twig', + '_template' => 'network/feed.html.twig', 'notes' => $notes_out, + 'page_title' => 'Replies timeline.', ]; } } diff --git a/templates/network/public.html.twig b/templates/network/feed.html.twig similarity index 84% rename from templates/network/public.html.twig rename to templates/network/feed.html.twig index 3cadc8c550..793a76fe71 100644 --- a/templates/network/public.html.twig +++ b/templates/network/feed.html.twig @@ -1,6 +1,6 @@ {% extends 'stdgrid.html.twig' %} -{% block title %}{{ 'Welcome! - Public Timeline' | trans }}{% endblock %} +{% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %} {% block body %} {# Backwards compatibility with hAtom 0.1 #} @@ -17,6 +17,4 @@ -{% endblock body %} - -{% block javascripts %}{% endblock %} +{% endblock body %} \ No newline at end of file diff --git a/templates/network/reversefavs.html.twig b/templates/network/reversefavs.html.twig deleted file mode 100644 index 4bb40e9aea..0000000000 --- a/templates/network/reversefavs.html.twig +++ /dev/null @@ -1,59 +0,0 @@ -{% extends 'stdgrid.html.twig' %} - -{% block meta %} - {{ parent() }} -{% endblock %} - -{% block title %}Welcome!{% endblock %} - -{% block stylesheets %} - {{ parent() }} - - - - -{% endblock %} - -{% block header %} - {{ parent() }} -{% endblock %} - -{% block left %} - {{ parent() }} -{% endblock %} - -{% block body %} -
-
-
- - -
-
-
-{% endblock body %} - -{% block javascripts %}{% endblock %} diff --git a/templates/note/view.html.twig b/templates/note/view.html.twig index 89726169f1..3e2281108d 100644 --- a/templates/note/view.html.twig +++ b/templates/note/view.html.twig @@ -17,17 +17,7 @@ {% if app.user %}
{% for current_action in get_note_actions(note) %} - {{ form_start(current_action) }} - {% if current_action.submit_favourite is defined %} - {{ form_widget(current_action.submit_favourite) }} - {% endif %} - {% if current_action.submit_repeat is defined %} - {{ form_widget(current_action.submit_repeat) }} - {% endif %} - {% if current_action.reply is defined %} - {{ form_widget(current_action.reply) }} - {% endif %} - {{ form_end(current_action) }} + {{ form(current_action) }} {% endfor %}
{% endif %} diff --git a/templates/sidepanel/left/left.html.twig b/templates/sidepanel/left/left.html.twig index a8ee4575a9..01fa94056b 100644 --- a/templates/sidepanel/left/left.html.twig +++ b/templates/sidepanel/left/left.html.twig @@ -10,17 +10,13 @@ {% block profile_view %}{% include 'cards/profile/view.html.twig' with { actor: current_actor } %}{% endblock profile_view %}