forked from ZwiiCMS-Team/ZwiiCMS
Merge branch 'master' into 11000
This commit is contained in:
commit
9281e13e87
@ -17,8 +17,9 @@
|
|||||||
Corrections :
|
Corrections :
|
||||||
- Champs de formulaire, uniformisation de la hauteur (select, input, etc) identique à celle des boutons à 9px.
|
- 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.
|
- Module search : texte d'aide dans la zone de saisie non pris en compte.
|
||||||
Modification :
|
Modifications :
|
||||||
- Ajout au sélecteur de date d'un bouton d'effacement identique à celui du sélecteur de fichiers.
|
- 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
|
## version 10.6.00
|
||||||
Cette version apporte aux modules une autonomie complète par rapport au noyau.
|
Cette version apporte aux modules une autonomie complète par rapport au noyau.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
class news extends common {
|
class news extends common {
|
||||||
|
|
||||||
const VERSION = '3.1';
|
const VERSION = '3.2';
|
||||||
const REALNAME = 'Actualités';
|
const REALNAME = 'Actualités';
|
||||||
const DELETE = true;
|
const DELETE = true;
|
||||||
const UPDATE = '0.0';
|
const UPDATE = '0.0';
|
||||||
@ -68,10 +68,10 @@ class news extends common {
|
|||||||
];
|
];
|
||||||
|
|
||||||
public static $itemsBlur = [
|
public static $itemsBlur = [
|
||||||
'100%' => 'Aucun',
|
'0%' => 'Aucun',
|
||||||
'90%' => 'Faible',
|
'15%' => 'Faible',
|
||||||
'75%' => 'Modéré',
|
'30%' => 'Modéré',
|
||||||
'60%' => 'Important',
|
'45%' => 'Important',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Signature de l'article
|
// Signature de l'article
|
||||||
@ -136,10 +136,12 @@ class news extends common {
|
|||||||
if($this->isPost()) {
|
if($this->isPost()) {
|
||||||
// Crée la news
|
// Crée la news
|
||||||
$newsId = helper::increment($this->getInput('newsAddTitle', helper::FILTER_ID), (array) $this->getData(['module', $this->getUrl(0)]));
|
$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, [
|
$this->setData(['module', $this->getUrl(0),'posts', $newsId, [
|
||||||
'content' => $this->getInput('newsAddContent', null),
|
'content' => $this->getInput('newsAddContent', null),
|
||||||
'publishedOn' => $this->getInput('newsAddPublishedOn', helper::FILTER_DATETIME, true),
|
'publishedOn' => $publishedOn,
|
||||||
'publishedOff' => $this->getInput('newsAddPublishedOff', helper::FILTER_DATETIME),
|
'publishedOff' => $publishedOff,
|
||||||
'state' => $this->getInput('newsAddState', helper::FILTER_BOOLEAN),
|
'state' => $this->getInput('newsAddState', helper::FILTER_BOOLEAN),
|
||||||
'title' => $this->getInput('newsAddTitle', helper::FILTER_STRING_SHORT, true),
|
'title' => $this->getInput('newsAddTitle', helper::FILTER_STRING_SHORT, true),
|
||||||
'userId' => $this->getInput('newsAddUserId', helper::FILTER_ID, true)
|
'userId' => $this->getInput('newsAddUserId', helper::FILTER_ID, true)
|
||||||
@ -185,8 +187,11 @@ class news extends common {
|
|||||||
|
|
||||||
// Générer la feuille de CSS
|
// Générer la feuille de CSS
|
||||||
$style = '.newsContent {height:' . $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT) . ';}';
|
$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) );';
|
if ($this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) !== '100%') {
|
||||||
$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
|
// Dossier de l'instance
|
||||||
if (!is_dir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0))) {
|
if (!is_dir(self::DATADIRECTORY . 'pages/' . $this->getUrl(0))) {
|
||||||
@ -331,7 +336,7 @@ class news extends common {
|
|||||||
$this->deleteData(['module', $this->getUrl(0),'posts', $this->getUrl(2)]);
|
$this->deleteData(['module', $this->getUrl(0),'posts', $this->getUrl(2)]);
|
||||||
}
|
}
|
||||||
$publishedOn = $this->getInput('newsEditPublishedOn', helper::FILTER_DATETIME, true);
|
$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, [
|
$this->setData(['module', $this->getUrl(0),'posts', $newsId, [
|
||||||
'content' => $this->getInput('newsEditContent', null),
|
'content' => $this->getInput('newsEditContent', null),
|
||||||
'publishedOn' => $publishedOn,
|
'publishedOn' => $publishedOn,
|
||||||
@ -480,6 +485,15 @@ class news extends common {
|
|||||||
$this->setData(['module', $this->getUrl(0), 'theme', init::$defaultTheme]);
|
$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' ]);
|
$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' ]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -508,8 +522,9 @@ class news extends common {
|
|||||||
if ( !file_exists(self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css')) {
|
if ( !file_exists(self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css')) {
|
||||||
// Générer la feuille de CSS
|
// Générer la feuille de CSS
|
||||||
$style = '.newsContent {height: ' . $this->getData([ 'module', $this->getUrl(0), 'theme', 'itemsHeight' ]) .';}';
|
$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) );';
|
// Pas d'effet flou à l'initialisation
|
||||||
$style .= ' background-clip: text;-webkit-background-clip: text;-webkit-text-fill-color: transparent;}';
|
//$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
|
// Sauver la feuille de style
|
||||||
file_put_contents(self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css' , $style );
|
file_put_contents(self::DATADIRECTORY . 'pages/' . $this->getUrl(0) . '/theme.css' , $style );
|
||||||
// Stocker le nom de la feuille de style
|
// Stocker le nom de la feuille de style
|
||||||
|
@ -5,10 +5,10 @@ class init extends search {
|
|||||||
'feedsLabel' => '',
|
'feedsLabel' => '',
|
||||||
'itemsperPage' => 8,
|
'itemsperPage' => 8,
|
||||||
'itemsperCol' => 12,
|
'itemsperCol' => 12,
|
||||||
'versionData' => '3.0'
|
'versionData' => '3.2'
|
||||||
];
|
];
|
||||||
public static $defaultTheme = [
|
public static $defaultTheme = [
|
||||||
'itemsHeight' => 'auto',
|
'itemsHeight' => 'auto',
|
||||||
'itemsBlur' => '100%'
|
'itemsBlur' => '0%'
|
||||||
];
|
];
|
||||||
}
|
}
|
@ -28,13 +28,16 @@
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
.newsBlur {
|
.newsBlur {
|
||||||
background: linear-gradient(#333 90%,#FFF );
|
width: 100%;
|
||||||
background-clip: text;
|
height: 50%;
|
||||||
-webkit-background-clip: text;
|
position: absolute;
|
||||||
-webkit-text-fill-color: transparent;
|
bottom: 0;
|
||||||
}*/
|
left: -20px;
|
||||||
|
z-index: 10;
|
||||||
|
backdrop-filter: blur(1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.newsSignature {
|
.newsSignature {
|
||||||
|
@ -5,8 +5,10 @@
|
|||||||
<h2 class="newsTitle" id="<?php echo $newsId;?>">
|
<h2 class="newsTitle" id="<?php echo $newsId;?>">
|
||||||
<?php echo '<a href="'. helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
|
<?php echo '<a href="'. helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="newsContent newsBlur">
|
<div class="newsContent">
|
||||||
<?php echo $news['content']; ?>
|
<?php echo $news['content']; ?>
|
||||||
|
<div class="newsBlur">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="newsSignature">
|
<div class="newsSignature">
|
||||||
<i class="far fa-calendar-alt"></i>
|
<i class="far fa-calendar-alt"></i>
|
||||||
@ -36,7 +38,7 @@
|
|||||||
<div id="rssFeed">
|
<div id="rssFeed">
|
||||||
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
|
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
|
||||||
<img src='module/news/ressource/feed-icon-16.gif' />
|
<img src='module/news/ressource/feed-icon-16.gif' />
|
||||||
<?php
|
<?php
|
||||||
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user