From dedf105f063fbdf6f13c49df0e4faac67f65d3ea Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 15 Aug 2023 11:02:27 +0200 Subject: [PATCH] update footer setting type --- assets/css/app.scss | 23 +++++++++++++++++++ .../SettingEventSubscriber.php | 18 ++++++++++++++- templates/module/_navigation.html.twig | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/assets/css/app.scss b/assets/css/app.scss index adb21dc..2b79812 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -1287,6 +1287,29 @@ $links: ( } } +// @keyframes avatarlogo { +// 0% { +// -webkit-mask: linear-gradient(135deg,#000c 40%,#000,#000c 60%) 100% 100%/250% 250%; +// } +// 40% { +// -webkit-mask-position: 0 0; +// } +// 90% { +// -webkit-mask: linear-gradient(135deg,#000c 40%,#000,#000c 60%) 100% 100%/250% 250%; +// } +// 100% { +// -webkit-mask: linear-gradient(135deg,#000c 40%,#000,#000c 60%) 100% 100%/250% 250%; +// } +// } +// +// .avatar-logo { +// img, svg { +// _animation-name: avatarlogo; +// animation-duration: 7s; +// animation-iteration-count: infinite; +// } +// } + @media (prefers-color-scheme: dark) { .bg-box { background: #343c53; diff --git a/src/EventSubscriber/SettingEventSubscriber.php b/src/EventSubscriber/SettingEventSubscriber.php index c80235f..164585d 100644 --- a/src/EventSubscriber/SettingEventSubscriber.php +++ b/src/EventSubscriber/SettingEventSubscriber.php @@ -9,6 +9,7 @@ use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; use App\Core\Form\FileManager\FilePickerType; +use App\Core\Form\Type\TinymceTextareaType; /** * class SettingEventSubscriber. @@ -93,7 +94,7 @@ class SettingEventSubscriber extends EventSubscriber ); } - if (in_array($entity->getCode(), ['blog_footer', 'post_author_description'])) { + if (in_array($entity->getCode(), ['post_author_description'])) { $event->setOption('view', 'large'); $builder->add( @@ -107,5 +108,20 @@ class SettingEventSubscriber extends EventSubscriber ] ); } + + if (in_array($entity->getCode(), ['blog_footer'])) { + $event->setOption('view', 'large'); + + $builder->add( + 'value', + TinymceTextareaType::class, + [ + 'label' => $entity->getLabel(), + 'attr' => [ + 'rows' => 20, + ], + ] + ); + } } } diff --git a/templates/module/_navigation.html.twig b/templates/module/_navigation.html.twig index 1ea0c86..45fb604 100644 --- a/templates/module/_navigation.html.twig +++ b/templates/module/_navigation.html.twig @@ -5,7 +5,7 @@