This commit is contained in:
Fred Tempez 2022-03-13 14:46:39 +01:00
parent 0ad1126efa
commit 8f39d10465
5 changed files with 52 additions and 52 deletions

View File

@ -426,7 +426,7 @@ class common {
$f ['imported'] [$fontId] = [ $f ['imported'] [$fontId] = [
'name' => $fontValue ['name'], 'name' => $fontValue ['name'],
'font-family'=> $fontValue ['font-family'], 'font-family'=> $fontValue ['font-family'],
'ressource' => $fontValue ['ressource'] 'resource' => $fontValue ['resource']
]; ];
} }
} }
@ -438,7 +438,7 @@ class common {
$f ['files'] [$fontId] = [ $f ['files'] [$fontId] = [
'name' => $fontValue ['name'], 'name' => $fontValue ['name'],
'font-family'=> $fontValue ['font-family'], 'font-family'=> $fontValue ['font-family'],
'ressource' => $fontValue ['ressource'] 'resource' => $fontValue ['resource']
]; ];
} }
} }
@ -2328,7 +2328,7 @@ class core extends common {
$fontFile = ''; $fontFile = '';
foreach ($fonts as $fontId) { foreach ($fonts as $fontId) {
if ( isset($fontsAvailable['imported'][$fontId])) { if ( isset($fontsAvailable['imported'][$fontId])) {
$fontFile .= '<link href="' . $fontsAvailable['imported'][$fontId]['ressource'] .'" rel="stylesheet">'; $fontFile .= '<link href="' . $fontsAvailable['imported'][$fontId]['resource'] .'" rel="stylesheet">';
// Tableau pour la construction de la feuille de style // Tableau pour la construction de la feuille de style
$fonts [$fontId] = $fontsAvailable['imported'][$fontId]['font-family']; $fonts [$fontId] = $fontsAvailable['imported'][$fontId]['font-family'];
} }
@ -2346,7 +2346,7 @@ class core extends common {
// Chargement de la police // Chargement de la police
//$formatFont = explode('.', self::DATA_DIR . 'fonts/' . $fontName); //$formatFont = explode('.', self::DATA_DIR . 'fonts/' . $fontName);
$css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";'; $css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";';
$css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'fonts/' .$fontsAvailable['files'][$fontId]['ressource'] . '");}'; $css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'fonts/' .$fontsAvailable['files'][$fontId]['resource'] . '");}';
// Tableau pour la construction de la feuille de style // Tableau pour la construction de la feuille de style
$fonts [$fontId] = $fontsAvailable['files'][$fontId]['font-family']; $fonts [$fontId] = $fontsAvailable['files'][$fontId]['font-family'];
} }
@ -2562,7 +2562,7 @@ class core extends common {
$fontFile = ''; $fontFile = '';
foreach ($fonts as $fontId) { foreach ($fonts as $fontId) {
if ( isset($fontsAvailable['imported'][$fontId])) { if ( isset($fontsAvailable['imported'][$fontId])) {
$fontFile .= '<link href="' . $fontsAvailable['imported'][$fontId]['ressource'] .'" rel="stylesheet">'; $fontFile .= '<link href="' . $fontsAvailable['imported'][$fontId]['resource'] .'" rel="stylesheet">';
// Tableau pour la construction de la feuille de style // Tableau pour la construction de la feuille de style
$fonts [$fontId] = $fontsAvailable['imported'][$fontId]['font-family']; $fonts [$fontId] = $fontsAvailable['imported'][$fontId]['font-family'];
} }
@ -2580,7 +2580,7 @@ class core extends common {
// Chargement de la police // Chargement de la police
//$formatFont = explode('.', self::DATA_DIR . 'fonts/' . $fontName); //$formatFont = explode('.', self::DATA_DIR . 'fonts/' . $fontName);
$css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";'; $css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";';
$css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'fonts/' .$fontsAvailable['files'][$fontId]['ressource'] . '");}'; $css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'fonts/' .$fontsAvailable['files'][$fontId]['resource'] . '");}';
// Tableau pour la construction de la feuille de style // Tableau pour la construction de la feuille de style
$fonts [$fontId] = $fontsAvailable['files'][$fontId]['font-family']; $fonts [$fontId] = $fontsAvailable['files'][$fontId]['font-family'];
} }

View File

@ -872,102 +872,102 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
'arimo'=> [ 'arimo'=> [
'name' => 'Arimo', 'name' => 'Arimo',
'font-family' => 'Arimo, sans-serif', 'font-family' => 'Arimo, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/arimo' 'resource' => 'https://fonts.cdnfonts.com/css/arimo'
], ],
'arvo'=> [ 'arvo'=> [
'name' => 'Arvo', 'name' => 'Arvo',
'font-family' => 'Arvo, sans-serif', 'font-family' => 'Arvo, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/arvo' 'resource' => 'https://fonts.cdnfonts.com/css/arvo'
], ],
'dancing-script' => [ 'dancing-script' => [
'name' => 'Dancing Script', 'name' => 'Dancing Script',
'font-family' => '"Dancing Script", sans-serif', 'font-family' => '"Dancing Script", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/dancing-script' 'resource' => 'https://fonts.cdnfonts.com/css/dancing-script'
], ],
'droid-sans-2'=> [ 'droid-sans-2'=> [
'name' => 'Droid Sans', 'name' => 'Droid Sans',
'font-family' => '"Droid Sans", sans-serif', 'font-family' => '"Droid Sans", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/droid-sans-2' 'resource' => 'https://fonts.cdnfonts.com/css/droid-sans-2'
], ],
'droid-serif-2'=> [ 'droid-serif-2'=> [
'name' => 'Droid Serif', 'name' => 'Droid Serif',
'font-family' => '"Droid Serif", serif', 'font-family' => '"Droid Serif", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/droid-serif-2' 'resource' => 'https://fonts.cdnfonts.com/css/droid-serif-2'
], ],
'indie-flower'=> [ 'indie-flower'=> [
'name' => 'Indie Flower', 'name' => 'Indie Flower',
'font-family' => '"Indie Flower", sans-serif', 'font-family' => '"Indie Flower", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/indie-flower' 'resource' => 'https://fonts.cdnfonts.com/css/indie-flower'
], ],
'liberation-sans'=> [ 'liberation-sans'=> [
'name' => 'Liberation Sans', 'name' => 'Liberation Sans',
'font-family' => '"Liberation Sans", sans-serif', 'font-family' => '"Liberation Sans", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/liberation-sans' 'resource' => 'https://fonts.cdnfonts.com/css/liberation-sans'
], ],
'liberation-serif'=> [ 'liberation-serif'=> [
'name' => 'Liberation Serif', 'name' => 'Liberation Serif',
'font-family' => '"Liberation Serif", serif', 'font-family' => '"Liberation Serif", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/liberation-serif' 'resource' => 'https://fonts.cdnfonts.com/css/liberation-serif'
], ],
'lobster-2'=> [ 'lobster-2'=> [
'name' => 'Lobster', 'name' => 'Lobster',
'font-family' => 'Lobster, sans-serif', 'font-family' => 'Lobster, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/lobster-2' 'resource' => 'https://fonts.cdnfonts.com/css/lobster-2'
], ],
'lato'=> [ 'lato'=> [
'name' => 'lato', 'name' => 'lato',
'font-family' => 'Lato, sans-serif', 'font-family' => 'Lato, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/lato' 'resource' => 'https://fonts.cdnfonts.com/css/lato'
], ],
'lora'=> [ 'lora'=> [
'name' => 'Lora', 'name' => 'Lora',
'font-family' => 'Lora, serif', 'font-family' => 'Lora, serif',
'ressource' => 'https://fonts.cdnfonts.com/css/lora' 'resource' => 'https://fonts.cdnfonts.com/css/lora'
], ],
'old-standard-tt-3'=> [ 'old-standard-tt-3'=> [
'name' => 'Old Standard TT', 'name' => 'Old Standard TT',
'font-family' => '"Old Standard TT", serif', 'font-family' => '"Old Standard TT", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/old-standard-tt-3' 'resource' => 'https://fonts.cdnfonts.com/css/old-standard-tt-3'
], ],
'open-sans' => [ 'open-sans' => [
'name' => 'Open Sans', 'name' => 'Open Sans',
'font-family' => '"Open Sans", sans-serif', 'font-family' => '"Open Sans", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/open-sans' 'resource' => 'https://fonts.cdnfonts.com/css/open-sans'
], ],
'oswald-4'=> [ 'oswald-4'=> [
'name' => 'Oswald', 'name' => 'Oswald',
'font-family' => 'Oswald, sans-serif', 'font-family' => 'Oswald, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/oswald-4' 'resource' => 'https://fonts.cdnfonts.com/css/oswald-4'
], ],
'pt-mono'=> [ 'pt-mono'=> [
'name' => 'PT Mono', 'name' => 'PT Mono',
'font-family' => '"PT Mono", monospace', 'font-family' => '"PT Mono", monospace',
'ressource' => 'https://fonts.cdnfonts.com/css/pt-mono' 'resource' => 'https://fonts.cdnfonts.com/css/pt-mono'
], ],
'pt-serif'=> [ 'pt-serif'=> [
'name' => "PR Serif", 'name' => "PR Serif",
'font-family' => '"PT Serif", serif', 'font-family' => '"PT Serif", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/pt-serif' 'resource' => 'https://fonts.cdnfonts.com/css/pt-serif'
], ],
'rancho'=> [ 'rancho'=> [
'name' => 'Rancho', 'name' => 'Rancho',
'font-family' => 'Rancho, sans-serif', 'font-family' => 'Rancho, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/rancho' 'resource' => 'https://fonts.cdnfonts.com/css/rancho'
], ],
'roboto'=> [ 'roboto'=> [
'name' => 'Roboto', 'name' => 'Roboto',
'font-family' => 'Roboto, sans-serif', 'font-family' => 'Roboto, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/roboto' 'resource' => 'https://fonts.cdnfonts.com/css/roboto'
], ],
'ubuntu'=> [ 'ubuntu'=> [
'name' => 'Ubuntu', 'name' => 'Ubuntu',
'font-family' => 'Ubuntu, sans-serif', 'font-family' => 'Ubuntu, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/ubuntu' 'resource' => 'https://fonts.cdnfonts.com/css/ubuntu'
], ],
'vollkorn'=> [ 'vollkorn'=> [
'name' => 'Vollkorn', 'name' => 'Vollkorn',
'font-family' => 'Vollkorn, serif', 'font-family' => 'Vollkorn, serif',
'ressource' => 'https://fonts.cdnfonts.com/css/vollkorn' 'resource' => 'https://fonts.cdnfonts.com/css/vollkorn'
] ]
]; ];
$this->setData(['fonts', 'imported', $fonts]); $this->setData(['fonts', 'imported', $fonts]);

View File

@ -91,102 +91,102 @@ class init extends common {
'arimo'=> [ 'arimo'=> [
'name' => 'Arimo', 'name' => 'Arimo',
'font-family' => 'Arimo, sans-serif', 'font-family' => 'Arimo, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/arimo' 'resource' => 'https://fonts.cdnfonts.com/css/arimo'
], ],
'arvo'=> [ 'arvo'=> [
'name' => 'Arvo', 'name' => 'Arvo',
'font-family' => 'Arvo, sans-serif', 'font-family' => 'Arvo, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/arvo' 'resource' => 'https://fonts.cdnfonts.com/css/arvo'
], ],
'dancing-script' => [ 'dancing-script' => [
'name' => 'Dancing Script', 'name' => 'Dancing Script',
'font-family' => '"Dancing Script", sans-serif', 'font-family' => '"Dancing Script", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/dancing-script' 'resource' => 'https://fonts.cdnfonts.com/css/dancing-script'
], ],
'droid-sans-2'=> [ 'droid-sans-2'=> [
'name' => 'Droid Sans', 'name' => 'Droid Sans',
'font-family' => '"Droid Sans", sans-serif', 'font-family' => '"Droid Sans", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/droid-sans-2' 'resource' => 'https://fonts.cdnfonts.com/css/droid-sans-2'
], ],
'droid-serif-2'=> [ 'droid-serif-2'=> [
'name' => 'Droid Serif', 'name' => 'Droid Serif',
'font-family' => '"Droid Serif", serif', 'font-family' => '"Droid Serif", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/droid-serif-2' 'resource' => 'https://fonts.cdnfonts.com/css/droid-serif-2'
], ],
'indie-flower'=> [ 'indie-flower'=> [
'name' => 'Indie Flower', 'name' => 'Indie Flower',
'font-family' => '"Indie Flower", sans-serif', 'font-family' => '"Indie Flower", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/indie-flower' 'resource' => 'https://fonts.cdnfonts.com/css/indie-flower'
], ],
'liberation-sans'=> [ 'liberation-sans'=> [
'name' => 'Liberation Sans', 'name' => 'Liberation Sans',
'font-family' => '"Liberation Sans", sans-serif', 'font-family' => '"Liberation Sans", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/liberation-sans' 'resource' => 'https://fonts.cdnfonts.com/css/liberation-sans'
], ],
'liberation-serif'=> [ 'liberation-serif'=> [
'name' => 'Liberation Serif', 'name' => 'Liberation Serif',
'font-family' => '"Liberation Serif", serif', 'font-family' => '"Liberation Serif", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/liberation-serif' 'resource' => 'https://fonts.cdnfonts.com/css/liberation-serif'
], ],
'lobster-2'=> [ 'lobster-2'=> [
'name' => 'Lobster', 'name' => 'Lobster',
'font-family' => 'Lobster, sans-serif', 'font-family' => 'Lobster, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/lobster-2' 'resource' => 'https://fonts.cdnfonts.com/css/lobster-2'
], ],
'lato'=> [ 'lato'=> [
'name' => 'lato', 'name' => 'lato',
'font-family' => 'Lato, sans-serif', 'font-family' => 'Lato, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/lato' 'resource' => 'https://fonts.cdnfonts.com/css/lato'
], ],
'lora'=> [ 'lora'=> [
'name' => 'Lora', 'name' => 'Lora',
'font-family' => 'Lora, serif', 'font-family' => 'Lora, serif',
'ressource' => 'https://fonts.cdnfonts.com/css/lora' 'resource' => 'https://fonts.cdnfonts.com/css/lora'
], ],
'old-standard-tt-3'=> [ 'old-standard-tt-3'=> [
'name' => 'Old Standard TT', 'name' => 'Old Standard TT',
'font-family' => '"Old Standard TT", serif', 'font-family' => '"Old Standard TT", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/old-standard-tt-3' 'resource' => 'https://fonts.cdnfonts.com/css/old-standard-tt-3'
], ],
'open-sans' => [ 'open-sans' => [
'name' => 'Open Sans', 'name' => 'Open Sans',
'font-family' => '"Open Sans", sans-serif', 'font-family' => '"Open Sans", sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/open-sans' 'resource' => 'https://fonts.cdnfonts.com/css/open-sans'
], ],
'oswald-4'=> [ 'oswald-4'=> [
'name' => 'Oswald', 'name' => 'Oswald',
'font-family' => 'Oswald, sans-serif', 'font-family' => 'Oswald, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/oswald-4' 'resource' => 'https://fonts.cdnfonts.com/css/oswald-4'
], ],
'pt-mono'=> [ 'pt-mono'=> [
'name' => 'PT Mono', 'name' => 'PT Mono',
'font-family' => '"PT Mono", monospace', 'font-family' => '"PT Mono", monospace',
'ressource' => 'https://fonts.cdnfonts.com/css/pt-mono' 'resource' => 'https://fonts.cdnfonts.com/css/pt-mono'
], ],
'pt-serif'=> [ 'pt-serif'=> [
'name' => "PR Serif", 'name' => "PR Serif",
'font-family' => '"PT Serif", serif', 'font-family' => '"PT Serif", serif',
'ressource' => 'https://fonts.cdnfonts.com/css/pt-serif' 'resource' => 'https://fonts.cdnfonts.com/css/pt-serif'
], ],
'rancho'=> [ 'rancho'=> [
'name' => 'Rancho', 'name' => 'Rancho',
'font-family' => 'Rancho, sans-serif', 'font-family' => 'Rancho, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/rancho' 'resource' => 'https://fonts.cdnfonts.com/css/rancho'
], ],
'roboto'=> [ 'roboto'=> [
'name' => 'Roboto', 'name' => 'Roboto',
'font-family' => 'Roboto, sans-serif', 'font-family' => 'Roboto, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/roboto' 'resource' => 'https://fonts.cdnfonts.com/css/roboto'
], ],
'ubuntu'=> [ 'ubuntu'=> [
'name' => 'Ubuntu', 'name' => 'Ubuntu',
'font-family' => 'Ubuntu, sans-serif', 'font-family' => 'Ubuntu, sans-serif',
'ressource' => 'https://fonts.cdnfonts.com/css/ubuntu' 'resource' => 'https://fonts.cdnfonts.com/css/ubuntu'
], ],
'vollkorn'=> [ 'vollkorn'=> [
'name' => 'Vollkorn', 'name' => 'Vollkorn',
'font-family' => 'Vollkorn, serif', 'font-family' => 'Vollkorn, serif',
'ressource' => 'https://fonts.cdnfonts.com/css/vollkorn' 'resource' => 'https://fonts.cdnfonts.com/css/vollkorn'
] ]
] ]
], ],

