Compare commits
25 Commits
64dad0aaf9
...
master
Author | SHA1 | Date | |
---|---|---|---|
a64ed080bb | |||
6242304843 | |||
2655a793f5 | |||
de0354f9cb | |||
4a4d5b083f | |||
68b5741f46 | |||
fc70051761 | |||
b1dacff877 | |||
e904cedf40 | |||
64a6cc4340 | |||
b79483dafd | |||
7ab241daa2 | |||
c69314b531 | |||
e448ffa6b6 | |||
3c025a4cbc | |||
6a7cde15e9 | |||
2b2c99cd17 | |||
b6ba8f8718 | |||
11c99be0f6 | |||
f421e0c649 | |||
3120795eab | |||
50c6ca98d8 | |||
dac4db96af | |||
c228a70468 | |||
3e178f6633 |
@ -6,8 +6,8 @@
|
||||
"type": "admin_theme",
|
||||
"description": "Custom admin theme",
|
||||
"preview": "nrnv2024_640x360.jpg",
|
||||
"resource": "/resources/custom",
|
||||
"resource_path": "{RESOURCES}/custom",
|
||||
"resource": "/resources/admin_themes/custom",
|
||||
"resource_path": "{RESOURCES}/admin_themes/custom",
|
||||
"layout": "main.php",
|
||||
"theme_path": "{APP}/admin_themes/{slug}",
|
||||
"layout_path": "{APP}/admin_themes/{slug}/layout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Photo",
|
||||
"version": "0.1",
|
||||
"version": "0.2",
|
||||
"author": "ITGuild",
|
||||
"slug": "photo",
|
||||
"type": "additional_property",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Tags",
|
||||
"version": "0.1",
|
||||
"version": "0.1.1",
|
||||
"author": "ITGuild",
|
||||
"slug": "tag",
|
||||
"type": "additional_property",
|
||||
|
8
app/themes/custom/CustomTheme.php
Normal file
8
app/themes/custom/CustomTheme.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace app\themes\custom;
|
||||
|
||||
class CustomTheme extends \kernel\app_themes\custom\CustomTheme
|
||||
{
|
||||
|
||||
}
|
18
app/themes/custom/assets/CustomThemesAssets.php
Normal file
18
app/themes/custom/assets/CustomThemesAssets.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace app\themes\custom\assets;
|
||||
|
||||
use kernel\Assets;
|
||||
|
||||
class CustomThemesAssets extends Assets
|
||||
{
|
||||
protected function createCSS(): void
|
||||
{
|
||||
$this->registerCSS(slug: "main", resource: "/css/styles.css");
|
||||
}
|
||||
|
||||
protected function createJS(): void
|
||||
{
|
||||
$this->registerJS(slug: "webpack", resource: "/js/scripts.js");
|
||||
}
|
||||
}
|
28
app/themes/custom/controllers/MainController.php
Normal file
28
app/themes/custom/controllers/MainController.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace app\themes\custom\controllers;
|
||||
|
||||
use kernel\Controller;
|
||||
|
||||
class MainController extends Controller
|
||||
{
|
||||
|
||||
protected function init(): void
|
||||
{
|
||||
parent::init();
|
||||
$this->cgView->viewPath = APP_DIR . "/themes/custom/views/main/";
|
||||
$this->cgView->layout = "main.php";
|
||||
$this->cgView->layoutPath = APP_DIR . "/themes/custom/views/layout/";
|
||||
$this->cgView->addVarToLayout("resources", "/resources/themes/custom");
|
||||
}
|
||||
|
||||
public function actionIndex(): void
|
||||
{
|
||||
$this->cgView->render("index.php");
|
||||
}
|
||||
|
||||
public function actionAbout(): void
|
||||
{
|
||||
$this->cgView->render("about.php");
|
||||
}
|
||||
}
|
15
app/themes/custom/manifest.json
Normal file
15
app/themes/custom/manifest.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "Custom",
|
||||
"version": "0.1",
|
||||
"author": "ItGuild",
|
||||
"slug": "custom",
|
||||
"type": "theme",
|
||||
"description": "Custom theme",
|
||||
"preview": "preview.png",
|
||||
"resource": "/resources/themes/custom",
|
||||
"resource_path": "{RESOURCES}/themes/custom",
|
||||
"theme_class": "app\\themes\\custom\\CustomTheme",
|
||||
"theme_class_file": "{APP}/themes/custom/CustomTheme.php",
|
||||
"routs": "routs/custom.php",
|
||||
"dependence": "photo,tag"
|
||||
}
|
12
app/themes/custom/routs/custom.php
Normal file
12
app/themes/custom/routs/custom.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use kernel\App;
|
||||
|
||||
|
||||
App::$collector->get('/', [\app\themes\custom\controllers\MainController::class, 'actionIndex']);
|
||||
App::$collector->get('/about', [\app\themes\custom\controllers\MainController::class, 'actionAbout']);
|
||||
//App::$collector->get('/page/{page_number}', [\app\modules\tag\controllers\TagController::class, 'actionIndex']);
|
||||
//App::$collector->get('/create', [\app\modules\tag\controllers\TagController::class, 'actionCreate']);
|
||||
|
||||
|
||||
|
92
app/themes/custom/views/layout/main.php
Normal file
92
app/themes/custom/views/layout/main.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $content
|
||||
* @var string $resources
|
||||
* @var string $title
|
||||
* @var \kernel\CgView $view
|
||||
*/
|
||||
$assets = new \app\themes\custom\assets\CustomThemesAssets($resources);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<?php $assets->getCSSAsSTR(); ?>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
<title><?= $title ?></title>
|
||||
<?= $view->getMeta() ?>
|
||||
<link rel="icon" type="image/x-icon" href="<?= $resources ?>/assets/favicon.ico"/>
|
||||
<!-- Font Awesome icons (free version)-->
|
||||
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
|
||||
<!-- Google fonts-->
|
||||
<link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
|
||||
rel="stylesheet" type="text/css"/>
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light" id="mainNav">
|
||||
<div class="container px-4 px-lg-5">
|
||||
<a class="navbar-brand" href="/">Custom theme</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
|
||||
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ms-auto py-4 py-lg-0">
|
||||
<li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/">На главную</a></li>
|
||||
<li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/about">О нас</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<?= $content ?>
|
||||
|
||||
<!-- Footer-->
|
||||
<footer class="border-top">
|
||||
<div class="container px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#!">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#!">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#!">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="small text-center text-muted fst-italic">Copyright © IT Guild Micro Framework</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- Bootstrap core JS-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<?php $assets->getJSAsStr(); ?>
|
||||
</body>
|
||||
</html>
|
36
app/themes/custom/views/main/about.php
Normal file
36
app/themes/custom/views/main/about.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $resources;
|
||||
* @var \kernel\CgView $view
|
||||
*/
|
||||
|
||||
$view->setTitle("Старт Bootstrap");
|
||||
$view->setMeta([
|
||||
'description' => 'Дефолтная bootstrap тема'
|
||||
]);
|
||||
?>
|
||||
<!-- Page Header-->
|
||||
<header class="masthead" style="background-image: url('<?= $resources ?>/assets/img/about-bg.jpeg')">
|
||||
<div class="container position-relative px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<div class="page-heading">
|
||||
<h1>About Me</h1>
|
||||
<span class="subheading">This is what I do.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- Main Content-->
|
||||
<main class="mb-4">
|
||||
<div class="container px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis sit soluta odio, adipisci quas excepturi maxime quae totam ducimus consectetur?</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius praesentium recusandae illo eaque architecto error, repellendus iusto reprehenderit, doloribus, minus sunt. Numquam at quae voluptatum in officia voluptas voluptatibus, minus!</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut consequuntur magnam, excepturi aliquid ex itaque esse est vero natus quae optio aperiam soluta voluptatibus corporis atque iste neque sit tempora!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
86
app/themes/custom/views/main/index.php
Normal file
86
app/themes/custom/views/main/index.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $resources;
|
||||
* @var \kernel\CgView $view
|
||||
*/
|
||||
|
||||
$view->setTitle("IT Guild Micro Framework");
|
||||
$view->setMeta([
|
||||
'description' => 'Default IT Guild Micro Framework theme'
|
||||
]);
|
||||
?>
|
||||
<!-- Page Header-->
|
||||
<header class="masthead" style="background-image: url('<?= $resources ?>/assets/img/home-bg.jpeg')">
|
||||
<div class="container position-relative px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<div class="site-heading">
|
||||
<h1>Clean Blog</h1>
|
||||
<span class="subheading">A Blog Theme by IT Guild Micro Framework</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- Main Content-->
|
||||
<div class="container px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!">
|
||||
<h2 class="post-title">Man must explore, and this is exploration at its greatest</h2>
|
||||
<h3 class="post-subtitle">Problems look mighty small from 150 miles up</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on September 24, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!"><h2 class="post-title">I believe every human has a finite number of heartbeats. I don't intend to waste any of mine.</h2></a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on September 18, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!">
|
||||
<h2 class="post-title">Science has not yet mastered prophecy</h2>
|
||||
<h3 class="post-subtitle">We predict too much for the next year and yet far too little for the next ten.</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on August 24, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!">
|
||||
<h2 class="post-title">Failure is not an option</h2>
|
||||
<h3 class="post-subtitle">Many say exploration is part of our destiny, but it’s actually our duty to future generations.</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on July 8, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Pager-->
|
||||
<div class="d-flex justify-content-end mb-4"><a class="btn btn-primary text-uppercase" href="#!">Older Posts →</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -5,14 +5,17 @@ namespace kernel;
|
||||
use kernel\Controller;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\services\AdminThemeService;
|
||||
use kernel\services\ThemeService;
|
||||
|
||||
class AdminController extends Controller
|
||||
{
|
||||
protected AdminThemeService $adminThemeService;
|
||||
protected ThemeService $themeService;
|
||||
|
||||
protected function init(): void
|
||||
{
|
||||
$this->adminThemeService = new AdminThemeService();
|
||||
$this->themeService = new ThemeService();
|
||||
$active_theme = $this->adminThemeService->getActiveAdminThemeInfo();
|
||||
$this->cgView->layoutPath = getConst($active_theme['layout_path']);
|
||||
$this->cgView->layout = "/" . $active_theme['layout'];
|
||||
|
@ -7,6 +7,7 @@ namespace kernel;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\modules\user\models\User;
|
||||
use kernel\services\ModuleService;
|
||||
use kernel\services\ThemeService;
|
||||
use Phroute\Phroute\Dispatcher;
|
||||
|
||||
class App
|
||||
@ -24,6 +25,8 @@ class App
|
||||
|
||||
public ModuleService $moduleService;
|
||||
|
||||
public ThemeService $themeService;
|
||||
|
||||
public static Database $db;
|
||||
|
||||
public function run(): void
|
||||
@ -53,6 +56,12 @@ class App
|
||||
foreach ($modules_routs as $rout){
|
||||
include "$rout";
|
||||
}
|
||||
|
||||
$themeService = new ThemeService();
|
||||
$activeTheme = getConst($themeService->getActiveTheme());
|
||||
if (!empty($activeTheme)){
|
||||
include $activeTheme . "/" . $themeService->getThemeRout($activeTheme);
|
||||
}
|
||||
}
|
||||
|
||||
public static function create(): App
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace kernel;
|
||||
|
||||
use kernel\helpers\Debug;
|
||||
|
||||
class CgView
|
||||
{
|
||||
public string $viewPath = '';
|
||||
@ -61,6 +63,13 @@ class CgView
|
||||
private function createContent(string $viewFile, array $data = []): false|string
|
||||
{
|
||||
ob_start();
|
||||
|
||||
if ($this->varToLayout){
|
||||
foreach ($this->varToLayout as $key => $datum) {
|
||||
${"$key"} = $datum;
|
||||
}
|
||||
}
|
||||
|
||||
$view = $this;
|
||||
foreach ($data as $key => $datum) {
|
||||
${"$key"} = $datum;
|
||||
|
@ -9,12 +9,13 @@ class Flash
|
||||
|
||||
public static function setMessage(string $type, string $msg): void
|
||||
{
|
||||
Session::start();
|
||||
self::start();
|
||||
Session::set($type, $msg);
|
||||
}
|
||||
|
||||
public static function getMessage(string $type): string
|
||||
{
|
||||
self::start();
|
||||
$msg = Session::get($type, false);
|
||||
Session::remove($type);
|
||||
|
||||
@ -23,7 +24,16 @@ class Flash
|
||||
|
||||
public static function hasMessage(string $type): bool
|
||||
{
|
||||
self::start();
|
||||
|
||||
return Session::has($type);
|
||||
}
|
||||
|
||||
public static function start()
|
||||
{
|
||||
if (!Session::isStarted()){
|
||||
Session::start();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,10 +3,11 @@
|
||||
"version": "0.1",
|
||||
"author": "ItGuild",
|
||||
"slug": "default",
|
||||
"type": "admin_theme",
|
||||
"description": "Default admin theme",
|
||||
"preview": "preview.png",
|
||||
"resource": "/resources/default",
|
||||
"resource_path": "{RESOURCES}/default",
|
||||
"resource": "/resources/admin_themes/default",
|
||||
"resource_path": "{RESOURCES}/admin_themes/default",
|
||||
"layout": "main.php",
|
||||
"layout_path": "{KERNEL_ADMIN_THEMES}/default/layout"
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
"slug": "simple",
|
||||
"description": "Simple admin theme",
|
||||
"preview": "preview.png",
|
||||
"resource": "/resources/simple",
|
||||
"resource_path": "{RESOURCES}/simple",
|
||||
"resource": "/resources/admin_themes/simple",
|
||||
"resource_path": "{RESOURCES}/admin_themes/simple",
|
||||
"layout": "main.php",
|
||||
"layout_path": "{KERNEL_ADMIN_THEMES}/simple/layout"
|
||||
}
|
||||
|
0
kernel/app_modules/tag/controllers/TagController.php
Executable file → Normal file
0
kernel/app_modules/tag/controllers/TagController.php
Executable file → Normal file
0
kernel/app_modules/tag/controllers/TagEntityController.php
Executable file → Normal file
0
kernel/app_modules/tag/controllers/TagEntityController.php
Executable file → Normal file
0
kernel/app_modules/tag/migrations/2024_10_08_093710_create_tag_table.php
Executable file → Normal file
0
kernel/app_modules/tag/migrations/2024_10_08_093710_create_tag_table.php
Executable file → Normal file
0
kernel/app_modules/tag/models/Tag.php
Executable file → Normal file
0
kernel/app_modules/tag/models/Tag.php
Executable file → Normal file
0
kernel/app_modules/tag/models/TagEntity.php
Executable file → Normal file
0
kernel/app_modules/tag/models/TagEntity.php
Executable file → Normal file
0
kernel/app_modules/tag/models/forms/CreateTagEntityForm.php
Executable file → Normal file
0
kernel/app_modules/tag/models/forms/CreateTagEntityForm.php
Executable file → Normal file
0
kernel/app_modules/tag/models/forms/CreateTagForm.php
Executable file → Normal file
0
kernel/app_modules/tag/models/forms/CreateTagForm.php
Executable file → Normal file
0
kernel/app_modules/tag/routs/tag.php
Executable file → Normal file
0
kernel/app_modules/tag/routs/tag.php
Executable file → Normal file
0
kernel/app_modules/tag/service/TagEntityService.php
Executable file → Normal file
0
kernel/app_modules/tag/service/TagEntityService.php
Executable file → Normal file
0
kernel/app_modules/tag/service/TagService.php
Executable file → Normal file
0
kernel/app_modules/tag/service/TagService.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag/form.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag/form.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag/index.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag/index.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag/view.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag/view.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag_entity/index.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag_entity/index.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag_entity/view.php
Executable file → Normal file
0
kernel/app_modules/tag/views/tag_entity/view.php
Executable file → Normal file
31
kernel/app_themes/custom/CustomTheme.php
Normal file
31
kernel/app_themes/custom/CustomTheme.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\app_themes\custom;
|
||||
|
||||
use kernel\modules\menu\service\MenuService;
|
||||
use kernel\services\MigrationService;
|
||||
|
||||
class CustomTheme
|
||||
{
|
||||
public MenuService $menuService;
|
||||
public MigrationService $migrationService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuService = new MenuService();
|
||||
$this->migrationService = new MigrationService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
|
||||
public function deactivate(): void
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
}
|
8
kernel/app_themes/custom/services/CustomThemeService.php
Normal file
8
kernel/app_themes/custom/services/CustomThemeService.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\app_themes\custom\services;
|
||||
|
||||
class CustomThemeService
|
||||
{
|
||||
|
||||
}
|
@ -63,6 +63,20 @@ class AdminConsoleController extends ConsoleController
|
||||
);
|
||||
$this->out->r("create option active_admin_theme", "green");
|
||||
|
||||
$this->optionService->createFromParams(
|
||||
key: "theme_paths",
|
||||
value: "{\"paths\": [\"{KERNEL}/themes\", \"{APP}/themes\"]}",
|
||||
label: "Пути к темам сайта"
|
||||
);
|
||||
$this->out->r("create option theme_paths", "green");
|
||||
|
||||
$this->optionService->createFromParams(
|
||||
key: "active_theme",
|
||||
value: "{KERNEL}/themes/default",
|
||||
label: "Активная тема сайта"
|
||||
);
|
||||
$this->out->r("create option active_theme", "green");
|
||||
|
||||
$this->optionService->createFromParams(
|
||||
key: "module_paths",
|
||||
value: "{\"paths\": [\"{KERNEL_MODULES}\", \"{APP}/modules\"]}",
|
||||
@ -72,7 +86,7 @@ class AdminConsoleController extends ConsoleController
|
||||
|
||||
$this->optionService->createFromParams(
|
||||
key: "active_modules",
|
||||
value: "{\"modules\":[\"admin_themes\", \"secure\", \"user\", \"menu\", \"post\", \"option\"]}",
|
||||
value: "{\"modules\":[\"admin_themes\",\"themes\",\"secure\", \"user\", \"menu\", \"post\", \"option\"]}",
|
||||
label: "Активные модули"
|
||||
);
|
||||
$this->out->r("create option active_modules", "green");
|
||||
@ -133,6 +147,14 @@ class AdminConsoleController extends ConsoleController
|
||||
]);
|
||||
$this->out->r("create item menu admin-themes", "green");
|
||||
|
||||
$this->menuService->createItem([
|
||||
"label" => "Темы сайта",
|
||||
"url" => "/admin/settings/themes",
|
||||
"slug" => "themes",
|
||||
"parent_slug" => "settings"
|
||||
]);
|
||||
$this->out->r("create item menu themes", "green");
|
||||
|
||||
$this->menuService->createItem([
|
||||
"label" => "Меню",
|
||||
"url" => "/admin/settings/menu",
|
||||
|
@ -71,11 +71,16 @@ class MigrationController extends ConsoleController
|
||||
$dmr = new DatabaseMigrationRepository(App::$db->capsule->getDatabaseManager(), 'migration');
|
||||
|
||||
$m = new Migrator($dmr, App::$db->capsule->getDatabaseManager(), new Filesystem());
|
||||
if (isset($this->argv['path'])){
|
||||
$migrationPaths = [ROOT_DIR . $this->argv['path']];
|
||||
}
|
||||
else {
|
||||
if (\kernel\App::$db->schema->hasTable('option')) {
|
||||
$migrationPaths = array_merge($this->moduleService->getModulesMigrationsPaths(), [ROOT_DIR . '/migrations']);
|
||||
} else {
|
||||
$migrationPaths = [ROOT_DIR . '/migrations'];
|
||||
}
|
||||
}
|
||||
|
||||
$res = $m->run($migrationPaths);
|
||||
foreach ($res as $re) {
|
||||
@ -94,7 +99,13 @@ class MigrationController extends ConsoleController
|
||||
|
||||
$m = new Migrator($dmr, App::$db->capsule->getDatabaseManager(), new Filesystem());
|
||||
//$migrationPaths = array_merge(App::$migrationsPaths, [WORKSPACE_DIR . '/console/migrations']);
|
||||
if (isset($this->argv['path'])){
|
||||
$migrationPaths = [ROOT_DIR . $this->argv['path']];
|
||||
}
|
||||
else {
|
||||
$migrationPaths = [ROOT_DIR . '/migrations'];
|
||||
}
|
||||
|
||||
$res = $m->rollback($migrationPaths, ['step' => $step]);
|
||||
print_r($step);
|
||||
foreach ($res as $re) {
|
||||
|
73
kernel/console/controllers/ThemeController.php
Normal file
73
kernel/console/controllers/ThemeController.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\console\controllers;
|
||||
|
||||
use kernel\console\ConsoleController;
|
||||
use kernel\helpers\Files;
|
||||
use kernel\helpers\Manifest;
|
||||
use kernel\models\Option;
|
||||
use kernel\services\AdminThemeService;
|
||||
use kernel\services\ThemeService;
|
||||
use ZipArchive;
|
||||
|
||||
class ThemeController extends ConsoleController
|
||||
{
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function actionInstallTheme(): void
|
||||
{
|
||||
if (!isset($this->argv['path'])) {
|
||||
throw new \Exception('Missing theme path "--path" specified');
|
||||
}
|
||||
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$themeService = new ThemeService();
|
||||
if ($themeService->install($this->argv['path'])) {
|
||||
$this->out->r("Тема сайта установлена", 'green');
|
||||
} else {
|
||||
$this->out->r("Ошибка установки темы сайта", 'red');
|
||||
}
|
||||
} else {
|
||||
$this->out->r("Тема сайта не найдена", 'red');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function actionUninstallTheme(): void
|
||||
{
|
||||
if (!isset($this->argv['path'])) {
|
||||
throw new \Exception('Missing theme path "--path" specified');
|
||||
}
|
||||
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$themeService = new ThemeService();
|
||||
$themeService->uninstall($this->argv['path']);
|
||||
$this->out->r("Тема сайта удалена", 'green');
|
||||
} else {
|
||||
$this->out->r("Тема сайта не найдена", 'red');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function actionPackTheme(): void
|
||||
{
|
||||
if (!isset($this->argv['path'])) {
|
||||
throw new \Exception('Missing theme path "--path" specified');
|
||||
}
|
||||
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$themeService = new ThemeService();
|
||||
$themeService->pack($this->argv['path']);
|
||||
$this->out->r("Тема сайта заархивирована", 'green');
|
||||
} else {
|
||||
$this->out->r("Тема сайта не найдена", 'red');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -41,6 +41,21 @@ App::$collector->group(["prefix" => "admin-theme"], callback: function (RouteCol
|
||||
);
|
||||
});
|
||||
|
||||
App::$collector->group(["prefix" => "theme"], callback: function (RouteCollector $router){
|
||||
App::$collector->console('install',
|
||||
[\kernel\console\controllers\ThemeController::class, 'actionInstallTheme'],
|
||||
additionalInfo: ['description' => 'Установить тему сайта', 'params' => ['--path' => 'Путь к устанавливаемой теме']]
|
||||
);
|
||||
App::$collector->console('uninstall',
|
||||
[\kernel\console\controllers\ThemeController::class, 'actionUninstallTheme'],
|
||||
additionalInfo: ['description' => 'Удалить тему сайта', 'params' => ['--path' => 'Путь к удаляемой теме']]
|
||||
);
|
||||
App::$collector->console('pack',
|
||||
[\kernel\console\controllers\ThemeController::class, 'actionPackTheme'],
|
||||
additionalInfo: ['description' => 'Заархивировать тему сайта', 'params' => ['--path' => 'Путь к теме, которую нужно заархивировать']]
|
||||
);
|
||||
});
|
||||
|
||||
App::$collector->group(["prefix" => "secure"], callback: function (RouteCollector $router){
|
||||
App::$collector->console('create-secret-key',
|
||||
[\kernel\console\controllers\SecureController::class, 'actionCreateSecretKey'],
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Kernel",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.7",
|
||||
"author": "ITGuild",
|
||||
"slug": "kernel",
|
||||
"type": "kernel",
|
||||
|
@ -17,6 +17,7 @@ use kernel\services\AdminThemeService;
|
||||
use kernel\services\KernelService;
|
||||
use kernel\services\ModuleService;
|
||||
use kernel\services\ModuleShopService;
|
||||
use kernel\services\ThemeService;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
class ModuleShopClientController extends AdminController
|
||||
@ -60,6 +61,7 @@ class ModuleShopClientController extends AdminController
|
||||
'per_page' => $per_page,
|
||||
'kernelService' => new KernelService(),
|
||||
'adminThemeService' => new AdminThemeService(),
|
||||
'themeService' => new ThemeService(),
|
||||
]);
|
||||
} else {
|
||||
$this->cgView->render("module_shop_error_connection.php");
|
||||
@ -90,7 +92,7 @@ class ModuleShopClientController extends AdminController
|
||||
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $module_info['path_to_archive'], RESOURCES_DIR . "/tmp/modules");
|
||||
$this->moduleService->installModule('/resources/tmp/modules/' . basename($module_info['path_to_archive']));
|
||||
|
||||
Flash::setMessage("success", "Модуль успешно установлен.");
|
||||
Flash::setMessage("success", "Модуль успешно загружен.");
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
}
|
||||
|
||||
@ -252,10 +254,9 @@ class ModuleShopClientController extends AdminController
|
||||
$adminThemeInfo = json_decode($adminThemeInfo->getBody()->getContents(), true);
|
||||
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $adminThemeInfo['path_to_archive'], RESOURCES_DIR . "/tmp/admin_themes");
|
||||
if ($this->adminThemeService->install('/resources/tmp/admin_themes/' . basename($adminThemeInfo['path_to_archive']))) {
|
||||
Flash::setMessage("success", "Тема админ-панели успешно установлена.");
|
||||
Flash::setMessage("success", "Тема админ-панели успешно загружена.");
|
||||
} else {
|
||||
Session::start();
|
||||
Session::set("error", implode(";", $this->adminThemeService->getErrors()));
|
||||
Flash::setMessage("error", implode(";", $this->adminThemeService->getErrors()));
|
||||
}
|
||||
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
@ -295,4 +296,56 @@ class ModuleShopClientController extends AdminController
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
}
|
||||
|
||||
#[NoReturn] public function actionThemeInstall(): void
|
||||
{
|
||||
$request = new Request();
|
||||
$id = $request->get("id");
|
||||
$themeInfo = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/install/' . $id);
|
||||
|
||||
$themeInfo = json_decode($themeInfo->getBody()->getContents(), true);
|
||||
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $themeInfo['path_to_archive'], RESOURCES_DIR . "/tmp/themes");
|
||||
if ($this->themeService->install('/resources/tmp/themes/' . basename($themeInfo['path_to_archive']))) {
|
||||
Flash::setMessage("success", "Тема сайта успешно загружена.");
|
||||
} else {
|
||||
Session::start();
|
||||
Session::set("error", implode(";", $this->themeService->getErrors()));
|
||||
}
|
||||
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
}
|
||||
|
||||
#[NoReturn] public function actionThemeUpdate(): void
|
||||
{
|
||||
$request = new Request();
|
||||
$slug = $request->get("slug");
|
||||
$modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||
|
||||
$modules_info = json_decode($modules_info->getBody()->getContents(), true);
|
||||
foreach ($modules_info as $module) {
|
||||
if ($module['slug'] === $slug) {
|
||||
$path = $module['path_to_archive'];
|
||||
}
|
||||
}
|
||||
if (isset($path)) {
|
||||
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $path, RESOURCES_DIR . "/tmp/themes");
|
||||
$this->themeService->update('/resources/tmp/themes/' . basename($path));
|
||||
Flash::setMessage("success", "Тема сайта успешно обновлена.");
|
||||
} else {
|
||||
Flash::setMessage("error", "Ошибка обновления темы сайта.");
|
||||
}
|
||||
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
}
|
||||
|
||||
#[NoReturn] public function actionThemeDelete(): void
|
||||
{
|
||||
$request = new Request();
|
||||
$slug = $request->get("slug");
|
||||
$themeInfo = $this->themeService->getThemeInfoBySlug($slug);
|
||||
$this->themeService->uninstall($themeInfo['path']);
|
||||
|
||||
Flash::setMessage("success", "Тема сайта успешно удалена.");
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,11 @@ App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
|
||||
App::$collector->get('/install', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionAdminThemeInstall']);
|
||||
App::$collector->get('/update', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionAdminThemeUpdate']);
|
||||
App::$collector->get('/delete', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionAdminThemeDelete']);
|
||||
|
||||
});
|
||||
App::$collector->group(["prefix" => "theme"], function (RouteCollector $router) {
|
||||
App::$collector->get('/install', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionThemeInstall']);
|
||||
App::$collector->get('/update', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionThemeUpdate']);
|
||||
App::$collector->get('/delete', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionThemeDelete']);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -7,6 +7,7 @@
|
||||
* @var \kernel\services\ModuleService $moduleService
|
||||
* @var \kernel\services\KernelService $kernelService
|
||||
* @var \kernel\services\AdminThemeService $adminThemeService
|
||||
* @var \kernel\services\ThemeService $themeService
|
||||
* @var array $filterValues
|
||||
*/
|
||||
|
||||
@ -130,6 +131,37 @@ $table->addAction(function ($row, $url) use ($adminThemeService) {
|
||||
return false;
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($themeService) {
|
||||
if ($row['type'] === 'theme') {
|
||||
$slug = $row['slug'];
|
||||
if ($themeService->isInstall($slug)) {
|
||||
if (!$themeService->isLastVersion($slug)) {
|
||||
$url = "$url/theme/update/?slug=" . $row['slug'];
|
||||
|
||||
return \kernel\widgets\IconBtn\IconBtnUpdateWidget::create(['url' => $url])->run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$table->addAction(function ($row, $url) use ($themeService) {
|
||||
if ($row['type'] === 'theme') {
|
||||
if ($themeService->isInstall($row['slug'])) {
|
||||
$url = "$url/theme/delete/?slug=" . $row['slug'];
|
||||
|
||||
return \kernel\widgets\IconBtn\IconBtnDeleteWidget::create(['url' => $url])->run();
|
||||
} else {
|
||||
$url = "$url/theme/install/?id=" . $row['id'];
|
||||
|
||||
return \kernel\widgets\IconBtn\IconBtnInstallWidget::create(['url' => $url])->run();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$table->afterPrint(function () {
|
||||
return \kernel\IGTabel\btn\PrimaryBtn::create('Сбросить все фильтры', '/admin/module_shop_client')->fetch();
|
||||
});
|
||||
|
@ -15,7 +15,8 @@ $table_info = [
|
||||
"version" => "Версия",
|
||||
"description" => "Описание",
|
||||
"installations" => "Установки",
|
||||
"views" => "Просмотры"
|
||||
"views" => "Просмотры",
|
||||
"dependence" => "Зависимости"
|
||||
],
|
||||
"params" => ["class" => "table table-bordered"],
|
||||
"baseUrl" => "/admin/module_shop_client",
|
||||
|
33
kernel/modules/themes/ThemesModule.php
Normal file
33
kernel/modules/themes/ThemesModule.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\modules\themes;
|
||||
|
||||
use kernel\Module;
|
||||
use kernel\modules\menu\service\MenuService;
|
||||
|
||||
class ThemesModule extends Module
|
||||
{
|
||||
public MenuService $menuService;
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuService = new MenuService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->menuService->createItem([
|
||||
"label" => "Темы сайта",
|
||||
"url" => "/admin/settings/themes",
|
||||
"slug" => "themes",
|
||||
"parent_slug" => "settings"
|
||||
]);
|
||||
}
|
||||
|
||||
public function deactivate(): void
|
||||
{
|
||||
$this->menuService->removeItemBySlug("themes");
|
||||
}
|
||||
}
|
95
kernel/modules/themes/controllers/ThemeController.php
Normal file
95
kernel/modules/themes/controllers/ThemeController.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\modules\themes\controllers;
|
||||
|
||||
use DirectoryIterator;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use JetBrains\PhpStorm\NoReturn;
|
||||
use Josantonius\Session\Exceptions\HeadersSentException;
|
||||
use Josantonius\Session\Exceptions\SessionNotStartedException;
|
||||
use Josantonius\Session\Exceptions\SessionStartedException;
|
||||
use Josantonius\Session\Exceptions\WrongSessionOptionException;
|
||||
use Josantonius\Session\Facades\Session;
|
||||
use kernel\AdminController;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\models\Option;
|
||||
use kernel\Request;
|
||||
use kernel\services\ModuleService;
|
||||
use kernel\services\ThemeService;
|
||||
|
||||
class ThemeController extends AdminController
|
||||
{
|
||||
public ThemeService $themeService;
|
||||
|
||||
public ModuleService $moduleService;
|
||||
protected function init(): void
|
||||
{
|
||||
parent::init();
|
||||
$this->cgView->viewPath = KERNEL_MODULES_DIR . "/themes/views/";
|
||||
$this->themeService = new ThemeService();
|
||||
$this->moduleService = new ModuleService();
|
||||
}
|
||||
|
||||
public function actionIndex(): void
|
||||
{
|
||||
$themePaths = Option::where("key", "theme_paths")->first();
|
||||
|
||||
$dirs = [];
|
||||
if ($themePaths){
|
||||
$path = json_decode($themePaths->value);
|
||||
foreach ($path->paths as $p){
|
||||
$dirs[] = getConst($p);
|
||||
}
|
||||
}
|
||||
|
||||
$infoToTable = [];
|
||||
$meta = [];
|
||||
$meta['columns'] = [
|
||||
"preview" => "Превью",
|
||||
"name" => "Название",
|
||||
"author" => "Автор",
|
||||
"version" => "Версия",
|
||||
"description" => "Описание"
|
||||
];
|
||||
$meta['params'] = ["class" => "table table-bordered"];
|
||||
$meta['perPage'] = 10;
|
||||
$meta['baseUrl'] = "/admin/settings/themes";
|
||||
$meta['currentPage'] = 1;
|
||||
|
||||
$infoToTable['meta'] = $meta;
|
||||
|
||||
$themesInfo = [];
|
||||
foreach ($dirs as $dir){
|
||||
$i = 1;
|
||||
foreach (new DirectoryIterator($dir) as $fileInfo) {
|
||||
$info = [];
|
||||
if($fileInfo->isDot()) continue;
|
||||
$info['id'] = $i;
|
||||
$themesInfo[] = array_merge($info, $this->themeService->getThemeInfo($fileInfo->getPathname()));
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$infoToTable['meta']['total'] = count($themesInfo);
|
||||
$infoToTable['data'] = $themesInfo;
|
||||
|
||||
$this->cgView->render("index.php", ['json' => json_encode($infoToTable, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws HeadersSentException
|
||||
* @throws WrongSessionOptionException
|
||||
* @throws SessionStartedException
|
||||
* @throws GuzzleException
|
||||
* @throws SessionNotStartedException
|
||||
*/
|
||||
#[NoReturn] public function actionActivate(): void
|
||||
{
|
||||
$request = new Request();
|
||||
if(!$this->themeService->setActiveTheme($request->get("p"))){
|
||||
$this->redirect("/admin/settings/themes/", 302);
|
||||
}
|
||||
|
||||
$this->cgView->render("view.php", ['data' => $this->themeService->getThemeInfo($request->get("p"))]);
|
||||
}
|
||||
|
||||
}
|
10
kernel/modules/themes/manifest.json
Normal file
10
kernel/modules/themes/manifest.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Themes",
|
||||
"version": "0.1",
|
||||
"author": "ITGuild",
|
||||
"slug": "themes",
|
||||
"description": "Themes module",
|
||||
"module_class": "kernel\\modules\\themes\\ThemesModule",
|
||||
"module_class_file": "{KERNEL_MODULES}/themes/ThemesModule.php",
|
||||
"routs": "routs/themes.php"
|
||||
}
|
16
kernel/modules/themes/routs/themes.php
Normal file
16
kernel/modules/themes/routs/themes.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use kernel\App;
|
||||
use kernel\modules\admin_themes\controllers\AdminThemeController;
|
||||
use Phroute\Phroute\RouteCollector;
|
||||
|
||||
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
|
||||
App::$collector->group(["before" => "auth"], function (RouteCollector $router) {
|
||||
App::$collector->group(["prefix" => "settings"], function (RouteCollector $router) {
|
||||
App::$collector->group(["prefix" => "themes"], function (RouteCollector $router) {
|
||||
App::$collector->get('/', [\kernel\modules\themes\controllers\ThemeController::class, 'actionIndex']);
|
||||
App::$collector->get('/activate', [\kernel\modules\themes\controllers\ThemeController::class, 'actionActivate']);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
25
kernel/modules/themes/views/index.php
Normal file
25
kernel/modules/themes/views/index.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $json string
|
||||
*/
|
||||
|
||||
|
||||
$table = new \Itguild\Tables\ListJsonTable($json);
|
||||
$table->columns([
|
||||
'preview' => function ($data) {
|
||||
return "<img src='$data' width='200px'>";
|
||||
}
|
||||
]);
|
||||
$table->addAction(function ($row, $url){
|
||||
$active_admin_theme = \kernel\modules\option\service\OptionService::getItem('active_theme');
|
||||
|
||||
if ($row['path'] === $active_admin_theme){
|
||||
return "Активна";
|
||||
} else {
|
||||
$url = "$url/activate/?p=" . $row['path'];
|
||||
|
||||
return \kernel\widgets\IconBtn\IconBtnActivateWidget::create(['url' => $url])->run();
|
||||
}
|
||||
});
|
||||
$table->create();
|
||||
$table->render();
|
25
kernel/modules/themes/views/view.php
Normal file
25
kernel/modules/themes/views/view.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $data
|
||||
*/
|
||||
|
||||
$table_info = [
|
||||
"meta" => [
|
||||
"rows" => ["preview" => "Превью", "name" => "Название", "version" => "Версия", "description" => "Описание"],
|
||||
"params" => ["class" => "table table-bordered"],
|
||||
"baseUrl" => "/admin/settings/themes",
|
||||
],
|
||||
"data" => $data
|
||||
];
|
||||
|
||||
$table = new \Itguild\Tables\ViewJsonTable(json_encode($table_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||
$table->rows([
|
||||
'preview' => function ($data) {
|
||||
return "<img src='$data' width='500px'>";
|
||||
}
|
||||
]);
|
||||
$table->beforePrint(function () {
|
||||
return \kernel\widgets\IconBtn\IconBtnListWidget::create(['url' => '/admin/settings/themes'])->run();
|
||||
});
|
||||
$table->create();
|
||||
$table->render();
|
@ -16,6 +16,7 @@ class AdminThemeService
|
||||
|
||||
protected Option $option;
|
||||
protected string $active_theme;
|
||||
|
||||
protected ModuleService $moduleService;
|
||||
|
||||
|
||||
@ -104,6 +105,11 @@ class AdminThemeService
|
||||
if ($adminThemePaths) {
|
||||
$path = json_decode($adminThemePaths->value);
|
||||
foreach ($path->paths as $p) {
|
||||
if (!is_dir(getConst($p))){
|
||||
$old_mask = umask(0);
|
||||
mkdir(getConst($p), permissions: 0775, recursive: true);
|
||||
umask($old_mask);
|
||||
}
|
||||
$dirs[] = getConst($p);
|
||||
}
|
||||
}
|
||||
@ -151,7 +157,7 @@ class AdminThemeService
|
||||
|
||||
$fileHelper = new Files();
|
||||
$fileHelper->copy_folder(ROOT_DIR . $path, $tmpThemeDirFull . 'meta/');
|
||||
$fileHelper->copy_folder(RESOURCES_DIR . '/' . $themeName, $tmpThemeDirFull . 'resources/');
|
||||
$fileHelper->copy_folder(RESOURCES_DIR . '/admin_themes/' . $themeName, $tmpThemeDirFull . 'resources/');
|
||||
|
||||
if (!is_dir(RESOURCES_DIR . '/tmp/admin_themes')) {
|
||||
$old_mask = umask(0);
|
||||
@ -193,7 +199,7 @@ class AdminThemeService
|
||||
if (isset($manifest['resource_path'])) {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", $manifest['resource_path']);
|
||||
} else {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", RESOURCES_DIR . '/' . $manifest['slug']);
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", RESOURCES_DIR . '/admin_themes/' . $manifest['slug']);
|
||||
}
|
||||
|
||||
$fileHelper->recursiveRemoveDir($tmpThemeDirFull);
|
||||
@ -213,8 +219,8 @@ class AdminThemeService
|
||||
if (file_exists($path)) {
|
||||
$fileHelper->recursiveRemoveDir($path);
|
||||
}
|
||||
if (file_exists(RESOURCES_DIR . '/' . $themeInfo['slug'])) {
|
||||
$fileHelper->recursiveRemoveDir(RESOURCES_DIR . '/' . $themeInfo['slug']);
|
||||
if (file_exists(RESOURCES_DIR . '/admin_themes/' . $themeInfo['slug'])) {
|
||||
$fileHelper->recursiveRemoveDir(RESOURCES_DIR . '/admin_themes/' . $themeInfo['slug']);
|
||||
}
|
||||
}
|
||||
|
||||
|
10
kernel/services/Dependencies.php
Normal file
10
kernel/services/Dependencies.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\services;
|
||||
|
||||
class Dependencies
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
namespace kernel\services;
|
||||
|
||||
use DirectoryIterator;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use kernel\EntityRelation;
|
||||
use kernel\Flash;
|
||||
use kernel\helpers\Debug;
|
||||
@ -19,6 +20,13 @@ class ModuleService
|
||||
|
||||
protected null|bool $serverAvailable = null;
|
||||
|
||||
public ModuleShopService $moduleShopService;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->moduleShopService = new ModuleShopService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $module
|
||||
* @return false|array|string
|
||||
@ -177,6 +185,11 @@ class ModuleService
|
||||
if ($module_paths) {
|
||||
$path = json_decode($module_paths->value);
|
||||
foreach ($path->paths as $p) {
|
||||
if (!is_dir(getConst($p))){
|
||||
$old_mask = umask(0);
|
||||
mkdir(getConst($p), permissions: 0775, recursive: true);
|
||||
umask($old_mask);
|
||||
}
|
||||
$dirs[] = getConst($p);
|
||||
}
|
||||
}
|
||||
@ -458,12 +471,13 @@ class ModuleService
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function isLastVersion(string $slug): bool
|
||||
{
|
||||
if ($this->isServerAvailable()) {
|
||||
$modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||
|
||||
$modules_info = json_decode($modules_info->getBody()->getContents(), true);
|
||||
$modules_info = $this->moduleShopService->getGroupedBySlugModules();
|
||||
|
||||
$mod_info = $this->getModuleInfoBySlug($slug);
|
||||
|
||||
@ -491,16 +505,18 @@ class ModuleService
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function isShopModule(string $slug): bool
|
||||
{
|
||||
if ($this->isServerAvailable()) {
|
||||
$modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||
$modules_info = $this->moduleShopService->getGroupedBySlugModules();
|
||||
|
||||
if (!$this->issetModuleShopToken()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$modules_info = json_decode($modules_info->getBody()->getContents(), true);
|
||||
if (isset($modules_info)) {
|
||||
$mod_info = $this->getModuleInfoBySlug($slug);
|
||||
foreach ($modules_info as $mod) {
|
||||
@ -591,11 +607,41 @@ class ModuleService
|
||||
{
|
||||
$data = file_get_contents($templatePath);
|
||||
|
||||
foreach ($params as $key => $param){
|
||||
foreach ($params as $key => $param) {
|
||||
$data = str_replace("{" . $key . "}", $param, $data);
|
||||
}
|
||||
|
||||
file_put_contents($filePath, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function recursiveActivateDependencies(array $dependencies): bool
|
||||
{
|
||||
$notActiveDependencies = [];
|
||||
foreach ($dependencies as $depend) {
|
||||
if (!$this->isInstall($depend)) {
|
||||
$this->moduleShopService->installModule($depend);
|
||||
if (!$this->setActiveModule($depend)) {
|
||||
$notActiveDependencies[] = $depend;
|
||||
}
|
||||
} else {
|
||||
if (!$this->isActive($depend)) {
|
||||
if (!$this->setActiveModule($depend)) {
|
||||
$notActiveDependencies[] = $depend;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($notActiveDependencies) {
|
||||
if (!$this->recursiveActivateDependencies($notActiveDependencies)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,11 @@
|
||||
namespace kernel\services;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use kernel\Flash;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\helpers\Files;
|
||||
use kernel\helpers\RESTClient;
|
||||
use kernel\Request;
|
||||
|
||||
class ModuleShopService
|
||||
{
|
||||
@ -17,20 +21,88 @@ class ModuleShopService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $email
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function email_auth(string $email)
|
||||
public function email_auth(string $email): mixed
|
||||
{
|
||||
$request = RESTClient::post($this->url . "/api/secure/email_auth", ['email' => $email], false);
|
||||
|
||||
return json_decode($request->getBody()->getContents(), true);
|
||||
}
|
||||
|
||||
public function code_check(string $code)
|
||||
/**
|
||||
* @param string $code
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function code_check(string $code): mixed
|
||||
{
|
||||
$request = RESTClient::post($this->url . "/api/secure/code_check", ['code' => $code], false);
|
||||
|
||||
return json_decode($request->getBody()->getContents(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getGroupedBySlugModules(): mixed
|
||||
{
|
||||
$modulesInfo = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||
return json_decode($modulesInfo->getBody()->getContents(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function installModule(string $slug): void
|
||||
{
|
||||
$moduleInfo = $this->getModuleInfoBySlug($slug);
|
||||
|
||||
$moduleInfo = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/install/' . $moduleInfo['id']);
|
||||
$moduleInfo = json_decode($moduleInfo->getBody()->getContents(), true);
|
||||
|
||||
Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $moduleInfo['path_to_archive'], RESOURCES_DIR . "/tmp/modules");
|
||||
|
||||
(new ModuleService())->installModule('/resources/tmp/modules/' . basename($moduleInfo['path_to_archive']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return false|mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function getModuleInfoBySlug(string $slug): mixed
|
||||
{
|
||||
$modulesInfo = $this->getGroupedBySlugModules();
|
||||
foreach ($modulesInfo as $module) {
|
||||
if ($module['slug'] === $slug) {
|
||||
return $module;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $slug
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function existsInModuleShop(string $slug): bool
|
||||
{
|
||||
$modulesInfo = $this->getGroupedBySlugModules();
|
||||
foreach ($modulesInfo as $module) {
|
||||
if ($module['slug'] === $slug) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
340
kernel/services/ThemeService.php
Normal file
340
kernel/services/ThemeService.php
Normal file
@ -0,0 +1,340 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\services;
|
||||
|
||||
use DirectoryIterator;
|
||||
use Josantonius\Session\Facades\Session;
|
||||
use kernel\Flash;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\helpers\Files;
|
||||
use kernel\helpers\Manifest;
|
||||
use kernel\helpers\RESTClient;
|
||||
use kernel\models\Option;
|
||||
use ZipArchive;
|
||||
|
||||
class ThemeService
|
||||
{
|
||||
protected array $errors = [];
|
||||
|
||||
protected Option $option;
|
||||
protected string $active_theme = "";
|
||||
|
||||
protected ModuleService $moduleService;
|
||||
|
||||
protected ModuleShopService $moduleShopService;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->option = new Option();
|
||||
$this->findActiveTheme();
|
||||
$this->moduleService = new ModuleService();
|
||||
$this->moduleShopService = new ModuleShopService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getErrors(): array
|
||||
{
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $msg
|
||||
* @return void
|
||||
*/
|
||||
public function addError($msg): void
|
||||
{
|
||||
$this->errors[] = $msg;
|
||||
}
|
||||
|
||||
public function findActiveTheme(): void
|
||||
{
|
||||
$model = $this->option::where("key", "active_theme")->first();
|
||||
$this->active_theme = $model->value;
|
||||
}
|
||||
|
||||
public function getActiveTheme(): string
|
||||
{
|
||||
return $this->active_theme;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $theme
|
||||
* @return bool
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function setActiveTheme(string $theme): bool
|
||||
{
|
||||
$activeTheme = $this->option::where("key", "active_theme")->first();
|
||||
|
||||
$themeInfo = $this->getThemeInfo(getConst($theme));
|
||||
$dependenceArray = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/get_all_dependencies/' . $themeInfo['slug']);
|
||||
$dependenceArray = json_decode($dependenceArray->getBody()->getContents(), true);
|
||||
|
||||
foreach ($dependenceArray as $depend) {
|
||||
if (!$this->moduleService->isInstall($depend)) {
|
||||
if (!$this->moduleShopService->existsInModuleShop($depend)) {
|
||||
Flash::setMessage('error', "Модуль $depend не найден в IT Guild Framework Shop.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->moduleService->recursiveActivateDependencies($dependenceArray)){
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->runDeactivateScript($this->getActiveThemeInfo());
|
||||
$this->runInitScript($themeInfo);
|
||||
|
||||
$activeTheme->value = getConst($theme);
|
||||
$activeTheme->save();
|
||||
return true;
|
||||
}
|
||||
|
||||
public function runInitScript($themeInfo): void
|
||||
{
|
||||
if (isset($themeInfo['theme_class'])) {
|
||||
if (isset($themeInfo['theme_class_file'])) {
|
||||
require_once getConst($themeInfo['theme_class_file']);
|
||||
}
|
||||
$themeClass = new $themeInfo['theme_class']();
|
||||
$themeClass->init();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $themeInfo
|
||||
* @return void
|
||||
*/
|
||||
public function runDeactivateScript($themeInfo): void
|
||||
{
|
||||
if (isset($themeInfo['theme_class'])) {
|
||||
if (isset($themeInfo['theme_class_file'])) {
|
||||
require_once getConst($themeInfo['theme_class_file']);
|
||||
}
|
||||
$themeClass = new $themeInfo['theme_class']();
|
||||
$themeClass->deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
public function getActiveThemeInfo(): false|array|string
|
||||
{
|
||||
return $this->getThemeInfo($this->active_theme);
|
||||
}
|
||||
|
||||
public function getThemeInfo(string $theme): false|array|string
|
||||
{
|
||||
$info = [];
|
||||
$theme = getConst($theme);
|
||||
$info['path'] = $theme;
|
||||
if (file_exists($theme . "/manifest.json")) {
|
||||
$manifest = file_get_contents($theme . "/manifest.json");
|
||||
$manifest = Manifest::getWithVars($manifest);
|
||||
$manifest['preview'] = $manifest['resource'] . "/" . $manifest['preview'];
|
||||
$info = array_merge($info, $manifest);
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
public function getThemeInfoBySlug(string $slug): false|array|string
|
||||
{
|
||||
$dirs = $this->getThemeDirs();
|
||||
foreach ($dirs as $dir) {
|
||||
foreach (new DirectoryIterator($dir) as $fileInfo) {
|
||||
if ($fileInfo->isDot()) continue;
|
||||
if ($this->getThemeInfo($fileInfo->getPathname())['slug'] === $slug) {
|
||||
return $this->getThemeInfo($fileInfo->getPathname());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getThemeDirs(): array
|
||||
{
|
||||
$ThemePaths = Option::where("key", "theme_paths")->first();
|
||||
$dirs = [];
|
||||
if ($ThemePaths) {
|
||||
$path = json_decode($ThemePaths->value);
|
||||
foreach ($path->paths as $p) {
|
||||
if (!is_dir(getConst($p))){
|
||||
$old_mask = umask(0);
|
||||
mkdir(getConst($p), permissions: 0775, recursive: true);
|
||||
umask($old_mask);
|
||||
}
|
||||
$dirs[] = getConst($p);
|
||||
}
|
||||
}
|
||||
return $dirs;
|
||||
}
|
||||
|
||||
public function isInstall(string $slug): bool
|
||||
{
|
||||
$dirs = $this->getThemeDirs();
|
||||
foreach ($dirs as $dir) {
|
||||
foreach (new DirectoryIterator($dir) as $fileInfo) {
|
||||
if ($fileInfo->isDot()) continue;
|
||||
if ($this->getThemeInfo($fileInfo->getPathname())['slug'] === $slug) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isLastVersion(string $slug): bool
|
||||
{
|
||||
if ($this->moduleService->isServerAvailable()) {
|
||||
$modulesInfo = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||
|
||||
$modulesInfo = json_decode($modulesInfo->getBody()->getContents(), true);
|
||||
|
||||
$themeInfo = $this->getThemeInfoBySlug($slug);
|
||||
foreach ($modulesInfo as $mod) {
|
||||
if ($mod['slug'] === $themeInfo['slug'] && $mod['version'] === $themeInfo['version']) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function pack(string $path): void
|
||||
{
|
||||
$themeName = basename($path);
|
||||
|
||||
$tmpThemeDirFull = RESOURCES_DIR . '/tmp/ad/' . $themeName . "/";
|
||||
|
||||
$fileHelper = new Files();
|
||||
$fileHelper->copy_folder(ROOT_DIR . $path, $tmpThemeDirFull . 'meta/app/');
|
||||
$fileHelper->copy_folder(KERNEL_DIR . '/app_themes/' . $themeName, $tmpThemeDirFull . 'meta/kernel/');
|
||||
$fileHelper->copy_folder(RESOURCES_DIR . '/themes/' . $themeName, $tmpThemeDirFull . 'resources/');
|
||||
|
||||
if (!is_dir(RESOURCES_DIR . '/tmp/themes')) {
|
||||
$old_mask = umask(0);
|
||||
mkdir(RESOURCES_DIR . '/tmp/themes', 0775, true);
|
||||
umask($old_mask);
|
||||
}
|
||||
$fileHelper->pack($tmpThemeDirFull, RESOURCES_DIR . '/tmp/themes/' . $themeName . '.igt');
|
||||
}
|
||||
|
||||
public function install(string $path): bool
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
$tmpThemeDir = md5(time());
|
||||
$res = $zip->open(ROOT_DIR . $path);
|
||||
if ($res === TRUE) {
|
||||
$tmpThemeDirFull = RESOURCES_DIR . '/tmp/ad/' . $tmpThemeDir . "/";
|
||||
$zip->extractTo($tmpThemeDirFull);
|
||||
$zip->close();
|
||||
} else {
|
||||
$this->addError('unable to open zip archive');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!file_exists($tmpThemeDirFull . "meta/app/manifest.json")){
|
||||
$this->addError('manifest.json not found');
|
||||
return false;
|
||||
}
|
||||
|
||||
$manifestJson = getConst(file_get_contents($tmpThemeDirFull . "meta/app/manifest.json"));
|
||||
$manifest = Manifest::getWithVars($manifestJson);
|
||||
|
||||
$fileHelper = new Files();
|
||||
if (isset($manifest['theme_app_path'])) {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "meta/app", $manifest['theme_app_path']);
|
||||
} else {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "meta/app", APP_DIR . '/themes/' . $manifest['slug']);
|
||||
}
|
||||
|
||||
if (isset($manifest['theme_kernel_path'])) {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "meta/kernel", $manifest['theme_kernel_path']);
|
||||
} else {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "meta/kernel", KERNEL_DIR . '/app_themes/' . $manifest['slug']);
|
||||
}
|
||||
|
||||
if (isset($manifest['resource_path'])) {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", $manifest['resource_path']);
|
||||
} else {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "resources", RESOURCES_DIR . '/themes/' . $manifest['slug']);
|
||||
}
|
||||
|
||||
$fileHelper->recursiveRemoveDir($tmpThemeDirFull);
|
||||
unlink(ROOT_DIR . $path);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall(string $path): void
|
||||
{
|
||||
$themeInfo = $this->getThemeInfo(APP_DIR . '/themes/' . basename($path));
|
||||
|
||||
$active_theme = $this->option::where("key", "active_theme")->first();
|
||||
if ($active_theme->value === ROOT_DIR . $path) {
|
||||
$this->setActiveTheme(KERNEL_DIR . '/themes/default');
|
||||
}
|
||||
$fileHelper = new Files();
|
||||
if (file_exists($path)) {
|
||||
$fileHelper->recursiveRemoveDir($path);
|
||||
}
|
||||
if (file_exists(KERNEL_DIR . '/app_themes/' . $themeInfo['slug'])) {
|
||||
$fileHelper->recursiveRemoveDir(KERNEL_DIR . '/app_themes/' . $themeInfo['slug']);
|
||||
}
|
||||
if (file_exists(RESOURCES_DIR . '/themes/' . $themeInfo['slug'])) {
|
||||
$fileHelper->recursiveRemoveDir(RESOURCES_DIR . '/themes/' . $themeInfo['slug']);
|
||||
}
|
||||
}
|
||||
|
||||
public function update(string $path): bool
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
$tmpThemeDir = md5(time());
|
||||
$res = $zip->open(ROOT_DIR . $path);
|
||||
if ($res === TRUE) {
|
||||
$tmpThemeDirFull = RESOURCES_DIR . '/tmp/ad/' . $tmpThemeDir . "/";
|
||||
$zip->extractTo($tmpThemeDirFull);
|
||||
$zip->close();
|
||||
} else {
|
||||
$this->addError('unable to open zip archive');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!file_exists($tmpThemeDirFull . "meta/manifest.json")){
|
||||
$this->addError('manifest.json not found');
|
||||
return false;
|
||||
}
|
||||
|
||||
$manifestJson = getConst(file_get_contents($tmpThemeDirFull . "meta/manifest.json"));
|
||||
$manifest = Manifest::getWithVars($manifestJson);
|
||||
|
||||
$fileHelper = new Files();
|
||||
if (isset($manifest['theme_kernel_path'])) {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "meta/kernel", $manifest['theme_app_path']);
|
||||
} else {
|
||||
$fileHelper->copy_folder($tmpThemeDirFull . "meta/kernel", APP_DIR . '/themes/' . $manifest['slug']);
|
||||
}
|
||||
|
||||
$fileHelper->recursiveRemoveDir($tmpThemeDirFull);
|
||||
unlink(ROOT_DIR . $path);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getThemeRout(string $path)
|
||||
{
|
||||
if (file_exists($path . "/manifest.json")){
|
||||
$manifest = json_decode(file_get_contents($path . "/manifest.json"), true);
|
||||
if ($manifest['routs']) {
|
||||
return $manifest['routs'];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
18
kernel/themes/default/assets/DefaultThemesAssets.php
Normal file
18
kernel/themes/default/assets/DefaultThemesAssets.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\themes\default\assets;
|
||||
|
||||
use kernel\Assets;
|
||||
|
||||
class DefaultThemesAssets extends Assets
|
||||
{
|
||||
protected function createCSS(): void
|
||||
{
|
||||
$this->registerCSS(slug: "main", resource: "/css/styles.css");
|
||||
}
|
||||
|
||||
protected function createJS(): void
|
||||
{
|
||||
$this->registerJS(slug: "webpack", resource: "/js/scripts.js");
|
||||
}
|
||||
}
|
28
kernel/themes/default/controllers/MainController.php
Normal file
28
kernel/themes/default/controllers/MainController.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace kernel\themes\default\controllers;
|
||||
|
||||
use kernel\Controller;
|
||||
|
||||
class MainController extends Controller
|
||||
{
|
||||
|
||||
protected function init(): void
|
||||
{
|
||||
parent::init();
|
||||
$this->cgView->viewPath = KERNEL_DIR . "/themes/default/views/main/";
|
||||
$this->cgView->layout = "main.php";
|
||||
$this->cgView->layoutPath = KERNEL_DIR . "/themes/default/views/layout/";
|
||||
$this->cgView->addVarToLayout("resources", "/resources/themes/default");
|
||||
}
|
||||
|
||||
public function actionIndex(): void
|
||||
{
|
||||
$this->cgView->render("index.php");
|
||||
}
|
||||
|
||||
public function actionAbout(): void
|
||||
{
|
||||
$this->cgView->render("about.php");
|
||||
}
|
||||
}
|
13
kernel/themes/default/manifest.json
Normal file
13
kernel/themes/default/manifest.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "Default",
|
||||
"version": "0.1",
|
||||
"author": "ItGuild",
|
||||
"slug": "default",
|
||||
"type": "theme",
|
||||
"description": "Default theme",
|
||||
"preview": "preview.png",
|
||||
"resource": "/resources/themes/default",
|
||||
"resource_path": "{RESOURCES}/themes/default",
|
||||
"routs": "routs/default.php",
|
||||
"dependence": ""
|
||||
}
|
12
kernel/themes/default/routs/default.php
Normal file
12
kernel/themes/default/routs/default.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use kernel\App;
|
||||
|
||||
|
||||
App::$collector->get('/', [\kernel\themes\default\controllers\MainController::class, 'actionIndex']);
|
||||
App::$collector->get('/about', [\kernel\themes\default\controllers\MainController::class, 'actionAbout']);
|
||||
//App::$collector->get('/page/{page_number}', [\app\modules\tag\controllers\TagController::class, 'actionIndex']);
|
||||
//App::$collector->get('/create', [\app\modules\tag\controllers\TagController::class, 'actionCreate']);
|
||||
|
||||
|
||||
|
92
kernel/themes/default/views/layout/main.php
Normal file
92
kernel/themes/default/views/layout/main.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $content
|
||||
* @var string $resources
|
||||
* @var string $title
|
||||
* @var \kernel\CgView $view
|
||||
*/
|
||||
$assets = new \kernel\themes\default\assets\DefaultThemesAssets($resources);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<?php $assets->getCSSAsSTR(); ?>
|
||||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
<title><?= $title ?></title>
|
||||
<?= $view->getMeta() ?>
|
||||
<link rel="icon" type="image/x-icon" href="<?= $resources ?>/assets/favicon.ico"/>
|
||||
<!-- Font Awesome icons (free version)-->
|
||||
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
|
||||
<!-- Google fonts-->
|
||||
<link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800"
|
||||
rel="stylesheet" type="text/css"/>
|
||||
<!-- Core theme CSS (includes Bootstrap)-->
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation-->
|
||||
<nav class="navbar navbar-expand-lg navbar-light" id="mainNav">
|
||||
<div class="container px-4 px-lg-5">
|
||||
<a class="navbar-brand" href="/">Main IT Guild Micro Framework theme</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
|
||||
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
Menu
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ms-auto py-4 py-lg-0">
|
||||
<li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link px-lg-3 py-3 py-lg-4" href="/about">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<?= $content ?>
|
||||
|
||||
<!-- Footer-->
|
||||
<footer class="border-top">
|
||||
<div class="container px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item">
|
||||
<a href="#!">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#!">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="#!">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="small text-center text-muted fst-italic">Copyright © IT Guild Micro Framework</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- Bootstrap core JS-->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- Core theme JS-->
|
||||
<?php $assets->getJSAsStr(); ?>
|
||||
</body>
|
||||
</html>
|
36
kernel/themes/default/views/main/about.php
Normal file
36
kernel/themes/default/views/main/about.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $resources;
|
||||
* @var \kernel\CgView $view
|
||||
*/
|
||||
|
||||
$view->setTitle("Старт Bootstrap");
|
||||
$view->setMeta([
|
||||
'description' => 'Дефолтная bootstrap тема'
|
||||
]);
|
||||
?>
|
||||
<!-- Page Header-->
|
||||
<header class="masthead" style="background-image: url('<?= $resources ?>/assets/img/about-bg.jpeg')">
|
||||
<div class="container position-relative px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<div class="page-heading">
|
||||
<h1>About Me</h1>
|
||||
<span class="subheading">This is what I do.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- Main Content-->
|
||||
<main class="mb-4">
|
||||
<div class="container px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe nostrum ullam eveniet pariatur voluptates odit, fuga atque ea nobis sit soluta odio, adipisci quas excepturi maxime quae totam ducimus consectetur?</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius praesentium recusandae illo eaque architecto error, repellendus iusto reprehenderit, doloribus, minus sunt. Numquam at quae voluptatum in officia voluptas voluptatibus, minus!</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut consequuntur magnam, excepturi aliquid ex itaque esse est vero natus quae optio aperiam soluta voluptatibus corporis atque iste neque sit tempora!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
86
kernel/themes/default/views/main/index.php
Normal file
86
kernel/themes/default/views/main/index.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $resources;
|
||||
* @var \kernel\CgView $view
|
||||
*/
|
||||
|
||||
$view->setTitle("IT Guild Micro Framework");
|
||||
$view->setMeta([
|
||||
'description' => 'Default IT Guild Micro Framework theme'
|
||||
]);
|
||||
?>
|
||||
<!-- Page Header-->
|
||||
<header class="masthead" style="background-image: url('<?= $resources ?>/assets/img/home-bg.jpeg')">
|
||||
<div class="container position-relative px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<div class="site-heading">
|
||||
<h1>Clean Blog</h1>
|
||||
<span class="subheading">A Blog Theme by IT Guild Micro Framework</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- Main Content-->
|
||||
<div class="container px-4 px-lg-5">
|
||||
<div class="row gx-4 gx-lg-5 justify-content-center">
|
||||
<div class="col-md-10 col-lg-8 col-xl-7">
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!">
|
||||
<h2 class="post-title">Man must explore, and this is exploration at its greatest</h2>
|
||||
<h3 class="post-subtitle">Problems look mighty small from 150 miles up</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on September 24, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!"><h2 class="post-title">I believe every human has a finite number of heartbeats. I don't intend to waste any of mine.</h2></a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on September 18, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!">
|
||||
<h2 class="post-title">Science has not yet mastered prophecy</h2>
|
||||
<h3 class="post-subtitle">We predict too much for the next year and yet far too little for the next ten.</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on August 24, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Post preview-->
|
||||
<div class="post-preview">
|
||||
<a href="#!">
|
||||
<h2 class="post-title">Failure is not an option</h2>
|
||||
<h3 class="post-subtitle">Many say exploration is part of our destiny, but it’s actually our duty to future generations.</h3>
|
||||
</a>
|
||||
<p class="post-meta">
|
||||
Posted by
|
||||
<a href="#!">Start Bootstrap</a>
|
||||
on July 8, 2023
|
||||
</p>
|
||||
</div>
|
||||
<!-- Divider-->
|
||||
<hr class="my-4" />
|
||||
<!-- Pager-->
|
||||
<div class="d-flex justify-content-end mb-4"><a class="btn btn-primary text-uppercase" href="#!">Older Posts →</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -79,7 +79,5 @@ if ($moduleService->isActive('module_shop_client')) {
|
||||
ModuleTabsWidget::create()->run();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$table->create();
|
||||
$table->render();
|
||||
|
0
resources/custom/css/bootstrap.min.css → resources/admin_themes/custom/css/bootstrap.min.css
vendored
Executable file → Normal file
0
resources/custom/css/bootstrap.min.css → resources/admin_themes/custom/css/bootstrap.min.css
vendored
Executable file → Normal file
0
resources/custom/css/bootstrap/_media.css → resources/admin_themes/custom/css/bootstrap/_media.css
Executable file → Normal file
0
resources/custom/css/bootstrap/_media.css → resources/admin_themes/custom/css/bootstrap/_media.css
Executable file → Normal file
0
resources/custom/css/bootstrap/mixins/_border-radius.css → resources/admin_themes/custom/css/bootstrap/mixins/_border-radius.css
Executable file → Normal file
0
resources/custom/css/bootstrap/mixins/_border-radius.css → resources/admin_themes/custom/css/bootstrap/mixins/_border-radius.css
Executable file → Normal file
0
resources/custom/css/bootstrap/mixins/_screen-reader.css → resources/admin_themes/custom/css/bootstrap/mixins/_screen-reader.css
Executable file → Normal file
0
resources/custom/css/bootstrap/mixins/_screen-reader.css → resources/admin_themes/custom/css/bootstrap/mixins/_screen-reader.css
Executable file → Normal file
0
resources/custom/css/bootstrap/mixins/_visibility.css → resources/admin_themes/custom/css/bootstrap/mixins/_visibility.css
Executable file → Normal file
0
resources/custom/css/bootstrap/mixins/_visibility.css → resources/admin_themes/custom/css/bootstrap/mixins/_visibility.css
Executable file → Normal file
0
resources/custom/css/style.css → resources/admin_themes/custom/css/style.css
Executable file → Normal file
0
resources/custom/css/style.css → resources/admin_themes/custom/css/style.css
Executable file → Normal file
0
resources/custom/images/bg_1.jpg → resources/admin_themes/custom/images/bg_1.jpg
Executable file → Normal file
0
resources/custom/images/bg_1.jpg → resources/admin_themes/custom/images/bg_1.jpg
Executable file → Normal file
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
0
resources/custom/images/logo.jpg → resources/admin_themes/custom/images/logo.jpg
Executable file → Normal file
0
resources/custom/images/logo.jpg → resources/admin_themes/custom/images/logo.jpg
Executable file → Normal file
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
7
resources/admin_themes/custom/js/bootstrap.min.js
vendored
Normal file
7
resources/admin_themes/custom/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
0
resources/custom/js/jquery.min.js → resources/admin_themes/custom/js/jquery.min.js
vendored
Executable file → Normal file
0
resources/custom/js/jquery.min.js → resources/admin_themes/custom/js/jquery.min.js
vendored
Executable file → Normal file
0
resources/custom/js/main.js → resources/admin_themes/custom/js/main.js
Executable file → Normal file
0
resources/custom/js/main.js → resources/admin_themes/custom/js/main.js
Executable file → Normal file
0
resources/custom/js/popper.js → resources/admin_themes/custom/js/popper.js
Executable file → Normal file
0
resources/custom/js/popper.js → resources/admin_themes/custom/js/popper.js
Executable file → Normal file
0
resources/custom/nrnv2024_640x360.jpg → resources/admin_themes/custom/nrnv2024_640x360.jpg
Executable file → Normal file
0
resources/custom/nrnv2024_640x360.jpg → resources/admin_themes/custom/nrnv2024_640x360.jpg
Executable file → Normal file
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
0
resources/custom/scss/bootstrap/_alert.scss → resources/admin_themes/custom/scss/bootstrap/_alert.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_alert.scss → resources/admin_themes/custom/scss/bootstrap/_alert.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_badge.scss → resources/admin_themes/custom/scss/bootstrap/_badge.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_badge.scss → resources/admin_themes/custom/scss/bootstrap/_badge.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_breadcrumb.scss → resources/admin_themes/custom/scss/bootstrap/_breadcrumb.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_breadcrumb.scss → resources/admin_themes/custom/scss/bootstrap/_breadcrumb.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_button-group.scss → resources/admin_themes/custom/scss/bootstrap/_button-group.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_button-group.scss → resources/admin_themes/custom/scss/bootstrap/_button-group.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_buttons.scss → resources/admin_themes/custom/scss/bootstrap/_buttons.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_buttons.scss → resources/admin_themes/custom/scss/bootstrap/_buttons.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_card.scss → resources/admin_themes/custom/scss/bootstrap/_card.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_card.scss → resources/admin_themes/custom/scss/bootstrap/_card.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_carousel.scss → resources/admin_themes/custom/scss/bootstrap/_carousel.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_carousel.scss → resources/admin_themes/custom/scss/bootstrap/_carousel.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_close.scss → resources/admin_themes/custom/scss/bootstrap/_close.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_close.scss → resources/admin_themes/custom/scss/bootstrap/_close.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_code.scss → resources/admin_themes/custom/scss/bootstrap/_code.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_code.scss → resources/admin_themes/custom/scss/bootstrap/_code.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_custom-forms.scss → resources/admin_themes/custom/scss/bootstrap/_custom-forms.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_custom-forms.scss → resources/admin_themes/custom/scss/bootstrap/_custom-forms.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_dropdown.scss → resources/admin_themes/custom/scss/bootstrap/_dropdown.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_dropdown.scss → resources/admin_themes/custom/scss/bootstrap/_dropdown.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_forms.scss → resources/admin_themes/custom/scss/bootstrap/_forms.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_forms.scss → resources/admin_themes/custom/scss/bootstrap/_forms.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_functions.scss → resources/admin_themes/custom/scss/bootstrap/_functions.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_functions.scss → resources/admin_themes/custom/scss/bootstrap/_functions.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_grid.scss → resources/admin_themes/custom/scss/bootstrap/_grid.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_grid.scss → resources/admin_themes/custom/scss/bootstrap/_grid.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_images.scss → resources/admin_themes/custom/scss/bootstrap/_images.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_images.scss → resources/admin_themes/custom/scss/bootstrap/_images.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_input-group.scss → resources/admin_themes/custom/scss/bootstrap/_input-group.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_input-group.scss → resources/admin_themes/custom/scss/bootstrap/_input-group.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_jumbotron.scss → resources/admin_themes/custom/scss/bootstrap/_jumbotron.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_jumbotron.scss → resources/admin_themes/custom/scss/bootstrap/_jumbotron.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_list-group.scss → resources/admin_themes/custom/scss/bootstrap/_list-group.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_list-group.scss → resources/admin_themes/custom/scss/bootstrap/_list-group.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_media.scss → resources/admin_themes/custom/scss/bootstrap/_media.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_media.scss → resources/admin_themes/custom/scss/bootstrap/_media.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_mixins.scss → resources/admin_themes/custom/scss/bootstrap/_mixins.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_mixins.scss → resources/admin_themes/custom/scss/bootstrap/_mixins.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_modal.scss → resources/admin_themes/custom/scss/bootstrap/_modal.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_modal.scss → resources/admin_themes/custom/scss/bootstrap/_modal.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_nav.scss → resources/admin_themes/custom/scss/bootstrap/_nav.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_nav.scss → resources/admin_themes/custom/scss/bootstrap/_nav.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_navbar.scss → resources/admin_themes/custom/scss/bootstrap/_navbar.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_navbar.scss → resources/admin_themes/custom/scss/bootstrap/_navbar.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_pagination.scss → resources/admin_themes/custom/scss/bootstrap/_pagination.scss
Executable file → Normal file
0
resources/custom/scss/bootstrap/_pagination.scss → resources/admin_themes/custom/scss/bootstrap/_pagination.scss
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user