Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/more project parameters #131

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/packages/twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
11 changes: 10 additions & 1 deletion config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
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 %}
Expand Down
8 changes: 4 additions & 4 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down Expand Up @@ -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>
Expand Down
Loading