]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7241 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 11 Feb 2025 17:45:22 +0000 (18:45 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 11 Feb 2025 17:45:22 +0000 (18:45 +0100)
app/Fluidbook/Compiler/Compiler.php
app/Models/FluidbookTheme.php

index 5fb35827e130198303612d387b64bc7267a99dac..f00adc55077efc92b3319dcfe04a0222f2b22fcb 100644 (file)
@@ -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';
index b8d4f428d0928292eee8910c45d33ae4da02b33a..f8400c3a97ec9681f71877b0155ea72830f54c75 100644 (file)
@@ -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',