ssdfdsf
This commit is contained in:
@@ -2,6 +2,27 @@
|
||||
$mode = strtolower($_GET['mode'] ?? 'templates');
|
||||
$id = (int)($_GET['id'] ?? 0);
|
||||
$assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
||||
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
||||
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
|
||||
$appBaseUrl = rtrim($GLOBALS['app_base_url'] ?? ($scheme . '://' . $host), '/');
|
||||
$fontDir = __DIR__ . '/../assets/fonts';
|
||||
$fontBase = $appBaseUrl . '/assets/fonts';
|
||||
$customFontName = 'Kids Handwriting';
|
||||
$customFontFiles = [
|
||||
'woff2' => 'KidsHandwriting-Regular.woff2',
|
||||
'woff' => 'KidsHandwriting-Regular.woff',
|
||||
'ttf' => 'KidsHandwriting-Regular.ttf',
|
||||
];
|
||||
$fontSources = [];
|
||||
foreach ($customFontFiles as $format => $file) {
|
||||
if (is_file($fontDir . '/' . $file)) {
|
||||
$fontSources[] = "url('" . htmlspecialchars($fontBase . '/' . $file, ENT_QUOTES) . "') format('{$format}')";
|
||||
}
|
||||
}
|
||||
$fontFaceCss = '';
|
||||
if ($fontSources) {
|
||||
$fontFaceCss = "@font-face{font-family:'{$customFontName}';font-style:normal;font-weight:400;src:" . implode(',', $fontSources) . ";}";
|
||||
}
|
||||
?><!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
@@ -15,6 +36,7 @@ $assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
||||
.gjs-one-bg{background-color:#fff!important}.gjs-two-color{color:#0f172a!important}
|
||||
.gjs-three-bg{background-color:#f8fafc!important}.gjs-four-color{color:#334155!important}
|
||||
#badge{position:fixed;right:8px;top:8px;background:#eef2ff;color:#1e3a8a;border:1px solid #c7d2fe;border-radius:999px;padding:4px 10px;font:12px system-ui;z-index:2147483647;opacity:.9}
|
||||
<?= $fontFaceCss ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -31,6 +53,18 @@ $assetVersion = defined('ASSET_VERSION') ? ASSET_VERSION : time();
|
||||
window.BridgeParts.API_KERNEL_URL = window.BridgeParts.API_KERNEL_URL || '/api.php';
|
||||
window.BridgeParts.API_BASE = window.BridgeParts.API_BASE || window.BridgeParts.API_KERNEL_URL;
|
||||
window.BridgeParts.STORAGE_URL_BASE = window.BridgeParts.STORAGE_URL_BASE || window.BridgeParts.API_BASE;
|
||||
window.BridgeParts.RTE_FONTS = window.BridgeParts.RTE_FONTS || [
|
||||
{ label: 'Kids Handwriting', value: "'Kids Handwriting', 'Comic Sans MS', cursive" },
|
||||
{ label: 'Arial', value: 'Arial, sans-serif' },
|
||||
{ label: 'Calibri', value: 'Calibri, sans-serif' },
|
||||
{ label: 'Cambria', value: 'Cambria, serif' },
|
||||
{ label: 'Georgia', value: 'Georgia, serif' },
|
||||
{ label: 'Tahoma', value: 'Tahoma, sans-serif' },
|
||||
{ label: 'Times New Roman', value: 'Times New Roman, serif' },
|
||||
{ label: 'Trebuchet MS', value: 'Trebuchet MS, sans-serif' },
|
||||
{ label: 'Verdana', value: 'Verdana, sans-serif' },
|
||||
];
|
||||
window.BridgeParts.RTE_FONT_FACE_CSS = window.BridgeParts.RTE_FONT_FACE_CSS || <?= json_encode($fontFaceCss) ?>;
|
||||
|
||||
function logToParent(type, detail){ try{ parent.postMessage({source:'editor-core',type:type,detail:String(detail||'')},'*'); }catch(e){} }
|
||||
window.addEventListener('error', function(e){
|
||||
|
||||
Reference in New Issue
Block a user