diff --git a/src/Routes/Main.php b/src/Routes/Main.php index 7cb1ca97ea..571265ff91 100644 --- a/src/Routes/Main.php +++ b/src/Routes/Main.php @@ -30,31 +30,22 @@ namespace App\Routes; -<<<<<<< HEAD use App\Controller as C; -use App\Core\Router\RouteLoader; -======= use App\Controller\NetworkPublic; -use App\Core\RouteLoader; +use App\Core\Router\RouteLoader; use Symfony\Bundle\FrameworkBundle\Controller\TemplateController; ->>>>>>> 5734468448... [UI] Better use of icons, fixing static pages routing. abstract class Main { public static function load(RouteLoader $r): void { -<<<<<<< HEAD - $r->connect('main_all', '/main/all', C\NetworkPublic::class); - $r->connect('config_admin', '/config/admin', C\AdminConfigController::class); -======= $r->connect('main_all', '/main/all', NetworkPublic::class); - // FAQ pages, still need to make sure no path traversal attacks or sql and stuff - $r->connect('doc_faq', '/doc/faq', TemplateController::class, [], ['defaults' => ['template' => 'faq/home.html.twig']]); - $r->connect('doc_contact', '/doc/contact', TemplateController::class, [], ['defaults' => ['template' => 'faq/contact.html.twig']]); - $r->connect('doc_tags', '/doc/tags', TemplateController::class, [], ['defaults' => ['template' => 'faq/tags.html.twig']]); - $r->connect('doc_groups', '/doc/groups', TemplateController::class, [], ['defaults' => ['template' => 'faq/groups.html.twig']]); - $r->connect('doc_openid', '/doc/openid', TemplateController::class, [], ['defaults' => ['template' => 'faq/openid.html.twig']]); ->>>>>>> 5734468448... [UI] Better use of icons, fixing static pages routing. + // FAQ static pages + foreach (['faq', 'contact', 'tags', 'groups', 'openid'] as $s) { + $r->connect('doc_' . $s, 'doc/' . $s, TemplateController::class, [], ['defaults' => ['template' => 'faq/' . $s . '.html.twig']]); + } + + $r->connect('settings_profile', '/settings/profile', C\UserAdminPanel::class); } } diff --git a/templates/faq/about.html.twig b/templates/faq/about.html.twig index 6fa67c0f17..4f919764d0 100644 --- a/templates/faq/about.html.twig +++ b/templates/faq/about.html.twig @@ -1,4 +1,4 @@ -{% extends 'faq/home.html.twig' %} +{% extends 'faq/faq.html.twig' %} {% block title %}Help{% endblock %} diff --git a/templates/faq/contact.html.twig b/templates/faq/contact.html.twig index 8e98d4f755..9bcd914625 100644 --- a/templates/faq/contact.html.twig +++ b/templates/faq/contact.html.twig @@ -1,4 +1,4 @@ -{% extends 'faq/home.html.twig' %} +{% extends 'faq/faq.html.twig' %} {% block title %}Help{% endblock %} diff --git a/templates/faq/groups.html.twig b/templates/faq/groups.html.twig index 85c39b4a37..119c6fa214 100644 --- a/templates/faq/groups.html.twig +++ b/templates/faq/groups.html.twig @@ -1,4 +1,4 @@ -{% extends 'faq/home.html.twig' %} +{% extends 'faq/faq.html.twig' %} {% block title %}Help{% endblock %} diff --git a/templates/faq/home.html.twig b/templates/faq/home.html.twig deleted file mode 100644 index d5a83f458e..0000000000 --- a/templates/faq/home.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% extends 'faq/base.html.twig' %} - -{% block title %}FAQ{% endblock %} - -{% block header %}{{ parent() }}{% endblock %} - -{% block nav %} - -{% endblock %} -{% block body %} -
- {% block markdown %} - {% apply markdown_to_html %} - ## What is this site? - This is a social network, running the GNU social software. - - You can use it to make connections between friends, family and colleagues -- writing short notices about yourself, where you are, and what you're doing, and those notices will be sent to all your contacts. - - In the future, we'll be adding support for photo, video and file sharing, as well as events, better contact management and mobile devices. - - ## Help - GNU social is a **social service**. Users can post short status messages which are shared to their friends and colleagues on the service and (optionally) onto the Web. - - You can also share other types of data, like bookmarks, event invitations, polls, and questions. - - If you'd like to try it out, first register a new account. Then, on the public timeline, enter your message into the textbox at the top of the page, and click "Send". It will go out on the public timeline and to anyone who is subscribed to your notices. - - To subscribe to other people's notifications, go to their profile page and click the "subscribe" button. They'll get a notice that you're now subscribed to their notifications. - {% endapply %} - {% endblock %} -
-{% endblock %} \ No newline at end of file diff --git a/templates/faq/openid.html.twig b/templates/faq/openid.html.twig index ea7fc0bbf6..2bf50b148c 100644 --- a/templates/faq/openid.html.twig +++ b/templates/faq/openid.html.twig @@ -1,4 +1,4 @@ -{% extends 'faq/home.html.twig' %} +{% extends 'faq/faq.html.twig' %} {% block title %}Help{% endblock %} diff --git a/templates/faq/tags.html.twig b/templates/faq/tags.html.twig index b0ee78cd2b..e64116e8d0 100644 --- a/templates/faq/tags.html.twig +++ b/templates/faq/tags.html.twig @@ -1,4 +1,4 @@ -{% extends 'faq/home.html.twig' %} +{% extends 'faq/faq.html.twig' %} {% block title %}Help{% endblock %}