News OK + blur option
This commit is contained in:
parent
1f32a6e7cc
commit
5e481ca3d7
@ -44,7 +44,7 @@ class news extends common {
|
|||||||
public static $users = [];
|
public static $users = [];
|
||||||
|
|
||||||
// Nombre d'objets par page
|
// Nombre d'objets par page
|
||||||
public static $ItemsList = [
|
public static $itemsList = [
|
||||||
4 => '4 articles',
|
4 => '4 articles',
|
||||||
8 => '8 articles',
|
8 => '8 articles',
|
||||||
12 => '12 articles',
|
12 => '12 articles',
|
||||||
@ -52,7 +52,7 @@ class news extends common {
|
|||||||
22 => '22 articles'
|
22 => '22 articles'
|
||||||
];
|
];
|
||||||
// Nombre de colone par page
|
// Nombre de colone par page
|
||||||
public static $Columns = [
|
public static $columns = [
|
||||||
12 => '1 Colonne',
|
12 => '1 Colonne',
|
||||||
6 => '2 Colonnes',
|
6 => '2 Colonnes',
|
||||||
4 => '3 Colonnes',
|
4 => '3 Colonnes',
|
||||||
@ -60,10 +60,18 @@ class news extends common {
|
|||||||
];
|
];
|
||||||
public static $nbrCol = 1;
|
public static $nbrCol = 1;
|
||||||
|
|
||||||
public static $ItemsHeight = [
|
public static $itemsHeight = [
|
||||||
'200px' => 'Petit',
|
'200px' => 'Petite',
|
||||||
'300px' => 'Moyen',
|
'300px' => 'Moyenne',
|
||||||
'400px' => 'Grand'
|
'400px' => 'Grande',
|
||||||
|
'auto' => 'Article complet'
|
||||||
|
];
|
||||||
|
|
||||||
|
public static $itemsBlur = [
|
||||||
|
'100%' => 'Aucun',
|
||||||
|
'90%' => 'Petit',
|
||||||
|
'80%' => 'Moyen',
|
||||||
|
'70%' => 'Grand',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Signature de l'article
|
// Signature de l'article
|
||||||
@ -178,6 +186,9 @@ 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(#333 ' . $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT) . ',#FFF );';
|
||||||
|
$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)) {
|
if (!is_dir(self::DATADIRECTORY)) {
|
||||||
mkdir (self::DATADIRECTORY, 0777, true);
|
mkdir (self::DATADIRECTORY, 0777, true);
|
||||||
@ -189,7 +200,8 @@ class news extends common {
|
|||||||
|
|
||||||
$this->setData(['module', $this->getUrl(0), 'theme',[
|
$this->setData(['module', $this->getUrl(0), 'theme',[
|
||||||
'style' => $success ? self::DATADIRECTORY . $this->getUrl(0) . '.css' : '',
|
'style' => $success ? self::DATADIRECTORY . $this->getUrl(0) . '.css' : '',
|
||||||
'itemsHeight' => $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT)
|
'itemsHeight' => $this->getInput('newsConfigItemsHeight',helper::FILTER_STRING_SHORT),
|
||||||
|
'itemsBlur' => $this->getInput('newsConfigItemsBlur',helper::FILTER_STRING_SHORT)
|
||||||
]]);
|
]]);
|
||||||
|
|
||||||
$this->setData(['module', $this->getUrl(0), 'config',[
|
$this->setData(['module', $this->getUrl(0), 'config',[
|
||||||
@ -405,7 +417,7 @@ class news extends common {
|
|||||||
'showBarEditButton' => true,
|
'showBarEditButton' => true,
|
||||||
'showPageContent' => true,
|
'showPageContent' => true,
|
||||||
'view' => 'index',
|
'view' => 'index',
|
||||||
'style' => $this->getData(['module', $this->getUrl(0),'config', 'style'])
|
'style' => $this->getData(['module', $this->getUrl(0),'theme', 'style'])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -461,6 +473,9 @@ class news extends common {
|
|||||||
|
|
||||||
// Générer la feuille de CSS
|
// Générer la feuille de CSS
|
||||||
$style = '.newsContent {height: ' . $this->getData([ 'module', $moduleId, 'theme', 'itemsHeight' ]) .';}';
|
$style = '.newsContent {height: ' . $this->getData([ 'module', $moduleId, 'theme', 'itemsHeight' ]) .';}';
|
||||||
|
$style .= '.newsBlur {background: linear-gradient(#333 ' . $this->getData([ 'module', $moduleId, 'theme', 'itemsBlur' ]) . ',#FFF );';
|
||||||
|
$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)) {
|
if (!is_dir(self::DATADIRECTORY)) {
|
||||||
mkdir (self::DATADIRECTORY, 0777, true);
|
mkdir (self::DATADIRECTORY, 0777, true);
|
||||||
|
@ -3,11 +3,12 @@ class init extends search {
|
|||||||
public static $defaultData = [
|
public static $defaultData = [
|
||||||
'feeds' => false,
|
'feeds' => false,
|
||||||
'feedsLabel' => '',
|
'feedsLabel' => '',
|
||||||
'itemsperPage' => 16,
|
'itemsperPage' => 8,
|
||||||
'itemsperCol' => 6,
|
'itemsperCol' => 12,
|
||||||
'versionData' => '3.0'
|
'versionData' => '3.0'
|
||||||
];
|
];
|
||||||
public static $defaultTheme = [
|
public static $defaultTheme = [
|
||||||
'itemsHeight' => '200px',
|
'itemsHeight' => '200px',
|
||||||
|
'itemsBlur' => '0%'
|
||||||
];
|
];
|
||||||
}
|
}
|
@ -37,27 +37,32 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block ajouté pour le sélecteur -->
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4">
|
<div class="col3">
|
||||||
<?php echo template::select('newsConfigItemsperCol', $module::$Columns, [
|
<?php echo template::select('newsConfigItemsperCol', $module::$columns, [
|
||||||
'label' => 'Pagination',
|
'label' => 'Pagination',
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperCol']),
|
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperCol']),
|
||||||
'help' => 'Nombre de colonnes par page'
|
'help' => 'Nombre de colonnes par page'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col3">
|
||||||
<?php echo template::select('newsConfigItemsperPage', $module::$ItemsList, [
|
<?php echo template::select('newsConfigItemsperPage', $module::$itemsList, [
|
||||||
'label' => 'Articles par page',
|
'label' => 'Articles par page',
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperPage'])
|
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperPage'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="col4">
|
<div class="col3">
|
||||||
<?php echo template::select('newsConfigItemsHeight', $module::$ItemsHeight, [
|
<?php echo template::select('newsConfigItemsHeight', $module::$itemsHeight, [
|
||||||
'label' => 'Hauteur',
|
'label' => 'Hauteur',
|
||||||
'selected' => $this->getData(['module', $this->getUrl(0),'theme', 'itemsHeight'])
|
'selected' => $this->getData(['module', $this->getUrl(0),'theme', 'itemsHeight'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col3">
|
||||||
|
<?php echo template::select('newsConfigItemsBlur', $module::$itemsBlur, [
|
||||||
|
'label' => 'Effet flou',
|
||||||
|
'selected' => $this->getData(['module', $this->getUrl(0),'theme', 'itemsBlur'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,21 +24,18 @@
|
|||||||
.newsContent {
|
.newsContent {
|
||||||
overflow: hidden; /* les dépassements seront masqués */
|
overflow: hidden; /* les dépassements seront masqués */
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
|
||||||
|
|
||||||
.newsBlur {
|
|
||||||
background: linear-gradient(#333 70%,#FFF );
|
|
||||||
background-clip: text;
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.newsContent {
|
|
||||||
clear: left;
|
clear: left;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
.newsBlur {
|
||||||
|
background: linear-gradient(#333 90%,#FFF );
|
||||||
|
background-clip: text;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
.newsSignature {
|
.newsSignature {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
Loading…
Reference in New Issue
Block a user