$this->fields['title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de la publication"), 'embed' => false);
$this->fields['url_link'] = array('type' => 'text', 'default' => 'http://', 'editable' => true, 'label' => __("URL du lien de retour au site"));
$this->fields['signature'] = array('type' => 'combo', 'default' => '1', 'editable' => true, 'label' => __('Signature'), 'grade' => 3, 'datas' => wsDroits::getSignatures());
- $this->fields['mobileTransitions'] = array('type' => 'combo', 'default' => 'flip', 'editable' => true, 'label' => __('Transitions entre les pages'), 'grade' => 3,
+ $this->fields['mobileTransitions'] = array('type' => 'combo', 'default' => 'flip3d', 'editable' => true, 'label' => __('Transitions entre les pages'), 'grade' => 3,
'datas' => array(__('Aucune transition') => 'none',
__('Glisser') => 'slide',
__('Tourner (rigide)') => 'flip',
- __('Tourner (souple, expérimental)') => 'flip3d')
+ __('Tourner (souple)') => 'flip3d')
);
$this->forms['important'] = array('label' => __('Description de la publication'),
'fieldsnames' => array('version', 'mobileLVersion', 'mobileVersion', 'mobileTransitions', 'title', 'url_link', 'signature'));
$this->fields['product_zoom_references'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
'label' => __('Références produits'), 'grade' => 3, 'fileFilter' => $basketFilter, 'hint' => __('Fichier contenant les références produits'), 'dir' => 'commerce');
$this->fields['product_zoom_buttons_order'] = ['type' => 'combo', 'datas' => [__('De la droite vers la gauche') => 'right', __('De la gauche vers la droite') => 'left'], 'editable' => true, 'grade' => 3, 'default' => 'right', 'label' => __('Order des boutons')];
- $icons = [__('Aucune') => 'none', __('Partage') => 'nav-share', __('Ecran') => 'icon-site', __('Télécharger') => 'nav-download', 'PDF' => 'icon-pdf', 'Video' => 'icon-video', __('Lien') => 'icon-link', __('Code') => 'icon-code', __('QR code') => 'icon-qr'];
+ $icons = [__('Aucune') => 'none', __('Partage') => 'nav-share', __('Ecran') => 'icon-site', __('Télécharger') => 'nav-download', 'PDF' => 'icon-pdf', 'Video' => 'icon-video', __('Lien') => 'icon-link', __('Code') => 'icon-code', __('QR code') => 'icon-qr', __('Article') => 'icon-article'];
$actions = [__('Ouvrir un lien') => 'link', __('Copier un contenu') => 'copy', __('Vidéo') => 'video'];
$f = [];
for ($i = 1; $i <= 3; $i++) {
$this->fields['articlesFont'] = ['type' => 'combo', 'label' => __('Police des articles'), 'default' => 'OpenSans', 'datas' => [
'Open Sans (police du Fluidbook)' => 'OpenSans', 'Montserrat' => 'Montserrat'], 'editable' => 'true', 'grade' => 3];
$this->fields['articlesImages'] = ['type' => 'freefile', 'label' => __('Images des articles'), 'default' => '', 'hint' => __('Les noms des fichiers doivent être les même que ceux des balises <image> du XML'), 'editable' => true, 'grade' => 3, 'dir' => 'articles'];
- $this->fields['articlesShare'] = ['type' => 'boolean', 'default' => true, 'editable' => true, 'label' => 'Activer le partage', 'grade' => 3];
+ $this->fields['articlesShare'] = ['type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer le partage'), 'grade' => 3];
+ $this->fields['articlesStyle'] = ['type' => 'combo', 'default' => true, 'editable' => true, 'label' => __('Style'), 'grade' => 3, 'datas' => ['Défaut' => 'default', 'Atlantic' => 'atlantic', 'Harmonie Mutuelles' => 'harmonie-mutuelle']];
- $this->forms['articles'] = ['label' => __('Articles'), 'fieldsnames' => ['articlesFile', 'articlesShare', 'articlesFont', 'articlesImages']];
+ $this->forms['articles'] = ['label' => __('Articles'), 'fieldsnames' => ['articlesFile', 'articlesShare', 'articlesImages', '|', 'articlesStyle', 'articlesFont']];
//.
$this->fields['externalArchives'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
{
$res = array();
+ $this->addFontKit('OpenSans');
+
$lessContents = '';
$this->lessVariables['css-scale'] = $this->cssScale;
$this->lessVariables['articles-title-color'] = '#565657';
$this->lessVariables['articles-font'] = $this->book->parametres->articlesFont;
- if ($this->book->parametres->articlesFont !== 'OpenSans') {
- $fontPath = $this->addFontKit($this->book->parametres->articlesFont);
- }
+ $fontPath = $this->addFontKit($this->book->parametres->articlesFont);
$svg = '<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><symbol id="nav-print" viewBox="0 0 512 512">
<path d="m424 186l-39 0 0-114c0-9-6-15-14-15l-230 0c-8 0-14 6-14 15l0 114-39 0c-22 0-41 19-41 41l0 121c0 23 19 41 41 41l39 0 0 49c0 8 6 15 14 15l230 0c8 0 14-7 14-15l0-49 39 0c22 0 41-18 41-41l0-121c0-22-19-41-41-41z m-268-100l200 0 0 100-200 0z m200 340l-200 0 0-88 200 0z m80-76c0 6-6 12-12 12l-39 0 0-38c0-9-6-15-14-15l-230 0c-8 0-14 6-14 15l0 38-39 0c-6 0-12-6-12-12l0-121c0-6 6-12 12-12l336 0c6 0 12 6 12 12z m-278-96l-33 0c-8 0-14 6-14 14 0 8 6 15 14 15l35 0c8 0 14-7 14-15 0-8-8-14-16-14z m32 139l132 0c8 0 14-6 14-14 0-8-6-14-14-14l-132 0c-8 0-14 6-14 14 0 8 6 14 14 14z"/>
</symbol></svg>';
- $markupMap = ['category' => 'h3', 'subtitle' => 'h2', 'title' => 'h1', 'lead' => 'div.chapo', 'paragraph' => 'p', 'note' => 'div.note', 'quote' => 'blockquote', 'signature' => 'div.author'];
+ $markupMap = ['category' => 'h3', 'subtitle' => 'h2', 'title' => 'h1', 'lead' => 'div.chapo', 'paragraph' => 'p', 'note' => 'div.note', 'quote' => 'blockquote', 'signature' => 'div.author', 'intertitle' => 'h2.inter', 'separator' => 'hr'];
$x = simplexml_load_string(file_get_contents($f));
$prevurl = '';
}
$this->vdir->copy($this->wdir . '/articles/' . $file, 'data/articles/' . $file);
$legend = (string)$child;
- $inner .= '<figure><img src="data/articles/' . $file . '" alt="' . $legend . '"><figcaption>' . $legend . '</figcaption></figure>';
+ $caption = $legend ? '<figcaption>' . $legend . '</figcaption>' : '';
+ $inner .= '<figure><img src="data/articles/' . $file . '" alt="' . $legend . '">' . $caption . '</figure>';
} else {
$c = trim(((string)$child));
if (!$c) {