From b6fb146b357005b092d21fd616af3631f7879013 Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Thu, 3 Oct 2024 09:35:37 +0300 Subject: [PATCH] Single home page Signed-off-by: alexmerlin --- src/App/templates/app/home-page.html.twig | 120 ------------------ .../page => App/templates/app}/home.html.twig | 0 src/Page/src/Controller/PageController.php | 4 +- 3 files changed, 2 insertions(+), 122 deletions(-) delete mode 100644 src/App/templates/app/home-page.html.twig rename src/{Page/templates/page => App/templates/app}/home.html.twig (100%) diff --git a/src/App/templates/app/home-page.html.twig b/src/App/templates/app/home-page.html.twig deleted file mode 100644 index 4e7f9f6..0000000 --- a/src/App/templates/app/home-page.html.twig +++ /dev/null @@ -1,120 +0,0 @@ -{% extends '@layout/default.html.twig' %} - -{% block title %}Home{% endblock %} - -{% block content %} -
-

Welcome to mezzio

-

- Congratulations! You have successfully installed the - mezzio skeleton application. - This skeleton can serve as a simple starting point for you to begin building your application. -

-

- Mezzio builds on laminas-stratigility to provide a minimalist PSR-7 middleware framework for PHP. -

-
- -
-
-

- - Agile & Lean - -

-

- Mezzio is fast, small and perfect for rapid application development, prototyping and api's. - You decide how you extend it and choose the best packages from major framework or standalone projects. -

-
- -
-

- - HTTP Messages - -

-

- HTTP messages are the foundation of web development. Web browsers and HTTP clients such as cURL create - HTTP request messages that are sent to a web server, which provides an HTTP response message. - Server-side code receives an HTTP request message, and returns an HTTP response message. -

-
- -
-

- - Middleware - -

-

- Middleware is code that exists between the request and response, and which can take the incoming - request, perform actions based on it, and either complete the response or pass delegation on to the - next middleware in the queue. Your application is easily extended with custom middleware created by - yourself or others. -

-
-
- -
-
-

- - Containers - -

-

- Mezzio promotes and advocates the usage of Dependency Injection/Inversion of Control containers - when writing your applications. Mezzio supports multiple containers which typehints against - PSR Container. -

- {% if containerName is defined %} -

- - Get started with {{ containerName }}. - -

- {% endif %} -
- -
-

- - Routers - -

-

- One fundamental feature of mezzio is that it provides mechanisms for implementing dynamic - routing, a feature required in most modern web applications. Mezzio ships with multiple adapters. -

- {% if routerName is defined %} -

- - Get started with {{ routerName }}. - -

- {% endif %} -
- -
-

- - Templating - -

-

- By default, no middleware in Mezzio is templated. We do not even provide a default templating - engine, as the choice of templating engine is often very specific to the project and/or organization. - However, Mezzio does provide abstraction for templating, which allows you to write middleware that - is engine-agnostic. -

- {% if templateName is defined %} -

- - Get started with {{ templateName }}. - -

- {% endif %} -
-
-{% endblock %} diff --git a/src/Page/templates/page/home.html.twig b/src/App/templates/app/home.html.twig similarity index 100% rename from src/Page/templates/page/home.html.twig rename to src/App/templates/app/home.html.twig diff --git a/src/Page/src/Controller/PageController.php b/src/Page/src/Controller/PageController.php index 906bac1..e0438cf 100644 --- a/src/Page/src/Controller/PageController.php +++ b/src/Page/src/Controller/PageController.php @@ -23,14 +23,14 @@ public function __construct( public function indexAction(): ResponseInterface { return new HtmlResponse( - $this->template->render('page::home') + $this->template->render('app::home') ); } public function homeAction(): ResponseInterface { return new HtmlResponse( - $this->template->render('page::home', ['routeName' => 'home']) + $this->template->render('app::home', ['routeName' => 'home']) ); }