update murph and add avatar
This commit is contained in:
parent
a1c1edd5de
commit
716b1f46a7
|
@ -119,10 +119,18 @@ pre[class*="language-"] {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
padding-top: 35px;
|
padding-top: 35px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
|
&.navigation-with-avatar {
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.deblan-icon {
|
.deblan-icon {
|
||||||
margin-right: 9px;
|
margin-right: 9px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"friendsofsymfony/jsrouting-bundle": "^2.7",
|
"friendsofsymfony/jsrouting-bundle": "^2.7",
|
||||||
"knplabs/knp-markdown-bundle": "^1.9",
|
"knplabs/knp-markdown-bundle": "^1.9",
|
||||||
"knplabs/knp-menu-bundle": "^3.1",
|
"knplabs/knp-menu-bundle": "^3.1",
|
||||||
"murph/murph-core": "^1.0"
|
"murph/murph-core": "dev-master"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/browser-kit": "^5.2",
|
"symfony/browser-kit": "^5.2",
|
||||||
|
|
|
@ -8,6 +8,7 @@ use App\Core\Setting\SettingManager;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use App\Core\Form\FileManager\FilePickerType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class SettingEventSubscriber.
|
* class SettingEventSubscriber.
|
||||||
|
@ -27,6 +28,8 @@ class SettingEventSubscriber extends EventSubscriber
|
||||||
{
|
{
|
||||||
$this->manager->init('blog_footer', '🥾 Pied de page', 'Contenu', '');
|
$this->manager->init('blog_footer', '🥾 Pied de page', 'Contenu', '');
|
||||||
|
|
||||||
|
$this->manager->init('avatar_image', '👦 Avatar', 'Image', '');
|
||||||
|
|
||||||
$this->manager->init('email_sender', '🤖 E-mail', 'Expéditeur', '');
|
$this->manager->init('email_sender', '🤖 E-mail', 'Expéditeur', '');
|
||||||
$this->manager->init('email_contact', '🤖 E-mail', 'Destinataire formulaire de contact', '');
|
$this->manager->init('email_contact', '🤖 E-mail', 'Destinataire formulaire de contact', '');
|
||||||
$this->manager->init('email_comment', '🤖 E-mail', 'Destinataire nouveau commentaire', '');
|
$this->manager->init('email_comment', '🤖 E-mail', 'Destinataire nouveau commentaire', '');
|
||||||
|
@ -53,6 +56,16 @@ class SettingEventSubscriber extends EventSubscriber
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_array($entity->getCode(), ['avatar_image'])) {
|
||||||
|
$builder->add(
|
||||||
|
'value',
|
||||||
|
FilePickerType::class,
|
||||||
|
[
|
||||||
|
'label' => $entity->getLabel(),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array($entity->getCode(), ['giphy_api_key', 'stats_umami_url'])) {
|
if (in_array($entity->getCode(), ['giphy_api_key', 'stats_umami_url'])) {
|
||||||
$builder->add(
|
$builder->add(
|
||||||
'value',
|
'value',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{% set menu = _navigation.menu('menu') %}
|
{% set menu = _navigation.menu('menu') %}
|
||||||
{% set network = _navigation.menu('network') %}
|
{% set network = _navigation.menu('network') %}
|
||||||
|
{% set avatar = setting('avatar_image') %}
|
||||||
|
|
||||||
<div class="wide-menu hidden-small">
|
<div class="wide-menu hidden-small">
|
||||||
<div class="fixed-menu">
|
<div class="fixed-menu">
|
||||||
|
@ -7,12 +8,16 @@
|
||||||
<a href="{{ safe_path('blog_menu_posts', {_domain: _domain}) }}">
|
<a href="{{ safe_path('blog_menu_posts', {_domain: _domain}) }}">
|
||||||
{{ include('module/_logo.html.twig') }}
|
{{ include('module/_logo.html.twig') }}
|
||||||
|
|
||||||
|
{% if avatar %}
|
||||||
|
<img src="{{ asset(avatar) }}" class="avatar border round" alt="{{ avatar|file_attribute('title') }}">
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<span class="d-none">Accueil Deblan Blog</span>
|
<span class="d-none">Accueil Deblan Blog</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if menu %}
|
{% if menu %}
|
||||||
<nav class="navigation">
|
<nav class="navigation {% if avatar %}navigation-with-avatar{% endif %}">
|
||||||
<ul>
|
<ul>
|
||||||
{%- for item in menu.rootNode.children -%}
|
{%- for item in menu.rootNode.children -%}
|
||||||
{%- if item.isVisible -%}
|
{%- if item.isVisible -%}
|
||||||
|
|
Loading…
Reference in a new issue