diff --git a/core/class/layout.class.php b/core/class/layout.class.php index aff4259..0df3179 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -915,6 +915,10 @@ class layout extends common 'href' => helper::baseUrl() . 'course', 'help' => 'Cours' ]) . ''; + $leftItems .= '
Pied de page personnalisé
', - 'textPosition' => 'left', - 'textAlign' => 'left', - 'textTransform' => 'none', - 'socialsPosition' => 'center', - 'socialsAlign' => 'center', - 'displayVersion' => true, - 'displaySiteMap' => true, - 'displayCopyright' => false, - 'displayCookie' => false, - 'displayLegal' => false, - 'displaySearch' => false, - 'memberBar' => true, - 'template' => '3' - ], - 'header' => [ - 'backgroundColor' => 'rgba(32, 59, 82, 1)', - 'font' => 'arial', - 'fontSize' => '2em', - 'fontWeight' => 'normal', - 'height' => '150px', - 'image' => 'banniere960.jpg', - 'imagePosition' => 'center center', - 'imageRepeat' => 'no-repeat', - 'margin' => false, - 'position' => 'site', - 'textAlign' => 'center', - 'textColor' => 'rgba(255, 255, 255, 1)', - 'textHide' => false, - 'textTransform' => 'none', - 'linkHomePage' => true, - 'imageContainer' => 'auto', - 'tinyHidden' => true, - 'feature' => 'wallpaper', - 'featureContent' => 'Bannière vide
', - 'width' => 'container' - ], - 'menu' => [ - 'backgroundColor' => 'rgba(32, 59, 82, 1)', - 'backgroundColorSub' => 'rgba(32, 59, 82, 1)', - 'font' => 'arial', - 'fontSize' => '1em', - 'fontWeight' => 'normal', - 'height' => '15px 10px', - 'loginLink' => false, - 'margin' => false, - 'position' => 'site-second', - 'textAlign' => 'left', - 'textColor' => 'rgba(255, 255, 255, 1)', - 'textTransform' => 'none', - 'fixed' => false, - 'activeColorAuto' => true, - 'activeColor' => 'rgba(255, 255, 255, 1)', - 'activeTextColor' => 'rgba(255, 255, 255, 1)', - 'radius' => '0px', - 'memberBar' => false, - 'burgerLogo' => '', - 'burgerContent' => 'title', - 'width' => 'container' - ], - 'site' => [ - 'backgroundColor' => 'rgba(255, 255, 255, 1)', - 'radius' => '0px', - 'shadow' => '0px 0px 0px', - 'width' => '960px' - ], - 'block' => [ - 'backgroundColor' => 'rgba(236, 239, 241, 1)', - 'borderColor' => 'rgba(236, 239, 241, 1)' - ], - 'text' => [ - 'font' => 'georgia', - 'fontSize' => '13px', - 'textColor' => 'rgba(33, 34, 35, 1)', - 'linkColor' => 'rgba(74, 105, 189, 1)' - ], - 'title' => [ - 'font' => 'arial', - 'fontWeight' => 'normal', - 'textColor' => 'rgba(74, 105, 189, 1)', - 'textTransform' => 'none' - ], - 'button' => [ - 'backgroundColor' => 'rgba(32, 59, 82, 1)' - ], - 'version' => 0 - ], 'admin' => [ 'backgroundColor' => 'rgba(255, 255, 255, 1)', 'fontText' => 'georgia', @@ -865,6 +755,116 @@ class init extends common 'js' => '' ] ], + 'theme' => [ + 'body' => [ + 'backgroundColor' => 'rgba(236, 239, 241, 1)', + 'image' => '', + 'imageAttachment' => 'scroll', + 'imageRepeat' => 'no-repeat', + 'imagePosition' => 'top center', + 'imageSize' => 'auto', + 'toTopbackgroundColor' => 'rgba(33, 34, 35, .8)', + 'toTopColor' => 'rgba(255, 255, 255, 1)' + ], + 'footer' => [ + 'backgroundColor' => 'rgba(255, 255, 255, 1)', + 'font' => 'georgia', + 'fontSize' => '.8em', + 'fontWeight' => 'normal', + 'height' => '5px', + 'loginLink' => true, + 'margin' => true, + 'position' => 'site', + 'textColor' => 'rgba(33, 34, 35, 1)', + 'copyrightPosition' => 'right', + 'copyrightAlign' => 'right', + 'text' => 'Pied de page personnalisé
', + 'textPosition' => 'left', + 'textAlign' => 'left', + 'textTransform' => 'none', + 'socialsPosition' => 'center', + 'socialsAlign' => 'center', + 'displayVersion' => true, + 'displaySiteMap' => true, + 'displayCopyright' => false, + 'displayCookie' => false, + 'displayLegal' => false, + 'displaySearch' => false, + 'memberBar' => true, + 'template' => '3' + ], + 'header' => [ + 'backgroundColor' => 'rgba(32, 59, 82, 1)', + 'font' => 'arial', + 'fontSize' => '2em', + 'fontWeight' => 'normal', + 'height' => '150px', + 'image' => 'banniere960.jpg', + 'imagePosition' => 'center center', + 'imageRepeat' => 'no-repeat', + 'margin' => false, + 'position' => 'site', + 'textAlign' => 'center', + 'textColor' => 'rgba(255, 255, 255, 1)', + 'textHide' => false, + 'textTransform' => 'none', + 'linkHomePage' => true, + 'imageContainer' => 'auto', + 'tinyHidden' => true, + 'feature' => 'wallpaper', + 'featureContent' => 'Bannière vide
', + 'width' => 'container' + ], + 'menu' => [ + 'backgroundColor' => 'rgba(32, 59, 82, 1)', + 'backgroundColorSub' => 'rgba(32, 59, 82, 1)', + 'font' => 'arial', + 'fontSize' => '1em', + 'fontWeight' => 'normal', + 'height' => '15px 10px', + 'loginLink' => false, + 'margin' => false, + 'position' => 'site-second', + 'textAlign' => 'left', + 'textColor' => 'rgba(255, 255, 255, 1)', + 'textTransform' => 'none', + 'fixed' => false, + 'activeColorAuto' => true, + 'activeColor' => 'rgba(255, 255, 255, 1)', + 'activeTextColor' => 'rgba(255, 255, 255, 1)', + 'radius' => '0px', + 'memberBar' => false, + 'burgerLogo' => '', + 'burgerContent' => 'title', + 'width' => 'container' + ], + 'site' => [ + 'backgroundColor' => 'rgba(255, 255, 255, 1)', + 'radius' => '0px', + 'shadow' => '0px 0px 0px', + 'width' => '960px' + ], + 'block' => [ + 'backgroundColor' => 'rgba(236, 239, 241, 1)', + 'borderColor' => 'rgba(236, 239, 241, 1)' + ], + 'text' => [ + 'font' => 'georgia', + 'fontSize' => '13px', + 'textColor' => 'rgba(33, 34, 35, 1)', + 'linkColor' => 'rgba(74, 105, 189, 1)' + ], + 'title' => [ + 'font' => 'arial', + 'fontWeight' => 'normal', + 'textColor' => 'rgba(74, 105, 189, 1)', + 'textTransform' => 'none' + ], + 'button' => [ + 'backgroundColor' => 'rgba(32, 59, 82, 1)' + ], + 'version' => 0 + ], 'module' => [ 'contact' => [ 'config' => [ @@ -1009,7 +1009,118 @@ class init extends common 'js' => '' ], ], - 'module' => [] + 'theme' => [ + 'body' => [ + 'backgroundColor' => 'rgba(236, 239, 241, 1)', + 'image' => '', + 'imageAttachment' => 'scroll', + 'imageRepeat' => 'no-repeat', + 'imagePosition' => 'top center', + 'imageSize' => 'auto', + 'toTopbackgroundColor' => 'rgba(33, 34, 35, .8)', + 'toTopColor' => 'rgba(255, 255, 255, 1)' + ], + 'footer' => [ + 'backgroundColor' => 'rgba(255, 255, 255, 1)', + 'font' => 'georgia', + 'fontSize' => '.8em', + 'fontWeight' => 'normal', + 'height' => '5px', + 'loginLink' => true, + 'margin' => true, + 'position' => 'site', + 'textColor' => 'rgba(33, 34, 35, 1)', + 'copyrightPosition' => 'right', + 'copyrightAlign' => 'right', + 'text' => 'Pied de page personnalisé
', + 'textPosition' => 'left', + 'textAlign' => 'left', + 'textTransform' => 'none', + 'socialsPosition' => 'center', + 'socialsAlign' => 'center', + 'displayVersion' => true, + 'displaySiteMap' => true, + 'displayCopyright' => false, + 'displayCookie' => false, + 'displayLegal' => false, + 'displaySearch' => false, + 'memberBar' => true, + 'template' => '3' + ], + 'header' => [ + 'backgroundColor' => 'rgba(32, 59, 82, 1)', + 'font' => 'arial', + 'fontSize' => '2em', + 'fontWeight' => 'normal', + 'height' => '150px', + 'image' => 'banniere960.jpg', + 'imagePosition' => 'center center', + 'imageRepeat' => 'no-repeat', + 'margin' => false, + 'position' => 'site', + 'textAlign' => 'center', + 'textColor' => 'rgba(255, 255, 255, 1)', + 'textHide' => false, + 'textTransform' => 'none', + 'linkHomePage' => true, + 'imageContainer' => 'auto', + 'tinyHidden' => true, + 'feature' => 'wallpaper', + 'featureContent' => 'Bannière vide
', + 'width' => 'container' + ], + 'menu' => [ + 'backgroundColor' => 'rgba(32, 59, 82, 1)', + 'backgroundColorSub' => 'rgba(32, 59, 82, 1)', + 'font' => 'arial', + 'fontSize' => '1em', + 'fontWeight' => 'normal', + 'height' => '15px 10px', + 'loginLink' => false, + 'margin' => false, + 'position' => 'site-second', + 'textAlign' => 'left', + 'textColor' => 'rgba(255, 255, 255, 1)', + 'textTransform' => 'none', + 'fixed' => false, + 'activeColorAuto' => true, + 'activeColor' => 'rgba(255, 255, 255, 1)', + 'activeTextColor' => 'rgba(255, 255, 255, 1)', + 'radius' => '0px', + 'memberBar' => false, + 'burgerLogo' => '', + 'burgerContent' => 'title', + 'width' => 'container' + ], + 'site' => [ + 'backgroundColor' => 'rgba(255, 255, 255, 1)', + 'radius' => '0px', + 'shadow' => '0px 0px 0px', + 'width' => '960px' + ], + 'block' => [ + 'backgroundColor' => 'rgba(236, 239, 241, 1)', + 'borderColor' => 'rgba(236, 239, 241, 1)' + ], + 'text' => [ + 'font' => 'georgia', + 'fontSize' => '13px', + 'textColor' => 'rgba(33, 34, 35, 1)', + 'linkColor' => 'rgba(74, 105, 189, 1)' + ], + 'title' => [ + 'font' => 'arial', + 'fontWeight' => 'normal', + 'textColor' => 'rgba(74, 105, 189, 1)', + 'textTransform' => 'none' + ], + 'button' => [ + 'backgroundColor' => 'rgba(32, 59, 82, 1)' + ], + 'version' => 0 + ], + 'module' => [ + ], ]; public static $courseContent = [ diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index fa0b537..b348ed4 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -1043,8 +1043,8 @@ class theme extends common // Archive de thème ? if ( file_exists(self::TEMP_DIR . $tempFolder . '/site/data/custom.css') - and file_exists(self::TEMP_DIR . $tempFolder . '/site/data/theme.css') - and file_exists(self::TEMP_DIR . $tempFolder . '/site/data/theme.json') + and file_exists(self::TEMP_DIR . $tempFolder . '/site/data/' . self::$siteContent . '/theme.css') + and file_exists(self::TEMP_DIR . $tempFolder . '/site/data/' . self::$siteContent . '/theme.json') ) { $modele = 'theme'; } @@ -1064,9 +1064,9 @@ class theme extends common // Un remplacement nécessite la régénération de la feuille de style if ( $c > 0 - and file_exists(self::DATA_DIR . 'theme.css') + and file_exists(self::DATA_DIR . self::$siteContent . 'theme.css') ) { - unlink(self::DATA_DIR . 'theme.css'); + unlink(self::DATA_DIR . self::$siteContent . 'theme.css'); } } if ($modele = 'admin') { @@ -1192,7 +1192,7 @@ class theme extends common break; case 'theme': $zip->addFile(self::DATA_DIR . 'theme.json', self::DATA_DIR . 'theme.json'); - $zip->addFile(self::DATA_DIR . 'theme.css', self::DATA_DIR . 'theme.css'); + $zip->addFile(self::DATA_DIR . self::$siteContent . 'theme.css', self::DATA_DIR . self::$siteContent . 'theme.css'); $zip->addFile(self::DATA_DIR . 'custom.css', self::DATA_DIR . 'custom.css'); // Traite l'image dans le body if ($this->getData(['theme', 'body', 'image']) !== '') { diff --git a/core/vendor/tinymce/init.js b/core/vendor/tinymce/init.js index ee74aeb..561268d 100644 --- a/core/vendor/tinymce/init.js +++ b/core/vendor/tinymce/init.js @@ -94,8 +94,8 @@ tinymce.init({ content_css: [ baseUrl + "core/layout/common.css", baseUrl + "core/vendor/tinymce/content.css", - baseUrl + "site/data/theme.css", - baseUrl + "site/data/custom.css" + baseUrl + "site/data/home/theme.css", + baseUrl + "site/data/home/custom.css" ], // Classe à ajouter à la balise body dans l'iframe body_class: "editorWysiwyg", @@ -277,7 +277,7 @@ tinymce.init({ content_css: [ baseUrl + "core/layout/common.css", baseUrl + "core/vendor/tinymce/content.css", - baseUrl + "site/data/theme.css", + baseUrl + "site/data/home/theme.css", baseUrl + "site/data/custom.css" ], // Classe à ajouter à la balise body dans l'iframe