use Accessibility;
use Tabs;
use PDF;
+ use Screensaver;
/** @var Lock */
protected $lock;
$this->log('XML Articles written');
$this->writeSlider();
$this->log('Slider written');
+ $this->writeScreensaver();
+ $this->log('Screensaver written');
$linksCSS = $this->writeLinks();
$this->log('Links written');
$this->writeArticles();
--- /dev/null
+<?php
+
+namespace App\Fluidbook\Compiler;
+
+use App\Fluidbook\Link\Link;
+
+trait Screensaver
+{
+ public function writeScreensaver()
+ {
+ if (!$this->config->screensaver) {
+ return false;
+ }
+ $this->addJsLib('screensaver', ['js/libs/fluidbook/fluidbook.screensaver.js']);
+ $this->vdir->copy($this->wdir . '/' . $this->config->screensaver, 'data/screensaver/' . $this->config->screensaver);
+ }
+}
protected static $_farmServers = [
['name' => 'alphaville', 'host' => 'fluidbook-processfarm', 'port' => 9000, 'weight' => 12, 'region' => Region::EUROPE, 'local' => false],
['name' => 'brazil', 'host' => 'brazil.cubedesigners.com', 'weight' => 6, 'region' => Region::USA, 'local' => false],
- ['name' => 'cloudatlats', 'host' => 'cloudatlas.cubedesigners.com', 'weight' => 4, 'region' => Region::EUROPE, 'local' => false],
+ ['name' => 'cloudatlas', 'host' => 'cloudatlas.cubedesigners.com', 'weight' => 4, 'region' => Region::EUROPE, 'local' => false],
['name' => 'dracula', 'host' => 'dracula.cubedesigners.com', 'weight' => 1, 'region' => Region::EUROPE, 'local' => true],
['name' => 'dobermann', 'host' => 'dobermann.cubedesigners.com', 'weight' => 6, 'region' => Region::EUROPE, 'local' => false],
['name' => 'elephantman', 'host' => 'paris.cubedesigners.com', 'weight' => 2, 'region' => Region::EUROPE, 'local' => false],
protected static $acceptPDF = ['.pdf'];
protected static $acceptZip = ['.zip'];
protected static $acceptFont = ['.ttf', '.otf', '.woff', '.woff2'];
+ protected static $acceptLottie = ['.zip', '.html', '.json', '.lottie'];
+ protected static $acceptVideo = ['.mp4'];
public function setSettingsFields()
$this->_archives();
$this->_form();
$this->_plv();
+ $this->_screensaver();
$this->_performances();
}
}
+ protected function _screensaver()
+ {
+ $this->addSettingField('section_screensaver', FormSection::class, $this->__('Économiseur d\'écran'));
+ $this->addSettingField('screensaver', FilesOrURL::class, __('Animation'), ['accept' => static::$acceptVideo]);
+ $this->addSettingField('screensaver_sleep_time', Integer::class, __('Activer après un temps d\'inactivité'), ['when' => ['screensaver' => '_not_empty_'], 'suffix' => __('secondes'), 'default' => 60, 'min' => 1]);
+ $this->addSettingField('screensaver_wake_action', SelectFromArray::class, __('Action à effectuer au réveil'), ['when' => ['screensaver' => '_not_empty_'], 'default' => 'none', 'options' => ['none' => __('Aucune action'), 'page' => __('Aller à une page')]]);
+ $this->addSettingField('screensaver_wake_page', Text::class, __('Au réveil, aller à la page'), ['when' => ['screensaver' => '_not_empty_', 'screensaver_wake_action' => 'page'], 'default' => 1]);
+ }
+
protected function _theme()
{
$this->addSettingField('section_theme', FormSection::class, $this->__('Options du thème'));