13.1.02 fontes
This commit is contained in:
parent
38b3a72c92
commit
51cc6b41a7
@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 13.1.02
|
||||||
|
|
||||||
|
### Correction
|
||||||
|
- Corrige un bug d'installation d'une fonte.
|
||||||
|
- Corrige un bug de redirection vers la liste des fontes après édition ou ajout.
|
||||||
|
|
||||||
|
### Amélioration
|
||||||
|
- Ajoute le filtrage et le tri des fontes de puis la liste du thème.
|
||||||
|
|
||||||
## Version 13.1.01
|
## Version 13.1.01
|
||||||
|
|
||||||
### Améliorations
|
### Améliorations
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# ZwiiCMS 13.1.01
|
# ZwiiCMS 13.1.02
|
||||||
|
|
||||||
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
|
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# ZwiiCMS 13.1.01
|
# ZwiiCMS 13.1.02
|
||||||
|
|
||||||
Zwii is a database-less (flat-file) CMS that allows you to easily create and manage a web site without any programming knowledge.
|
Zwii is a database-less (flat-file) CMS that allows you to easily create and manage a web site without any programming knowledge.
|
||||||
|
|
||||||
|
@ -105,53 +105,14 @@ class core extends common
|
|||||||
// Suppression des polices identiques
|
// Suppression des polices identiques
|
||||||
$fonts = array_unique($fonts);
|
$fonts = array_unique($fonts);
|
||||||
|
|
||||||
/**
|
|
||||||
* Charge les fontes websafe
|
|
||||||
*/
|
|
||||||
$fontFile = '';
|
|
||||||
foreach ($fonts as $fontId) {
|
|
||||||
if (isset($fontsAvailable['websafe'][$fontId])) {
|
|
||||||
$fonts[$fontId] = $fontsAvailable['websafe'][$fontId]['font-family'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chargement des polices en ligne dans un fichier font.html inclus dans main.php
|
* Charge les fontes
|
||||||
*/
|
|
||||||
$fontFile = '';
|
|
||||||
$gf = false;
|
|
||||||
foreach ($fonts as $fontId) {
|
|
||||||
if (isset($fontsAvailable['imported'][$fontId])) {
|
|
||||||
$fontFile .= '<link href="' . $fontsAvailable['imported'][$fontId]['resource'] . '" rel="stylesheet">';
|
|
||||||
// Tableau pour la construction de la feuille de style
|
|
||||||
$fonts[$fontId] = $fontsAvailable['imported'][$fontId]['font-family'];
|
|
||||||
$gf = strpos($fontsAvailable['imported'][$fontId]['resource'], 'fonts.googleapis.com') === false ? $gf || false : $gf || true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Ajoute le préconnect des fontes Googles.
|
|
||||||
$fontFile = $gf ? '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . $fontFile
|
|
||||||
: $fontFile;
|
|
||||||
// Enregistre la personnalisation
|
|
||||||
if (!is_dir(self::DATA_DIR . 'font')) {
|
|
||||||
mkdir(self::DATA_DIR . 'font');
|
|
||||||
}
|
|
||||||
file_put_contents(self::DATA_DIR . 'font/font.html', $fontFile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fontes installées localement
|
|
||||||
*/
|
*/
|
||||||
foreach ($fonts as $fontId) {
|
foreach ($fonts as $fontId) {
|
||||||
// Validité du tableau :
|
foreach (['websafe', 'imported', 'files'] as $typeFont) {
|
||||||
if (isset($fontsAvailable['files'][$fontId])) {
|
if (isset($fontsAvailable[$typeFont][$fontId])) {
|
||||||
if (file_exists(self::DATA_DIR . 'font/' . $fontId)) {
|
$fonts[$fontId] = $fontsAvailable[$typeFont][$fontId]['font-family'];
|
||||||
// Chargement de la police
|
|
||||||
$css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";';
|
|
||||||
$css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'font/' . $fontsAvailable['files'][$fontId]['resource'] . '");}';
|
|
||||||
// Tableau pour la construction de la feuille de style
|
|
||||||
$fonts[$fontId] = $fontsAvailable['files'][$fontId]['font-family'];
|
|
||||||
} else {
|
|
||||||
// Le fichier de font n'est pas disponible, fonte par défaut
|
|
||||||
$fonts[$fontId] = 'verdana';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -311,12 +272,6 @@ class core extends common
|
|||||||
$css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
|
$css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
|
||||||
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
|
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
|
||||||
|
|
||||||
// Enregistre les fontes
|
|
||||||
if (!is_dir(self::DATA_DIR . 'font')) {
|
|
||||||
mkdir(self::DATA_DIR . 'font');
|
|
||||||
}
|
|
||||||
file_put_contents(self::DATA_DIR . 'font/font.html', $fontFile);
|
|
||||||
|
|
||||||
// Enregistre la personnalisation
|
// Enregistre la personnalisation
|
||||||
file_put_contents(self::DATA_DIR . 'theme.css', $css);
|
file_put_contents(self::DATA_DIR . 'theme.css', $css);
|
||||||
|
|
||||||
@ -352,44 +307,12 @@ class core extends common
|
|||||||
$fonts = array_unique($fonts);
|
$fonts = array_unique($fonts);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Charge les fontes websafe
|
* Charge les fontes
|
||||||
*/
|
|
||||||
$fontFile = '';
|
|
||||||
foreach ($fonts as $fontId) {
|
|
||||||
if (isset($fontsAvailable['websafe'][$fontId])) {
|
|
||||||
$fonts[$fontId] = $fontsAvailable['websafe'][$fontId]['font-family'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Chargement des polices en ligne dans un fichier font.html inclus dans main.php
|
|
||||||
*/
|
|
||||||
$fontFile = '';
|
|
||||||
foreach ($fonts as $fontId) {
|
|
||||||
if (isset($fontsAvailable['imported'][$fontId])) {
|
|
||||||
$fontFile .= '<link href="' . $fontsAvailable['imported'][$fontId]['resource'] . '" rel="stylesheet">';
|
|
||||||
// Tableau pour la construction de la feuille de style
|
|
||||||
$fonts[$fontId] = $fontsAvailable['imported'][$fontId]['font-family'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Enregistre la personnalisation
|
|
||||||
file_put_contents(self::DATA_DIR . 'font/font.html', $fontFile);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fontes installées localement
|
|
||||||
*/
|
*/
|
||||||
foreach ($fonts as $fontId) {
|
foreach ($fonts as $fontId) {
|
||||||
// Validité du tableau :
|
foreach (['websafe', 'imported', 'files'] as $typeFont) {
|
||||||
if (isset($fontsAvailable['files'][$fontId])) {
|
if (isset($fontsAvailable[$typeFont][$fontId])) {
|
||||||
if (file_exists(self::DATA_DIR . 'font/' . $fontId)) {
|
$fonts[$fontId] = $fontsAvailable[$typeFont][$fontId]['font-family'];
|
||||||
// Chargement de la police
|
|
||||||
$css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";';
|
|
||||||
$css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'font/' . $fontsAvailable['files'][$fontId]['resource'] . '");}';
|
|
||||||
// Tableau pour la construction de la feuille de style
|
|
||||||
$fonts[$fontId] = $fontsAvailable['files'][$fontId]['font-family'];
|
|
||||||
} else {
|
|
||||||
// Le fichier de font n'est pas disponible, fonte par défaut
|
|
||||||
$fonts[$fontId] = 'verdana';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -872,7 +795,7 @@ class core extends common
|
|||||||
if ($accessInfo['userName']) {
|
if ($accessInfo['userName']) {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => 'Accès verrouillé',
|
'title' => 'Accès verrouillé',
|
||||||
'content' => template::speech('<p>'. sprintf(helper::translate('La page %s est ouverte par l\'utilisateur %s</p><p><a style="color:inherit" href="javascript:history.back()">%s</a></p>'), $accessInfo['pageId'], $accessInfo['userName'], helper::translate('Retour')))
|
'content' => template::speech('<p>' . sprintf(helper::translate('La page %s est ouverte par l\'utilisateur %s</p><p><a style="color:inherit" href="javascript:history.back()">%s</a></p>'), $accessInfo['pageId'], $accessInfo['userName'], helper::translate('Retour')))
|
||||||
|
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
@ -884,7 +807,7 @@ class core extends common
|
|||||||
} else {
|
} else {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => 'Accès interdit',
|
'title' => 'Accès interdit',
|
||||||
'content' => template::speech('<p>' . helper::translate('Vous n\'êtes pas autorisé à consulter cette page (erreur 403)') . '</p><p><a style="color:inherit" href="javascript:history.back()">'. helper::translate('Retour') . '</a></p>')
|
'content' => template::speech('<p>' . helper::translate('Vous n\'êtes pas autorisé à consulter cette page (erreur 403)') . '</p><p><a style="color:inherit" href="javascript:history.back()">' . helper::translate('Retour') . '</a></p>')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -898,7 +821,7 @@ class core extends common
|
|||||||
} else {
|
} else {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => 'Page indisponible',
|
'title' => 'Page indisponible',
|
||||||
'content' => template::speech('<p>' . helper::translate('La page demandée n\'existe pas ou est introuvable (erreur 404)') . '</p><p><a style="color:inherit" href="javascript:history.back()">'. helper::translate('Retour') . '</a></p>')
|
'content' => template::speech('<p>' . helper::translate('La page demandée n\'existe pas ou est introuvable (erreur 404)') . '</p><p><a style="color:inherit" href="javascript:history.back()">' . helper::translate('Retour') . '</a></p>')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class common
|
|||||||
const ACCESS_TIMER = 1800;
|
const ACCESS_TIMER = 1800;
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '13.1.01';
|
const ZWII_VERSION = '13.1.02';
|
||||||
|
|
||||||
// URL autoupdate
|
// URL autoupdate
|
||||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/cms-update/raw/branch/master/';
|
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/cms-update/raw/branch/master/';
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/blank.css">
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/blank.css">
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
|
||||||
|
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
|
||||||
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
|
||||||
|
<?php endif; ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php $layout->showContent(); ?>
|
<?php $layout->showContent(); ?>
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/light.css">
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/light.css">
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
|
||||||
|
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
|
||||||
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
|
||||||
|
<?php endif; ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php $layout->showNotification(); ?>
|
<?php $layout->showNotification(); ?>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
|
<html prefix="og: http://ogp.me/ns#" lang="<?php echo substr(self::$siteContent, 0, 2); ?>">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
@ -13,15 +14,23 @@
|
|||||||
<?php $layout->showFavicon(); ?>
|
<?php $layout->showFavicon(); ?>
|
||||||
<?php $layout->showVendor(); ?>
|
<?php $layout->showVendor(); ?>
|
||||||
<?php $layout->showFonts(); ?>
|
<?php $layout->showFonts(); ?>
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css?<?php echo md5_file('core/layout/common.css'); ?>">
|
<link rel="stylesheet"
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR . 'theme.css'); ?>">
|
href="<?php echo helper::baseUrl(false); ?>core/layout/common.css?<?php echo md5_file('core/layout/common.css'); ?>">
|
||||||
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR . 'custom.css'); ?>">
|
<link rel="stylesheet"
|
||||||
|
href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR . 'theme.css'); ?>">
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR . 'custom.css'); ?>">
|
||||||
|
<?php if (file_exists(self::DATA_DIR . 'font/font.css')): ?>
|
||||||
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>font/font.css?<?php echo md5_file(self::DATA_DIR . 'font/font.css'); ?>">
|
||||||
|
<?php endif; ?>
|
||||||
<!-- Détection RSS -->
|
<!-- Détection RSS -->
|
||||||
<?php if (($this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
|
<?php if (
|
||||||
|
($this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
|
||||||
or $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news')
|
or $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news')
|
||||||
and $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE
|
and $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE
|
||||||
) : ?>
|
): ?>
|
||||||
<link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" title="fLUX rss">
|
<link rel="alternate" type="application/rss+xml"
|
||||||
|
href="'<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" title="fLUX rss">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php $layout->showStyle(); ?>
|
<?php $layout->showStyle(); ?>
|
||||||
<?php $layout->showInlineStyle(); ?>
|
<?php $layout->showInlineStyle(); ?>
|
||||||
@ -30,15 +39,16 @@
|
|||||||
include(self::DATA_DIR . 'head.inc.html');
|
include(self::DATA_DIR . 'head.inc.html');
|
||||||
} ?>
|
} ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- Barre d'administration -->
|
<!-- Barre d'administration -->
|
||||||
<?php if ($this->getUser('group') > self::GROUP_MEMBER) : ?>
|
<?php if ($this->getUser('group') > self::GROUP_MEMBER): ?>
|
||||||
<?php $layout->showBar(); ?>
|
<?php $layout->showBar(); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<?php $layout->showNotification(); ?>
|
<?php $layout->showNotification(); ?>
|
||||||
<!-- Menu dans le fond du site avant la bannière -->
|
<!-- Menu dans le fond du site avant la bannière -->
|
||||||
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top') : ?>
|
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top'): ?>
|
||||||
<!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté -->
|
<!-- Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté -->
|
||||||
<?php
|
<?php
|
||||||
if (
|
if (
|
||||||
@ -54,13 +64,14 @@
|
|||||||
?>
|
?>
|
||||||
<!-- Menu Burger -->
|
<!-- Menu Burger -->
|
||||||
<div id="toggle">
|
<div id="toggle">
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
||||||
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
|
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
|
||||||
|
</div>
|
||||||
<!-- fin du menu burger -->
|
<!-- fin du menu burger -->
|
||||||
<?php
|
<?php
|
||||||
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
|
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
|
||||||
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
|
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
|
||||||
?>
|
?>
|
||||||
<div id="menu" <?php echo $menuClass; ?>>
|
<div id="menu" <?php echo $menuClass; ?>>
|
||||||
<?php $layout->showMenu(); ?>
|
<?php $layout->showMenu(); ?>
|
||||||
@ -68,58 +79,65 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Bannière dans le fond du site -->
|
<!-- Bannière dans le fond du site -->
|
||||||
<?php if ($this->getData(['theme', 'header', 'position']) === 'body') : ?>
|
<?php if ($this->getData(['theme', 'header', 'position']) === 'body'): ?>
|
||||||
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
|
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
|
||||||
<?php
|
<?php
|
||||||
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
|
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
|
||||||
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
|
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
|
||||||
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
|
$headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container';
|
||||||
?>
|
?>
|
||||||
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
|
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
|
||||||
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper') : ?>
|
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper'): ?>
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->getData(['theme', 'header', 'textHide']) === false
|
$this->getData(['theme', 'header', 'textHide']) === false
|
||||||
// Affiche toujours le titre de la bannière pour l'édition du thème
|
// Affiche toujours le titre de la bannière pour l'édition du thème
|
||||||
or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
|
or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
|
||||||
) : ?>
|
): ?>
|
||||||
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
|
<span id="themeHeaderTitle">
|
||||||
<?php else : ?>
|
<?php echo $this->getData(['locale', 'title']); ?>
|
||||||
|
</span>
|
||||||
|
<?php else: ?>
|
||||||
<span id="themeHeaderTitle"> </span>
|
<span id="themeHeaderTitle"> </span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else : ?>
|
<?php else: ?>
|
||||||
<div id="featureContent">
|
<div id="featureContent">
|
||||||
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
|
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</header>
|
</header>
|
||||||
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
|
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Menu dans le fond du site après la bannière -->
|
<!-- Menu dans le fond du site après la bannière -->
|
||||||
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-second') : ?>
|
<?php if ($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
|
||||||
<nav>
|
<nav>
|
||||||
<!-- Menu burger -->
|
<!-- Menu burger -->
|
||||||
<div id="toggle">
|
<div id="toggle">
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
||||||
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
|
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
|
||||||
|
</div>
|
||||||
<!-- fin du menu burger -->
|
<!-- fin du menu burger -->
|
||||||
<?php
|
<?php
|
||||||
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
|
$menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
|
||||||
?>
|
?>
|
||||||
<div id="menu" <?php echo $menuClass; ?>>
|
<div id="menu" <?php echo $menuClass; ?>>
|
||||||
<?php $layout->showMenu(); ?></div>
|
<?php $layout->showMenu(); ?>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Site -->
|
<!-- Site -->
|
||||||
<div id="site" class="container">
|
<div id="site" class="container">
|
||||||
<?php if ($this->getData(['theme', 'menu', 'position']) === 'site-first') : ?>
|
<?php if ($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
|
||||||
<!-- Menu dans le site avant la bannière -->
|
<!-- Menu dans le site avant la bannière -->
|
||||||
<nav>
|
<nav>
|
||||||
<div id="toggle">
|
<div id="toggle">
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
||||||
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
|
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
|
||||||
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
|
</div>
|
||||||
|
<div id="menu" class="container">
|
||||||
|
<?php $layout->showMenu(); ?>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (
|
<?php if (
|
||||||
@ -128,31 +146,33 @@
|
|||||||
or ($this->getData(['theme', 'header', 'position']) === 'hide'
|
or ($this->getData(['theme', 'header', 'position']) === 'hide'
|
||||||
and $this->getUrl(0) === 'theme'
|
and $this->getUrl(0) === 'theme'
|
||||||
)
|
)
|
||||||
) : ?>
|
): ?>
|
||||||
<!-- Bannière dans le site -->
|
<!-- Bannière dans le site -->
|
||||||
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
|
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
|
||||||
<?php
|
<?php
|
||||||
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
|
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
|
||||||
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
|
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
|
||||||
?>
|
?>
|
||||||
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
|
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"'; ?>>
|
||||||
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper') : ?>
|
<?php if ($this->getData(['theme', 'header', 'feature']) === 'wallpaper'): ?>
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->getData(['theme', 'header', 'textHide']) === false
|
$this->getData(['theme', 'header', 'textHide']) === false
|
||||||
// Affiche toujours le titre de la bannière pour l'édition du thème
|
// Affiche toujours le titre de la bannière pour l'édition du thème
|
||||||
or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
|
or ($this->getUrl(0) === 'theme' and $this->getUrl(1) === 'header')
|
||||||
) : ?>
|
): ?>
|
||||||
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
|
<span id="themeHeaderTitle">
|
||||||
<?php else : ?>
|
<?php echo $this->getData(['locale', 'title']); ?>
|
||||||
|
</span>
|
||||||
|
<?php else: ?>
|
||||||
<span id="themeHeaderTitle"> </span>
|
<span id="themeHeaderTitle"> </span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php else : ?>
|
<?php else: ?>
|
||||||
<div id="featureContent">
|
<div id="featureContent">
|
||||||
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
|
<?php echo $this->getData(['theme', 'header', 'featureContent']); ?>
|
||||||
</diV>
|
</diV>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</header>
|
</header>
|
||||||
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
|
<?php echo ($this->getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '</a>' : ''; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if (
|
<?php if (
|
||||||
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
|
$this->getData(['theme', 'menu', 'position']) === 'site-second' ||
|
||||||
@ -161,14 +181,17 @@
|
|||||||
or ($this->getData(['theme', 'menu', 'position']) === 'hide'
|
or ($this->getData(['theme', 'menu', 'position']) === 'hide'
|
||||||
and $this->getUrl(0) === 'theme'
|
and $this->getUrl(0) === 'theme'
|
||||||
)
|
)
|
||||||
) : ?>
|
): ?>
|
||||||
<!-- Menu dans le site après la bannière -->
|
<!-- Menu dans le site après la bannière -->
|
||||||
<nav <?php if ($this->getData(['theme', 'menu', 'position']) === 'hide') : ?>class="displayNone" <?php endif; ?>>
|
<nav <?php if ($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone" <?php endif; ?>>
|
||||||
<div id="toggle">
|
<div id="toggle">
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'title' ? '<div id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : ''; ?>
|
||||||
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '<div id="burgerLogo"><img src="' . helper::baseUrl(false) . self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo']) . '"></div>' : ''; ?>
|
||||||
<?php echo template::ico('menu', ['fontSize' => '2em']); ?></div>
|
<?php echo template::ico('menu', ['fontSize' => '2em']); ?>
|
||||||
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
|
</div>
|
||||||
|
<div id="menu" class="container">
|
||||||
|
<?php $layout->showMenu(); ?>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<!-- Corps de page -->
|
<!-- Corps de page -->
|
||||||
@ -178,7 +201,9 @@
|
|||||||
<!-- Fin du site -->
|
<!-- Fin du site -->
|
||||||
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site' ? '</div>' : ''; ?>
|
<?php echo $this->getData(['theme', 'footer', 'position']) === 'site' ? '</div>' : ''; ?>
|
||||||
<!-- Lien remonter en haut -->
|
<!-- Lien remonter en haut -->
|
||||||
<div id="backToTop"><?php echo template::ico('up'); ?></div>
|
<div id="backToTop">
|
||||||
|
<?php echo template::ico('up'); ?>
|
||||||
|
</div>
|
||||||
<!-- Affichage du consentement aux cookies-->
|
<!-- Affichage du consentement aux cookies-->
|
||||||
<?php $layout->showCookies(); ?>
|
<?php $layout->showCookies(); ?>
|
||||||
<!-- Les scripts -->
|
<!-- Les scripts -->
|
||||||
@ -186,7 +211,7 @@
|
|||||||
<!-- Script perso dans body -->
|
<!-- Script perso dans body -->
|
||||||
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
|
<?php if (file_exists(self::DATA_DIR . 'body.inc.html')) {
|
||||||
include(self::DATA_DIR . 'body.inc.html');
|
include(self::DATA_DIR . 'body.inc.html');
|
||||||
}?>
|
} ?>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -666,7 +666,7 @@ class theme extends common
|
|||||||
'class' => 'themeFontEdit',
|
'class' => 'themeFontEdit',
|
||||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/fontEdit/' . $type . '/' . $fontId,
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/fontEdit/' . $type . '/' . $fontId,
|
||||||
'value' => template::ico('pencil'),
|
'value' => template::ico('pencil'),
|
||||||
'disabled' => !empty($fontUsed[$fontId])
|
//'disabled' => !empty($fontUsed[$fontId])
|
||||||
])
|
])
|
||||||
: '',
|
: '',
|
||||||
$type !== 'websafe' ? template::button('themeFontDelete' . $fontId, [
|
$type !== 'websafe' ? template::button('themeFontDelete' . $fontId, [
|
||||||
@ -701,8 +701,8 @@ class theme extends common
|
|||||||
// Type d'import en ligne ou local
|
// Type d'import en ligne ou local
|
||||||
$type = $this->getInput('fontAddUrl', helper::FILTER_BOOLEAN) ? 'imported' : 'files';
|
$type = $this->getInput('fontAddUrl', helper::FILTER_BOOLEAN) ? 'imported' : 'files';
|
||||||
$type === 'files' ? 'imported' : 'files';
|
$type === 'files' ? 'imported' : 'files';
|
||||||
$ressource = $type === 'imported' ? $this->getInput('fontAddUrl', null) : $this->getInput('fontAddFile', null);
|
$resource = $type === 'imported' ? $this->getInput('fontAddUrl', null) : $this->getInput('fontAddFile', null);
|
||||||
if (!empty($ressource)) {
|
if (!empty($resource)) {
|
||||||
$fontId = $this->getInput('fontAddFontId', null, true);
|
$fontId = $this->getInput('fontAddFontId', null, true);
|
||||||
$fontName = $this->getInput('fontAddFontName', null, true);
|
$fontName = $this->getInput('fontAddFontName', null, true);
|
||||||
$fontFamilyName = $this->getInput('fontAddFontFamilyName', null, true);
|
$fontFamilyName = $this->getInput('fontAddFontFamilyName', null, true);
|
||||||
@ -714,6 +714,19 @@ class theme extends common
|
|||||||
if (is_array($this->getData(['font', $type, $fontId]))) {
|
if (is_array($this->getData(['font', $type, $fontId]))) {
|
||||||
$this->deleteData(['font', $type, $fontId]);
|
$this->deleteData(['font', $type, $fontId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copier la fonte si le nom du fichier est fourni
|
||||||
|
$success = false;
|
||||||
|
if (!is_dir(self::DATA_DIR . 'font/')) {
|
||||||
|
mkdir(self::DATA_DIR . 'font/');
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
$type === 'files' &&
|
||||||
|
file_exists(self::FILE_DIR . 'source/' . $resource)
|
||||||
|
) {
|
||||||
|
$success = copy(self::FILE_DIR . 'source/' . $resource, self::DATA_DIR . 'font/' . basename($resource));
|
||||||
|
}
|
||||||
|
|
||||||
// Stocker la fonte
|
// Stocker la fonte
|
||||||
$this->setData([
|
$this->setData([
|
||||||
'font',
|
'font',
|
||||||
@ -722,24 +735,15 @@ class theme extends common
|
|||||||
[
|
[
|
||||||
'name' => $fontName,
|
'name' => $fontName,
|
||||||
'font-family' => $fontFamilyName,
|
'font-family' => $fontFamilyName,
|
||||||
'resource' => $ressource
|
'resource' => $resource
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
// Copier la fonte si le nom du fichier est fourni
|
|
||||||
if (
|
|
||||||
$type === 'files' &&
|
|
||||||
file_exists(self::FILE_DIR . 'source/' . $ressource)
|
|
||||||
) {
|
|
||||||
copy(self::FILE_DIR . 'source/' . $ressource, self::DATA_DIR . 'font/' . $ressource);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'notification' => helper::translate('Fonte créée'),
|
'notification' => $success ? helper::translate('Fonte actualisée') : helper::translate('Erreur de copie'),
|
||||||
'redirect' => helper::baseUrl() . 'theme/fonts',
|
'redirect' => helper::baseUrl() . 'theme/font',
|
||||||
'state' => true
|
'state' => $success
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
@ -770,8 +774,8 @@ class theme extends common
|
|||||||
) {
|
) {
|
||||||
// Type d'import en ligne ou local
|
// Type d'import en ligne ou local
|
||||||
$type = $this->getInput('fontEditUrl', helper::FILTER_BOOLEAN) ? 'imported' : 'files';
|
$type = $this->getInput('fontEditUrl', helper::FILTER_BOOLEAN) ? 'imported' : 'files';
|
||||||
$ressource = $type === 'imported' ? $this->getInput('fontEditUrl', null) : $this->getInput('fontEditFile', null);
|
|
||||||
$fontId = $this->getInput('fontEditFontId', null, true);
|
$fontId = $this->getInput('fontEditFontId', null, true);
|
||||||
|
$resource = $this->getData(['font', $type, $fontId, 'resource']);
|
||||||
$fontName = $this->getInput('fontEditFontName', null, true);
|
$fontName = $this->getInput('fontEditFontName', null, true);
|
||||||
$fontFamilyName = $this->getInput('fontEditFontFamilyName', null, true);
|
$fontFamilyName = $this->getInput('fontEditFontFamilyName', null, true);
|
||||||
|
|
||||||
@ -783,6 +787,7 @@ class theme extends common
|
|||||||
$this->deleteData(['font', $type, $fontId]);
|
$this->deleteData(['font', $type, $fontId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Stocker les fontes
|
// Stocker les fontes
|
||||||
$this->setData([
|
$this->setData([
|
||||||
'font',
|
'font',
|
||||||
@ -791,21 +796,14 @@ class theme extends common
|
|||||||
[
|
[
|
||||||
'name' => $fontName,
|
'name' => $fontName,
|
||||||
'font-family' => $fontFamilyName,
|
'font-family' => $fontFamilyName,
|
||||||
'resource' => $ressource
|
'resource' => $resource
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
// Copier la fonte si le nom du fichier est fourni
|
|
||||||
if (
|
|
||||||
$type === 'files' &&
|
|
||||||
file_exists(self::FILE_DIR . 'source/' . $ressource)
|
|
||||||
) {
|
|
||||||
copy(self::FILE_DIR . 'source/' . $ressource, self::DATA_DIR . 'font/' . $ressource);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'notification' => helper::translate('Fonte actualisée'),
|
'notification' => helper::translate('Fonte actualisée'),
|
||||||
'redirect' => helper::baseUrl() . 'theme/fonts',
|
'redirect' => helper::baseUrl() . 'theme/font',
|
||||||
'state' => true
|
'state' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -847,7 +845,7 @@ class theme extends common
|
|||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'redirect' => helper::baseUrl() . 'theme/fonts',
|
'redirect' => helper::baseUrl() . 'theme/font',
|
||||||
'notification' => helper::translate('Fonte supprimée'),
|
'notification' => helper::translate('Fonte supprimée'),
|
||||||
'state' => true
|
'state' => true
|
||||||
]);
|
]);
|
||||||
@ -1374,13 +1372,13 @@ class theme extends common
|
|||||||
($scope === 'user' && in_array($fontId, $fontsInstalled))
|
($scope === 'user' && in_array($fontId, $fontsInstalled))
|
||||||
|| $scope === 'all'
|
|| $scope === 'all'
|
||||||
) {
|
) {
|
||||||
if (file_exists(self::DATA_DIR . 'font/' . $fontValue['resource'])) {
|
if (file_exists($fontValue['resource'])) {
|
||||||
// Extension
|
// Extension
|
||||||
$path_parts = pathinfo(helper::baseUrl(false) . self::DATA_DIR . 'font/' . $fontValue['resource']);
|
$path_parts = pathinfo(helper::baseUrl(false) . self::DATA_DIR . 'font/' . $fontValue['resource']);
|
||||||
// Chargement de la police
|
// Chargement de la police
|
||||||
$fileContentCss .= '@font-face {';
|
$fileContentCss .= '@font-face {';
|
||||||
$fileContentCss .= 'font-family:"' . $fontValue['name'] . '";';
|
$fileContentCss .= 'font-family:"' . $fontValue['name'] . '";';
|
||||||
$fileContentCss .= 'src: url("' . $fontValue['resource'] . '") format("' . $path_parts['extension'] . '");';
|
$fileContentCss .= 'src: url("' . helper::baseUrl(false) . $fontValue['resource'] . '") format("' . $path_parts['extension'] . '");';
|
||||||
$fileContentCss .= '}';
|
$fileContentCss .= '}';
|
||||||
// Préchargement
|
// Préchargement
|
||||||
//$fileContent = '<link rel="preload" href="' . self::DATA_DIR . 'font/' . $fontValue['resource'] . '" type="font/woff" crossorigin="anonymous" as="font">' . $fileContent;
|
//$fileContent = '<link rel="preload" href="' . self::DATA_DIR . 'font/' . $fontValue['resource'] . '" type="font/woff" crossorigin="anonymous" as="font">' . $fileContent;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('fontAddBack', [
|
<?php echo template::button('fontAddBack', [
|
||||||
'class' => 'buttonGrey',
|
'class' => 'buttonGrey',
|
||||||
'href' => helper::baseUrl() . 'theme/fonts',
|
'href' => helper::baseUrl() . 'theme/font',
|
||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('fontEditBack', [
|
<?php echo template::button('fontEditBack', [
|
||||||
'class' => 'buttonGrey',
|
'class' => 'buttonGrey',
|
||||||
'href' => helper::baseUrl() . 'theme/fonts',
|
'href' => helper::baseUrl() . 'theme/font',
|
||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
@ -66,10 +66,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row" id="containerfontEditFile">
|
<div class="row" id="containerfontEditFile">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php echo template::file('fontEditFile', [
|
<?php echo template::text('fontEditFile', [
|
||||||
'label' => 'Fichier de fonte (Format WOFF)',
|
'label' => 'Fichier de fonte (Format WOFF)',
|
||||||
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
|
'value' => $this->getUrl(2) === 'files' ? $this->getData(['font', $this->getUrl(2), $this->getUrl(3), 'resource']) : '',
|
||||||
'value' => $this->getUrl(2) === 'files' ? $this->getData(['font', $this->getUrl(2), $this->getUrl(3), 'resource']) : ''
|
'disabled' => true
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user