From bd128094b5c44d2f7f9bfb78bc23e85da5ab0636 Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Fri, 4 Oct 2024 14:28:37 +0300 Subject: [PATCH 1/2] Issue #501: Home page cleanup Signed-off-by: alexmerlin --- src/App/templates/app/home-page.html.twig | 120 ---------- src/App/templates/app/home.html.twig | 248 +++++++++++++++++++++ src/Page/src/Controller/PageController.php | 4 +- 3 files changed, 250 insertions(+), 122 deletions(-) delete mode 100644 src/App/templates/app/home-page.html.twig create mode 100644 src/App/templates/app/home.html.twig 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 4e7f9f6c..00000000 --- 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/App/templates/app/home.html.twig b/src/App/templates/app/home.html.twig new file mode 100644 index 00000000..58b279b6 --- /dev/null +++ b/src/App/templates/app/home.html.twig @@ -0,0 +1,248 @@ +{% extends '@layout/default.html.twig' %} + +{% block title %}Home{% endblock %} + +{% block page_title %}{% endblock %} + +{% block content %} + {{ messagesPartial('partial::alerts', {}, null, 'page-home') }} +
+
+

Dotkernel is a collection of

+

PSR-7 Middleware applications

+

Built on top of the Mezzio microframework.
Composed of a set of custom and extended Laminas components.

+
+
+
 
+
+
+ +
+
+

Mezzio

+
+
+

+ containers +

+

+ Dotkernel is built around the PSR-11 dependency container. + We have chosen Laminas Service Manager as our default implementation. +

+

+ Get Started with Laminas Service Manager +

+
+
+

+ templating +

+

+ By default, no middleware in Laminas is templated. + For Dotkernel's Light application, we have chosen Twig as the default templating engine. +

+

+ Get started with Twig +

+
+ +
+

+ routers +

+

+ Among the various routing implementations compatible with Expressive, we have chosen FastRoute as Dotkernel's default routing library. +

+

+ Get started with FastRoute +

+
+
+

+ http messages +

+

+ Laminas, and consequently Dotkernel, is built around the PSR-7 standard.
It uses Laminas Diactoros as the PSR-7 implementation. +

+

+ Get started with PSR-7 and Diactoros +

+
+
+ +

Dotkernel Frontend components

+
+
+
+
+
+

+ +

+
+
+
+ +
+
+
+ +
+
+

+ +

+
+
+
+ +
+
+
+ +
+
+

+ +

+
+
+
+ +
+
+
+ +
+
+

+ +

+
+
+
+ +
+
+
+ +
+
+

+ +

+
+
+
+ +
+
+
+ +
+
+

+ +

+
+
+
+ +
+
+
+ +
+
+

+ +

+
+
+
+ +
+
+
+
+
+
+
+
+{% endblock %} diff --git a/src/Page/src/Controller/PageController.php b/src/Page/src/Controller/PageController.php index a8bbfdc6..3a1ec440 100644 --- a/src/Page/src/Controller/PageController.php +++ b/src/Page/src/Controller/PageController.php @@ -29,14 +29,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']) ); } From 1dfebc1c21597254d7d3f739d6b75d32e328d582 Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Fri, 4 Oct 2024 14:38:58 +0300 Subject: [PATCH 2/2] Removed page::home page, replaced by app::home Signed-off-by: alexmerlin --- src/Page/templates/page/home.html.twig | 302 ------------------------- 1 file changed, 302 deletions(-) delete mode 100644 src/Page/templates/page/home.html.twig diff --git a/src/Page/templates/page/home.html.twig b/src/Page/templates/page/home.html.twig deleted file mode 100644 index 6ccfd4fd..00000000 --- a/src/Page/templates/page/home.html.twig +++ /dev/null @@ -1,302 +0,0 @@ -{% extends '@layout/default.html.twig' %} - -{% block title %}Home{% endblock %} - -{% block page_title %}{% endblock %} - -{% block content %} - {{ messagesPartial('partial::alerts', {}, null, 'page-home') }} -
-
-

DotKernel is a collection of

-

PSR-7 Middleware applications

-

Built on top of the Laminas microframework.
Composed of a set of custom and extended Laminas components.

-
-
-
 
-
-
- -
-
-

Laminas

-
-
-

- - containers - -

-

- DotKernel is built around the PSR-11 dependency container. - We have chosen Laminas Service Manager as our default implementation. -

-

- Get Started with Laminas Service Manager -

-
-
-

- - templating - -

-

- By default, no middleware in Laminas is templated. - For DotKernel's Frontend application, we have chosen Twig - as the default templating engine. -

-

- Get started with Twig -

-
- -
-

- routers -

-

- Among the various routing implementations compatible with Expressive, we have chosen FastRoute - as DotKernel's default routing library. -

-

- Get started with FastRoute -

-
-
-

- http messages -

-

- Laminas, and consequently DotKernel, is built around the PSR-7 standard. It uses - Laminas Diactoros as the PSR-7 implementation. -

-

- Get started with - PSR-7 - and Diactoros -

-
-
- -

DotKernel components

-
-
-
-
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
- -
-
-

- -

-
-
-
- -
-
-
-
-
-
-
-
-{% endblock %}