From 430befa3c4fff495c76692ba372fe6492d2d1f19 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 15 May 2021 12:04:10 +0200 Subject: [PATCH 1/5] =?UTF-8?q?D=C3=A9publication=20champ=20non=20saisi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/news/news.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/news/news.php b/module/news/news.php index 46f4042a..f03767ef 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -136,10 +136,12 @@ class news extends common { if($this->isPost()) { // Crée la news $newsId = helper::increment($this->getInput('newsAddTitle', helper::FILTER_ID), (array) $this->getData(['module', $this->getUrl(0)])); + $publishedOn = $this->getInput('newsAddPublishedOn', helper::FILTER_DATETIME, true); + $publishedOff = $this->getInput('newsAddPublishedOff' ) ? $this->getInput('newsEditPublishedOff', helper::FILTER_DATETIME) : ''; $this->setData(['module', $this->getUrl(0),'posts', $newsId, [ 'content' => $this->getInput('newsAddContent', null), - 'publishedOn' => $this->getInput('newsAddPublishedOn', helper::FILTER_DATETIME, true), - 'publishedOff' => $this->getInput('newsAddPublishedOff', helper::FILTER_DATETIME), + 'publishedOn' => $publishedOn, + 'publishedOff' => $publishedOff, 'state' => $this->getInput('newsAddState', helper::FILTER_BOOLEAN), 'title' => $this->getInput('newsAddTitle', helper::FILTER_STRING_SHORT, true), 'userId' => $this->getInput('newsAddUserId', helper::FILTER_ID, true) @@ -331,7 +333,7 @@ class news extends common { $this->deleteData(['module', $this->getUrl(0),'posts', $this->getUrl(2)]); } $publishedOn = $this->getInput('newsEditPublishedOn', helper::FILTER_DATETIME, true); - $publishedOff = $this->getInput('newsEditPublishedOff', helper::FILTER_DATETIME); + $publishedOff = $this->getInput('newsEditPublishedOff' ) ? $this->getInput('newsEditPublishedOff', helper::FILTER_DATETIME) : ''; $this->setData(['module', $this->getUrl(0),'posts', $newsId, [ 'content' => $this->getInput('newsEditContent', null), 'publishedOn' => $publishedOn, From 4486ce65139d058abc50d521067e704caa92d510 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 15 May 2021 12:17:53 +0200 Subject: [PATCH 2/5] =?UTF-8?q?news=20d=C3=A9sactivation=20de=20l'effet=20?= =?UTF-8?q?flou?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/news/news.php | 11 +++++++---- module/news/view/index/index.css | 8 -------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/module/news/news.php b/module/news/news.php index f03767ef..087acea3 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -187,8 +187,10 @@ class news extends common { // Générer la feuille de CSS $style = '.newsContent {height:' . $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT) . ';}'; - $style .= '.newsBlur {background: linear-gradient(' . $this->getData(['theme', 'text', 'textColor']) . ' ' . $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) . ',rgba(255,255,255,0) );'; - $style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}'; + if ($this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) !== '100%') { + $style .= '.newsBlur {background: linear-gradient(' . $this->getData(['theme', 'text', 'textColor']) . ' ' . $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) . ',rgba(255,255,255,0) );'; + $style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}'; + } // Dossier de l'instance if (!is_dir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0))) { @@ -510,8 +512,9 @@ class news extends common { if ( !file_exists(self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css')) { // Générer la feuille de CSS $style = '.newsContent {height: ' . $this->getData([ 'module', $this->getUrl(0), 'theme', 'itemsHeight' ]) .';}'; - $style .= '.newsBlur {background: linear-gradient(' . $this->getData(['theme', 'text', 'textColor']) . ' ' . $this->getData([ 'module', $this->getUrl(0), 'theme', 'itemsBlur' ]) . ',rgba(255,255,255,0) );'; - $style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}'; + // Pas d'effet flou à l'initialisation + //$style .= '.newsBlur {background: linear-gradient(' . $this->getData(['theme', 'text', 'textColor']) . ' ' . $this->getData([ 'module', $this->getUrl(0), 'theme', 'itemsBlur' ]) . ',rgba(255,255,255,0) );'; + //$style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}'; // Sauver la feuille de style file_put_contents(self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css' , $style ); // Stocker le nom de la feuille de style diff --git a/module/news/view/index/index.css b/module/news/view/index/index.css index 1b57571c..c9190d33 100755 --- a/module/news/view/index/index.css +++ b/module/news/view/index/index.css @@ -28,14 +28,6 @@ margin-left: 10px; margin-bottom: 30px; } -/* -.newsBlur { - background: linear-gradient(#333 90%,#FFF ); - background-clip: text; - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; -}*/ - .newsSignature { margin-right: 10px; From 8ec673b5498e01d5fe33844dff8a9a9b0a477d16 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 15 May 2021 13:49:04 +0200 Subject: [PATCH 3/5] =?UTF-8?q?news=203.2=20effet=20blur=20modifi=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 5 +++-- module/news/news.php | 15 ++++++++------- module/news/ressource/defaultdata.php | 2 +- module/news/view/index/index.css | 11 +++++++++++ module/news/view/index/index.php | 6 ++++-- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 939382ab..34ea941d 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,8 +4,9 @@ Corrections : - Champs de formulaire, uniformisation de la hauteur (select, input, etc) identique à celle des boutons à 9px. - Module search : texte d'aide dans la zone de saisie non pris en compte. -Modification : - - Ajout au sélecteur de date d'un bouton d'effacement identique à celui du sélecteur de fichiers. +Modifications : + - News 3.2 : ajout au sélecteur de date d'un bouton d'effacement identique à celui du sélecteur de fichiers. + - News 3.2 : décoloration du texte, modification de l'effet blur. ## version 10.6.00 Cette version apporte aux modules une autonomie complète par rapport au noyau. diff --git a/module/news/news.php b/module/news/news.php index 087acea3..ad9d3ffa 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -15,7 +15,7 @@ class news extends common { - const VERSION = '3.1'; + const VERSION = '3.2'; const REALNAME = 'Actualités'; const DELETE = true; const UPDATE = '0.0'; @@ -68,10 +68,10 @@ class news extends common { ]; public static $itemsBlur = [ - '100%' => 'Aucun', - '90%' => 'Faible', - '75%' => 'Modéré', - '60%' => 'Important', + '0%' => 'Aucun', + '15%' => 'Faible', + '30%' => 'Modéré', + '45%' => 'Important', ]; // Signature de l'article @@ -188,8 +188,9 @@ class news extends common { // Générer la feuille de CSS $style = '.newsContent {height:' . $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT) . ';}'; if ($this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) !== '100%') { - $style .= '.newsBlur {background: linear-gradient(' . $this->getData(['theme', 'text', 'textColor']) . ' ' . $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) . ',rgba(255,255,255,0) );'; - $style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}'; + $style .= '.newsBlur {height: ' . $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) . ';}'; + //$style .= '.newsBlur {background: linear-gradient(' . $this->getData(['theme', 'text', 'textColor']) . ' ' . $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) . ',rgba(255,255,255,0) );'; + //$style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}'; } // Dossier de l'instance diff --git a/module/news/ressource/defaultdata.php b/module/news/ressource/defaultdata.php index 4bb863a4..7058fd54 100644 --- a/module/news/ressource/defaultdata.php +++ b/module/news/ressource/defaultdata.php @@ -9,6 +9,6 @@ class init extends search { ]; public static $defaultTheme = [ 'itemsHeight' => 'auto', - 'itemsBlur' => '100%' + 'itemsBlur' => '0%' ]; } \ No newline at end of file diff --git a/module/news/view/index/index.css b/module/news/view/index/index.css index c9190d33..4ebf01a3 100755 --- a/module/news/view/index/index.css +++ b/module/news/view/index/index.css @@ -29,6 +29,17 @@ margin-bottom: 30px; } +.newsBlur { + width: 100%; + height: 50%; + position: absolute; + bottom: 0; + left: -20px; + z-index: 10; + backdrop-filter: blur(1px); +} + + .newsSignature { margin-right: 10px; float: right; diff --git a/module/news/view/index/index.php b/module/news/view/index/index.php index 545ab702..4a09c865 100755 --- a/module/news/view/index/index.php +++ b/module/news/view/index/index.php @@ -5,8 +5,10 @@

getUrl(0) . '/' . $newsId . '">' . $news['title'] . ''; ?>

-
+
+
+
@@ -36,7 +38,7 @@
- ' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '

' ; ?>
From fb3ca86d81f49ffa9c7ff0e8ae94bf2787010bb9 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 15 May 2021 14:17:14 +0200 Subject: [PATCH 4/5] update news versionData --- module/news/news.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/news/news.php b/module/news/news.php index ad9d3ffa..d8c0d94d 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -485,6 +485,15 @@ class news extends common { $this->setData(['module', $this->getUrl(0), 'theme', init::$defaultTheme]); $this->setData(['module', $this->getUrl(0), 'theme', 'style', self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css' ]); } + + $versionData = $this->getData(['module',$this->getUrl(0),'config', 'versionData' ]); + + // Mise à jour 3.2 + if (version_compare($versionData, '3.1', '<') ) { + $this->setData(['module',$this->getUrl(0),'theme', 'itemsBlur', '0%' ]); + // Mettre à jour la verison + $this->setData(['module',$this->getUrl(0),'config', 'versionData', '3.2' ]); + } } /** From fa8ec8534ea46be854bdefabde2115cdbeba65ab Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 15 May 2021 14:18:01 +0200 Subject: [PATCH 5/5] news 3.2 defaultdata --- module/news/ressource/defaultdata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/news/ressource/defaultdata.php b/module/news/ressource/defaultdata.php index 7058fd54..d1e48f2b 100644 --- a/module/news/ressource/defaultdata.php +++ b/module/news/ressource/defaultdata.php @@ -5,7 +5,7 @@ class init extends search { 'feedsLabel' => '', 'itemsperPage' => 8, 'itemsperCol' => 12, - 'versionData' => '3.0' + 'versionData' => '3.2' ]; public static $defaultTheme = [ 'itemsHeight' => 'auto',