From 68e600ec32698c7b472a8166c49be2eabeb5da86 Mon Sep 17 00:00:00 2001 From: COil Date: Thu, 5 Dec 2024 08:46:45 +0100 Subject: [PATCH] feat: more project parameters --- config/packages/twig.php | 4 +++ config/services.php | 11 +++++- templates/App/Controller/HomeAction.html.twig | 34 +++++++++++++++++-- templates/base.html.twig | 8 ++--- 4 files changed, 50 insertions(+), 7 deletions(-) diff --git a/config/packages/twig.php b/config/packages/twig.php index 667dd08..f3efcf4 100644 --- a/config/packages/twig.php +++ b/config/packages/twig.php @@ -10,6 +10,10 @@ 'globals' => [ 'brand' => '%brand%', 'brand_html' => '%brand_html%', + 'brand_emoji' => '%brand_emoji%', + 'description' => '%description%', + 'website' => '%website%', + 'version' => '%version%', ], ]); if ($containerConfigurator->env() === 'test') { diff --git a/config/services.php b/config/services.php index 3e779e3..c4db568 100644 --- a/config/services.php +++ b/config/services.php @@ -17,9 +17,18 @@ // System parameters: https://symfony.com/doc/current/performance.html $parameters->set('.container.dumper.inline_factories', true); - // App parameters + // Application parameters $parameters->set('brand', 'MicroSymfony'); $parameters->set('brand_html', 'MicroSymfony 🎶'); + $parameters->set('brand_emoji', '🎶️'); + $parameters->set('website', 'https://github.com/strangebuzz/MicroSymfony'); + $parameters->set('version', '1.0.0'); + + $description = <<<'DESCRIPTION' +This page displays the README.md +file of the GitHub repository (This text comes from config/services.php). +DESCRIPTION; + $parameters->set('description', $description); // Services $services = $containerConfigurator->services(); diff --git a/templates/App/Controller/HomeAction.html.twig b/templates/App/Controller/HomeAction.html.twig index e53daee..7bc199f 100644 --- a/templates/App/Controller/HomeAction.html.twig +++ b/templates/App/Controller/HomeAction.html.twig @@ -1,12 +1,42 @@ {% extends 'base.html.twig' %} {% block body %} -

This page displays the - README.md file of the GitHub repository.

+

{{ description|raw }}


{{ readme|raw|markdown_to_html|raw|add_att_attributes|raw }} + + {# Uncomment this and adapat it to your needs. + +

MicroSymfony 🎶

+ +

Table of Contents 📖

+ +

Demos 🌈

+ +

Quick-start ⚡

+ +

Stack 🔗

+ +

Features 🚀

+ +

Notes 📒

+ +

Other good practices 👌

+ +

References 📚

+ +

Contributing 🤝

+ +

Security 🧯

+ +

Credits 🙏

+ +

License ⚖️

+ #} + + {% endblock %} {% block stylesheets %} diff --git a/templates/base.html.twig b/templates/base.html.twig index 347d899..e8d3435 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -6,7 +6,7 @@ {% block title %}{{ brand }}{% endblock %} - + {% block preconnect %}{% endblock %} @@ -53,18 +53,18 @@