From 517cba351011ab846a87e8ce238af5df131f8684 Mon Sep 17 00:00:00 2001 From: "Angelo D. Moura" Date: Sun, 29 Nov 2020 02:31:48 +0000 Subject: [PATCH] [Directory] Add the route, controller function, and blank template file --- src/Controller/Network.php | 7 +++++++ src/Routes/Main.php | 2 ++ templates/network/actors.html.twig | 33 ++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 templates/network/actors.html.twig diff --git a/src/Controller/Network.php b/src/Controller/Network.php index 6311d4305e..33abd01efe 100644 --- a/src/Controller/Network.php +++ b/src/Controller/Network.php @@ -138,4 +138,11 @@ END; 'order by f.created DESC', ['id' => $actor_id]), ]; } + + public function actors(Request $request) + { + return [ + '_template' => 'network/public.html.twig', + ]; + } } diff --git a/src/Routes/Main.php b/src/Routes/Main.php index abd44347c8..14e5b53146 100644 --- a/src/Routes/Main.php +++ b/src/Routes/Main.php @@ -53,6 +53,8 @@ abstract class Main $r->connect('replies', '/{nickname<' . Nickname::DISPLAY_FMT . '>}/replies', [C\Network::class, 'replies']); $r->connect('favourites', '/{nickname<' . Nickname::DISPLAY_FMT . '>}/favourites', [C\Network::class, 'favourites']); + $r->connect('actors', '/actors', [C\Network::class, 'actors']); + $r->connect('panel', '/panel', [C\AdminPanel::class, 'site']); $r->connect('panel_site', '/panel/site', [C\AdminPanel::class, 'site']); diff --git a/templates/network/actors.html.twig b/templates/network/actors.html.twig new file mode 100644 index 0000000000..04ad8b45cc --- /dev/null +++ b/templates/network/actors.html.twig @@ -0,0 +1,33 @@ +{% extends 'left/left.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 %} \ No newline at end of file