View File

@ -635,7 +635,7 @@ class theme extends common {
$t = [ $fontId => [ $t = [ $fontId => [
'name' => $fontName, 'name' => $fontName,
'font-family' => $fontFamilyName, 'font-family' => $fontFamilyName,
'ressource' => $ressource 'resource' => $ressource
]]; ]];
// Stocker les fontes // Stocker les fontes
@ -643,7 +643,7 @@ class theme extends common {
[ [
'name' => $fontName, 'name' => $fontName,
'font-family' => $fontFamilyName, 'font-family' => $fontFamilyName,
'ressource' => $ressource 'resource' => $ressource
]] ]]
]); ]);
@ -691,7 +691,7 @@ class theme extends common {
$t = [ $fontId => [ $t = [ $fontId => [
'name' => $fontName, 'name' => $fontName,
'font-family' => $fontFamilyName, 'font-family' => $fontFamilyName,
'ressource' => $ressource 'resource' => $ressource
]]; ]];
// Stocker les fontes // Stocker les fontes
@ -699,7 +699,7 @@ class theme extends common {
[ [
'name' => $fontName, 'name' => $fontName,
'font-family' => $fontFamilyName, 'font-family' => $fontFamilyName,
'ressource' => $ressource 'resource' => $ressource
]] ]]
]); ]);

View File

@ -69,7 +69,7 @@
<div class="col12"> <div class="col12">
<?php echo template::file('fontEditFile', [ <?php echo template::file('fontEditFile', [
'label' => 'Fichier de fonte (Format WOFF)', 'label' => 'Fichier de fonte (Format WOFF)',
'value' => $this->getUrl(2) === 'file' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'ressource']) : '' 'value' => $this->getUrl(2) === 'file' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'resource']) : ''
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -77,7 +77,7 @@
<div class="col12"> <div class="col12">
<?php echo template::text('fontEditUrl', [ <?php echo template::text('fontEditUrl', [
'label' => 'Url du fichier de fonte', 'label' => 'Url du fichier de fonte',
'value' => $this->getUrl(2) === 'imported' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'ressource']) : '' 'value' => $this->getUrl(2) === 'imported' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'resource']) : ''
]); ?> ]); ?>
</div> </div>
</div> </div>