forked from ZwiiCMS-Team/ZwiiCMS
import des fontes WIP
This commit is contained in:
parent
fa2e4b2be0
commit
3f52396e9d
@ -934,7 +934,6 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
|
|||||||
'resource' => 'https://fonts.cdnfonts.com/css/vollkorn'
|
'resource' => 'https://fonts.cdnfonts.com/css/vollkorn'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
$this->setData(['fonts', 'imported', $fonts]);
|
|
||||||
|
|
||||||
// Conversion des fontes locales
|
// Conversion des fontes locales
|
||||||
$files = $this->getData(['fonts', 'files']);
|
$files = $this->getData(['fonts', 'files']);
|
||||||
@ -951,19 +950,21 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Consersion des fontes importées
|
// Consersion des fontes importées
|
||||||
// Conversion des fontes locales
|
|
||||||
$imported = $this->getData(['fonts', 'imported']);
|
$imported = $this->getData(['fonts', 'imported']);
|
||||||
if (is_array($imported)) {
|
if (is_array($imported)) {
|
||||||
$this->deleteData(['fonts', 'imported']);
|
$this->deleteData(['fonts', 'imported']);
|
||||||
foreach ($imported as $fontId => $fontName) {
|
foreach ($imported as $fontId => $fontUrl) {
|
||||||
$this->setData(['fonts', 'imported', $fontId, [
|
$this->setData(['fonts', 'imported', $fontId, [
|
||||||
'name' => $fontId,
|
'name' => $fontId,
|
||||||
'font-family'=> $fontId . ', sans-serif',
|
'font-family'=> '"' . $fontId . '", sans-serif',
|
||||||
'resource' => 'https:\/\/fonts.cdnfonts.com\/css\/' . $fontId
|
'resource' => 'https:\/\/fonts.cdnfonts.com\/css\/' . $fontUrl
|
||||||
]]);
|
]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->setData(['fonts', 'imported', $fonts]);
|
||||||
|
|
||||||
// Rafraichir les thèmes
|
// Rafraichir les thèmes
|
||||||
if (file_exists(self::DATA_DIR . 'admin.css')) {
|
if (file_exists(self::DATA_DIR . 'admin.css')) {
|
||||||
unlink (self::DATA_DIR . 'admin.css');
|
unlink (self::DATA_DIR . 'admin.css');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user