--- /dev/null
+<?php
+
+namespace App\Fields;
+
+use Cubist\Backpack\Magic\Fields\SelectFromArray;
+
+class BlendMode extends SelectFromArray
+{
+ protected $_default = 'normal';
+ protected $_databaseDefault = 'normal';
+
+ public function getOptions()
+ {
+ $modes = ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
+ return array_combine($modes, $modes);
+ }
+}
$this->lessVariables['z'] = $this->z;
$this->lessVariables['book-page-width'] = $w;
-
$this->lessVariables['book-page-correct-width'] = $w;
$this->lessVariables['book-page-correct-height'] = $h;
-
$this->log('CSS 2');
$this->lessVariables['book-page-height'] = $h;
$this->lessVariables['book-page-ratio'] = floatval($w) / floatval($h);
$this->lessVariables['page-shade-opacity'] = min(1, $this->themeSettings->shadeAlpha / 50);
+ $this->lessVariables['shadow-blend-mode'] = $this->themeSettings->bookShadeMultiply ?? "normal";
+
$c = new Color($this->themeSettings->bookShadeColor);
$this->lessVariables['shadow-opacity'] = $c->getAlpha() * 1.2;
+ $this->config->bookShadeColor = [round($c->getRed() * 255), round($c->getGreen() * 255), round($c->getBlue() * 255)];
$this->lessVariables['edges-display'] = $this->_lessBoolean($this->themeSettings->usePageEdges);
$this->lessVariables['edge-left-offset'] = 0;
$this->lessVariables['edge-right-offset'] = 0;
$this->lessVariables['edges-opacity'] = 1;
-
$this->lessVariables['audioplayer-background-color'] = Color::colorToCSS($this->themeSettings->audioplayerBackgroundColor ?: $this->themeSettings->couleurL);
$this->lessVariables['audioplayer-icon-color'] = Color::colorToCSS($this->themeSettings->audioplayerIconColor);
$this->config->audioplayerStrokeColor = $this->lessVariables['audioplayer-stroke-color'] = Color::colorToCSS($this->themeSettings->audioplayerStrokeColor ?: $this->themeSettings->couleurL);
use Cubist\Backpack\Http\Controllers\Base\XSendFileController;
use Cubist\Util\PHP;
use Illuminate\Support\Facades\Auth;
-use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;
// __('!!Paramètres des fluidbooks')
return $this->loadingCompile($url, $id, $hash);
}
+
return $this->preview($version, $fluidbook, $theme, $path, $skipCompile);
}
$isScorm = $version === 'scorm';
+ if ($skipCompile && !file_exists($fluidbook->getFinalPath() . '/index.html')) {
+ $skipCompile = false;
+ }
+
$dest = $fluidbook->getFinalPath($theme, $isScorm);
if ($path === 'index.html') {
$fluidbook->incrementPreviewVisit();
namespace App\Models;
+use App\Fields\BlendMode;
use App\Fields\FluidbookFont;
use App\Fields\FluidbookThemeImage;
-use App\Fields\HorizontalAlign;
-use App\Fields\ThemeBackgroundSize;
-use App\Fields\VerticalAlign;
use App\Http\Controllers\Admin\Operations\ChangeownerOperation;
use App\Jobs\GenerateThemePreview;
-use App\Jobs\UpdateWS2ThemeTable;
use App\Models\Base\ToolboxModel;
use App\Models\Traits\ToolboxSettings;
use Cubist\Backpack\Magic\EntityData;
-use Cubist\Backpack\Magic\Fields\Color;
use Cubist\Backpack\Magic\Fields\Files;
+use Cubist\Backpack\Magic\Fields\FormSeparator;
use Cubist\Backpack\Magic\Fields\SelectFromArray;
use Cubist\Backpack\Magic\Fields\SelectFromModel;
use Cubist\Util\CommandLine;
'default' => true,
'translatable' => false,
]);
+ $this->addField('sep_shade', FormSeparator::class);
$this->addField([
'name' => 'bookShadeColor',
'type' => 'Color',
'allows_alpha' => true,
'translatable' => false,
]);
+ $this->addField('bookShadeMultiply', BlendMode::class, __('Blend mode de l\'ombre'));
$this->addField([
'name' => 'section_numbers',
'type' => FluidbookThemeImage::class,
'label' => __('Icone (pour favicon, apps et exe)'),
'mime_types' => ['image/png'],
- 'hint' => __('Image PNG de 256x256').', '.__('pas de transparence'),
+ 'hint' => __('Image PNG de 256x256') . ', ' . __('pas de transparence'),
'translatable' => false,
]);
$this->addField([