From 8754cf72cfa34d018ff38eb1303c3d7d135803e2 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 25 Feb 2026 18:44:25 +0100 Subject: [PATCH] #8021 --- app/Fluidbook/Compiler/Compiler.php | 17 +++++++++++++++-- app/Models/Traits/PublicationSettings.php | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index b9ce8f1c3..c9de6b734 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -560,7 +560,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->config->triggersLinks = []; $this->config->hasContentLock = false; - $this->config->specialShortLinks=[]; + $this->config->specialShortLinks = []; } public function addMask($layer, $page, $area) @@ -2032,7 +2032,20 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->lessVariables['menu-chapters-columns-width'] = $this->fluidbookSettings->chaptersColMaxWidth; $this->lessVariables['menu-chapters-font-size'] = $this->fluidbookSettings->chaptersFontSize; - // Search float + // Search + if (($this->fluidbookSettings->highlightMulticolor ?? true)) { + $this->lessVariables['search-highlight-0'] = '#00ff00'; + $this->lessVariables['search-highlight-1'] = '#ffff00'; + $this->lessVariables['search-highlight-2'] = '#00ffff'; + $this->lessVariables['search-highlight-3'] = '#ff00ff'; + $this->lessVariables['search-highlight-4'] = '#ff0000'; + } else { + $this->lessVariables['search-highlight-0'] = '#00ff00'; + $this->lessVariables['search-highlight-1'] = '#00ff00'; + $this->lessVariables['search-highlight-2'] = '#00ff00'; + $this->lessVariables['search-highlight-3'] = '#00ff00'; + $this->lessVariables['search-highlight-4'] = '#00ff00'; + } $this->lessVariables['search-float-text'] = $this->themeSettings->searchFieldColor ? Color::colorToCSS($this->themeSettings->searchFieldColor) : $this->lessVariables['menu-field-text']; $this->lessVariables['search-float-background'] = $this->themeSettings->searchFieldBackColor ? Color::colorToCSS($this->themeSettings->searchFieldBackColor) : $this->lessVariables['menu-field-background']; diff --git a/app/Models/Traits/PublicationSettings.php b/app/Models/Traits/PublicationSettings.php index a65ce8099..bc13b4087 100644 --- a/app/Models/Traits/PublicationSettings.php +++ b/app/Models/Traits/PublicationSettings.php @@ -796,6 +796,7 @@ trait PublicationSettings ], ] ); + $this->_addSettingField('highlightMulticolor', Checkbox::class, $this->__('Surlignage multicolore'), ['when' => ['highlightResults' => '1'], 'default' => true]); $this->_addSettingField('', FormSeparator::class); $this->_addSettingField('searchShowNoResultsPages', Checkbox::class, $this->__('Afficher les pages sans résultats'), [ 'default' => false, -- 2.39.5