diff --git a/src/Controller/BaseController.php b/src/Controller/BaseController.php new file mode 100644 index 0000000..c0c0cb4 --- /dev/null +++ b/src/Controller/BaseController.php @@ -0,0 +1,17 @@ +twig = $twig; + } +} diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php new file mode 100644 index 0000000..9b6c975 --- /dev/null +++ b/src/Controller/HomeController.php @@ -0,0 +1,21 @@ +twig->render('pages/home.html.twig'); + + return new Response($content); + } +} diff --git a/templates/page.html.twig b/templates/page.html.twig new file mode 100644 index 0000000..2429030 --- /dev/null +++ b/templates/page.html.twig @@ -0,0 +1,5 @@ +{% extends 'html.html.twig' %} + +{% block body %} + {% block content %}{% endblock %} +{% endblock %} diff --git a/templates/pages/home.html.twig b/templates/pages/home.html.twig new file mode 100644 index 0000000..c89e62e --- /dev/null +++ b/templates/pages/home.html.twig @@ -0,0 +1,5 @@ +{% extends 'page.html.twig' %} + +{% block content %} + This is the homepage. +{% endblock %}