Skip to content

Commit

Permalink
Feat/more project parameters (#131)
Browse files Browse the repository at this point in the history
COil authored Dec 5, 2024
1 parent 3c45a7b commit be6be6e
Showing 4 changed files with 50 additions and 7 deletions.
4 changes: 4 additions & 0 deletions config/packages/twig.php
Original file line number Diff line number Diff line change
@@ -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') {
11 changes: 10 additions & 1 deletion config/services.php
Original file line number Diff line number Diff line change
@@ -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', '<b>Micro</b>Symfony 🎶');
$parameters->set('brand_emoji', '🎶️');
$parameters->set('website', 'https://github.com/strangebuzz/MicroSymfony');
$parameters->set('version', '1.0.0');

$description = <<<'DESCRIPTION'
This page displays the <a att="" target="_blank" href="https://github.com/strangebuzz/MicroSymfony/blob/main/README.md">README.md</a>
file of the GitHub repository (This text comes from <code>config/services.php</code>).
DESCRIPTION;
$parameters->set('description', $description);

// Services
$services = $containerConfigurator->services();
34 changes: 32 additions & 2 deletions templates/App/Controller/HomeAction.html.twig
Original file line number Diff line number Diff line change
@@ -1,12 +1,42 @@
{% extends 'base.html.twig' %}

{% block body %}
<p>This page displays the <a att="" target="_blank" href="https://github.com/strangebuzz/MicroSymfony/blob/main/README.md">
README.md</a> file of the GitHub repository.</p>
<p>{{ description|raw }}</p>

<hr/>

{{ readme|raw|markdown_to_html|raw|add_att_attributes|raw }}

{# Uncomment this and adapat it to your needs.
<h1>MicroSymfony 🎶</h1>
<h2>Table of Contents 📖</h2>
<h2>Demos 🌈</h2>
<h2>Quick-start ⚡</h2>
<h2>Stack 🔗</h2>
<h2>Features 🚀</h2>
<h2>Notes 📒</h2>
<h2>Other good practices 👌</h2>
<h2>References 📚</h2>
<h2>Contributing 🤝</h2>
<h2>Security 🧯</h2>
<h2>Credits 🙏</h2>
<h2>License ⚖️</h2>
#}


{% endblock %}

{% block stylesheets %}
8 changes: 4 additions & 4 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>

<title>{% block title %}{{ brand }}{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>{% block icon %}🎶️{% endblock %}️</text></svg>">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>{% block icon %}{{ brand_emoji }}️{% endblock %}️</text></svg>">

{% block preconnect %}{% endblock %}

@@ -53,18 +53,18 @@
</section>

<footer>
<h5>{{ brand|raw }} v{{ sf_version }} ({{ 'frankenphp' in php_sapi ? php_sapi : 'PHP '~php_sapi }} {{ php_version }})</h5>
<h5>{{ brand|raw }} v{{ sf_version }}{# version #} ({{ 'frankenphp' in php_sapi ? php_sapi : 'PHP '~php_sapi }} {{ php_version }})</h5>

<grid>
<div fx="" col="3/4">
A Symfony minimalist application template by <a att="" href="https://www.strangebuzz.com" target="_blank">COil/Strangebuzz 🐝</a>
and <a att="" href="https://github.com/strangebuzz/MicroSymfony/graphs/contributors">other contributors</a>.
and <a att="" href="{{ website }}/graphs/contributors">other contributors</a>.
<br/>
Symfony ™ is a trademark of <a target="_blank" att="" href="https://symfony.com/license">Symfony SAS</a>.
</div>

<div fx="" col="1/4" txt="r">
<a att="" href="https://github.com/strangebuzz/MicroSymfony" target="_blank"><img alt="GitHub" class="github-icon" src="{{ asset('icons/github.svg') }}" width="24" height="24"></a>
<a att="" href="{{ website }}" target="_blank"><img alt="GitHub" class="github-icon" src="{{ asset('icons/github.svg') }}" width="24" height="24"></a>
</div>
</grid>
</footer>

0 comments on commit be6be6e

Please sign in to comment.