Реализовано открытие и закрытие вкладок на нажатие трех полосок, добавлена вкладка структуры страницы с возможностью вставки плагинов, подключена библиотека MarkedJS, исправлены баги, управление центральными блоками через CDATA.

This commit is contained in:
2025-11-17 22:57:36 +02:00
parent 5c3e28fd55
commit 68e516b45c
25 changed files with 1315 additions and 178 deletions

View File

@@ -40,6 +40,12 @@ if (!isset($_SESSION['page_url'])) {
$_SESSION['page_url'] = $config['page_url'];
}
$pluginBlocks = ['dgrm', 'SvgEditorM', 'form_editor'];
$pluginBlocksPath = $path . 'main_plugin/';
$pluginBlocks = array_filter($pluginBlocks, function($block) use ($pluginBlocksPath) {
return is_dir($pluginBlocksPath . $block);
});
$methodRpc = null;
if ($_SERVER["REQUEST_METHOD"] === "POST" && strpos($_SERVER["CONTENT_TYPE"] ?? "", "application/json") !== false) {
@@ -171,7 +177,7 @@ if (preg_match_all('#<!\[CDATA\[(.*?)\]\]>#s', $tagMatch[1], $matches)) {
foreach ($matches[1] as $i => $cdata) {
if ($i > 0)
$config['content'] .= "<br>";
$config['content'] .= '<div class="%cfloat%' . ($i == 0 ? ' content1' : '') . '"><div class="content">' . $cdata . '</div></div>';
$config['content'] .= '<div class="%cfloat%" style="' . ($i == 0 ? '' : 'border-radius: 10px;') . '"><div class="content">' . $cdata . '</div></div>';
}
}
foreach ($config as $key=>$value) if ($key!="request_url")
@@ -200,7 +206,7 @@ foreach ($lang[$lng] as $key => $value) {
}
$html .= '<script>' . $Js . '</script>';
$html .= loadPluginsInCenterBlock();
$html .= '<script src="/main_plugin/marked-master/marked.umd.js"></script>';
$html .= includePlugin(['plugin' => 'siteSettings']);
$html .= includePlugin(['plugin' => 'auth']);
/* $html .= includePlugin(['plugin' => 'editor']); */