Fontes utilisées okay pour tests

This commit is contained in:
Fred Tempez 2022-02-09 15:21:44 +01:00
parent 225f38064c
commit fa4b762d00
1 changed files with 16 additions and 17 deletions

View File

@ -553,26 +553,25 @@ class theme extends common {
// Polices liées au thème // Polices liées au thème
$used = [ $used = [
$this->getData (['theme', 'header', 'font']) => 'Bannière', 'Bannière' => $this->getData (['theme', 'header', 'font']),
$this->getData (['theme', 'menu', 'font']) => 'Menu', 'Menu' => $this->getData (['theme', 'menu', 'font']),
$this->getData (['theme', 'title', 'font']) => 'Titre', 'Titre ' => $this->getData (['theme', 'title', 'font']),
$this->getData (['theme', 'text', 'font']) => 'Texte', 'Texte' => $this->getData (['theme', 'text', 'font']),
$this->getData (['theme', 'footer', 'font']) => 'Pied de page', 'Pied de page' => $this->getData (['theme', 'footer', 'font']),
$this->getData (['admin', 'fontTitle' ]) => 'Titre (admin)', 'Titre (admin)' => $this->getData (['admin', 'fontTitle' ]),
$this->getData (['admin', 'fontText' ]) => 'Admin (texte)' 'Admin (texte)' => $this->getData (['admin', 'fontText' ])
]; ];
$fontUsed = [];
foreach (self::$fonts as $fontId => $fontName) {
foreach ($used as $key => $value) {
if ( $key === $fontId) {
$fontUsed[$fontId] = $value . ' ';
} else {
$fontUsed[$fontId] = '';
}
}
}
// Parcourir les fontes installées et construire le tableau pour le formulaire // Parcourir les fontes installées et construire le tableau pour le formulaire
foreach (self::$fonts as $fontId => $fontName) { foreach (self::$fonts as $fontId => $fontName) {
// Fontes utilisées par le thème
$fontUsed[$fontId] = '';
foreach ($used as $key => $value) {
if ( $value === $fontId) {
$fontUsed[$fontId] .= $key . '<br/>';
}
}
self::$fontsList [] = [ self::$fontsList [] = [
$fontName, $fontName,
$fontId, $fontId,