From: Vincent Vanwaelscappel Date: Tue, 11 Feb 2025 17:45:22 +0000 (+0100) Subject: wip #7241 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=716a4ff1aff65ff474e07d755bdb853a6628091e;p=fluidbook-toolbox.git wip #7241 @1 --- diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 5fb35827e..f00adc550 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -1938,6 +1938,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->log('CSS 7'); // Links Styles $this->lessVariables['links-color'] = Color::colorToCSS($this->themeSettings->linksColor); + $this->lessVariables['links-opacity'] = ($this->themeSettings->linksOpacity ?? 30) . "%"; $this->lessVariables['slideshow-color'] = Color::colorToCSS($this->themeSettings->slideshowColor); $this->lessVariables['inlineslideshow-transition-time'] = (floatval($this->fluidbookSettings->inlineSlideshowTransitionDuration) * 1000) . 'ms'; $this->lessVariables['slideshow-caption-size'] = $this->fluidbookSettings->slideshowCaptionSize ?: '16px'; diff --git a/app/Models/FluidbookTheme.php b/app/Models/FluidbookTheme.php index b8d4f428d..f8400c3a9 100644 --- a/app/Models/FluidbookTheme.php +++ b/app/Models/FluidbookTheme.php @@ -13,6 +13,7 @@ use App\Models\Traits\ToolboxSettings; use Cubist\Backpack\Magic\EntityData; use Cubist\Backpack\Magic\Fields\Files; use Cubist\Backpack\Magic\Fields\FormSeparator; +use Cubist\Backpack\Magic\Fields\Percent; use Cubist\Backpack\Magic\Fields\SelectFromArray; use Cubist\Backpack\Magic\Fields\SelectFromModel; use Cubist\Util\CommandLine; @@ -312,6 +313,37 @@ class FluidbookTheme extends ToolboxModel 'allows_alpha' => false, 'translatable' => false, ]); + $this->addField([ + 'name' => 'linksOpacity', + 'type' => Percent::class, + 'label' => __('Opacité des liens'), + 'default' => 30, + 'translatable' => false, + ]); + $this->addField([ + 'name' => 'linksRoundedCorners', + 'type' => Percent::class, + 'label' => __('Bords arrondis'), + 'default' => 0, + 'hint' => '0 : ' . __('Bords pas arrondis') . ' // 100 : ' . __('Bords complètement arrondis'), + 'translatable' => false, + ]); + $this->addField([ + 'name' => 'linksAnimation', + 'label' => __('Animation à l\'apparition'), + 'type' => SelectFromArray::class, + 'options' => ['fade' => __('Opacité'), 'hightlight' => __('Surligner')], + 'default' => 'fade', + ]); + $this->addField([ + 'name' => __('Position de l\'animation'), + 'type' => SelectFromArray::class, + 'options' => ['top' => __('Par dessus les contenus'), 'under' => __('Sous la couche de texte')], + 'default' => 'top', + ]); + $this->addField([ + 'type' => 'FormSeparator', + ]); $this->addField([ 'name' => 'slideshowColor', 'type' => 'Color',