This commit is contained in:
Bellord
2026-05-31 13:36:28 +03:00
parent f98cfc62a7
commit 1c882ba7f3
27 changed files with 349 additions and 364 deletions
+7 -4
View File
@@ -1,5 +1,5 @@
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
<?
<?php require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
<?php
if(\Bitrix\Main\Loader::includeModule('wt.core')) {
app()->service()->assets()->setPlugins([
'kit:config',
@@ -12,6 +12,9 @@ if(\Bitrix\Main\Loader::includeModule('wt.core')) {
'kit:theme',
])->render();
}
/**
* @global CMain $APPLICATION
*/
$APPLICATION->ShowHead();
//$templatePath = app()->service()->templater()->getComponent('kit')->getTemplatePath();
@@ -24,7 +27,7 @@ function scanTemplates($path, $basePath, $recursive = false){
$tree = glob($path . '/*.php');
?><div class="flex-list"><?
foreach ((array)$tree as $t) {
$templateName = ltrim(substr($t, strlen($basePath), strlen($t) - strlen($basePath) - 4), "/");
$templateName = ltrim(substr($t, strlen($basePath), strlen($t) - strlen($basePath) - 4), '/');
echo '<div class="flex-list-item">' . app()->service()->templater()->get('kit:card/block', [
'name' => $templateName,
'picture' => '<div class="kit-picture">'.app()->service()->templater()->get('kit:'.$templateName).'</div>',
@@ -43,7 +46,7 @@ function scanTemplates($path, $basePath, $recursive = false){
?>
<div class="kit-wrapper">
<?
<?php
scanTemplates($templateSvgPath, $templatePath, true);
?>
</div>