From f840d4350f64a8cd0d34ccaa4a2c2d4ccf4c2c7c Mon Sep 17 00:00:00 2001 From: rainydaysavings Date: Fri, 5 Jun 2020 22:51:46 +0100 Subject: [PATCH] [UI] Controller and Route for FAQ page created as well as basic template structure --- src/Controller/FaqHome.php | 41 +++++++++++++++++++++++++++++++++++ src/Routes/Faq.php | 42 ++++++++++++++++++++++++++++++++++++ templates/faq/home.html.twig | 1 + 3 files changed, 84 insertions(+) create mode 100644 src/Controller/FaqHome.php create mode 100644 src/Routes/Faq.php create mode 100644 templates/faq/home.html.twig diff --git a/src/Controller/FaqHome.php b/src/Controller/FaqHome.php new file mode 100644 index 0000000000..f347e30dca --- /dev/null +++ b/src/Controller/FaqHome.php @@ -0,0 +1,41 @@ +. +// }}} + +/** + * FAQ main page + * + * @package GNUsocial + * @category Controller + * + * @author Eliseu Amaro + * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later + */ + +namespace App\Controller; + +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; + +class FaqHome extends AbstractController +{ + public function __invoke() + { + return $this->render('faq/home.html.twig', []); + } +} \ No newline at end of file diff --git a/src/Routes/Faq.php b/src/Routes/Faq.php new file mode 100644 index 0000000000..ae8e8de092 --- /dev/null +++ b/src/Routes/Faq.php @@ -0,0 +1,42 @@ +. +// }}} + +/** + * Define FAQ's main routes + * + * @package GNUsocial + * @category Router + * + * @author Eliseu Amaro + * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org + * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later + */ + +namespace App\Routes; + +use App\Controller\FaqHome; +use App\Core\RouteLoader; + +abstract class Faq +{ + public static function load(RouteLoader $r): void + { + $r->connect('doc_faq', '/doc/faq', FaqHome::class); + } +} diff --git a/templates/faq/home.html.twig b/templates/faq/home.html.twig new file mode 100644 index 0000000000..d2b36be955 --- /dev/null +++ b/templates/faq/home.html.twig @@ -0,0 +1 @@ +{% extends "base.html.twig" %}