add settings (stats, giphy)
This commit is contained in:
parent
4e9d26a35e
commit
d0d3502657
2
.env
2
.env
|
@ -35,5 +35,3 @@ MAILER_URL=null://localhost
|
|||
###< symfony/swiftmailer-bundle ###
|
||||
|
||||
ASSET_BASE_URL=null
|
||||
UMAMI_URL=
|
||||
GIPHY_API_KEY=
|
||||
|
|
|
@ -5,6 +5,3 @@ twig:
|
|||
paths:
|
||||
'%kernel.project_dir%/templates/core/': Core
|
||||
'%kernel.project_dir%/core/Resources/views/': Core
|
||||
globals:
|
||||
umami_url: '%env(UMAMI_URL)%'
|
||||
giphy_api_key: '%env(GIPHY_API_KEY)%'
|
||||
|
|
|
@ -30,6 +30,10 @@ class SettingEventSubscriber extends EventSubscriber
|
|||
$this->manager->init('email_sender', '🤖 E-mail', 'Expéditeur', '');
|
||||
$this->manager->init('email_contact', '🤖 E-mail', 'Destinataire formulaire de contact', '');
|
||||
$this->manager->init('email_comment', '🤖 E-mail', 'Destinataire nouveau commentaire', '');
|
||||
|
||||
$this->manager->init('stats_umami_url', '📊 Statistiques', 'Adresse tableau de bord Umami', '');
|
||||
|
||||
$this->manager->init('giphy_api_key', '🌐 API', 'Clé d\'API Giphy', '');
|
||||
}
|
||||
|
||||
public function onFormInit(SettingEvent $event)
|
||||
|
|
|
@ -114,7 +114,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|||
<script>
|
||||
const giphy = {
|
||||
baseURL: 'https://api.giphy.com/v1/gifs/',
|
||||
apiKey: '{{ giphy_api_key }}',
|
||||
apiKey: '{{ setting('giphy_api_key') }}',
|
||||
tag: '{% block tag %}error{% endblock %}',
|
||||
type: 'random',
|
||||
rating: 'pg-13'
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
<iframe src="{{ umami_url }}" class="col-12" frameborder="0" style="height: calc(100vh - 60px)"></iframe>
|
||||
<iframe src="{{ setting('stats_umami_url') }}" class="col-12" frameborder="0" style="height: calc(100vh - 60px)"></iframe>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue