diff --git a/app/modules/module_shop/models/forms/CreateThemeShopForm.php b/app/modules/module_shop/models/forms/CreateThemeShopForm.php index 1b478e3..ae6e4ec 100644 --- a/app/modules/module_shop/models/forms/CreateThemeShopForm.php +++ b/app/modules/module_shop/models/forms/CreateThemeShopForm.php @@ -17,6 +17,7 @@ class CreateThemeShopForm extends FormModel 'slug' => 'required', 'type' => 'required', 'path_to_archive' => 'required', + 'dependence' => '' ]; } } \ No newline at end of file diff --git a/app/themes/custom/assets/CustomThemesAssets.php b/app/themes/custom/assets/CustomThemesAssets.php new file mode 100644 index 0000000..b8fce55 --- /dev/null +++ b/app/themes/custom/assets/CustomThemesAssets.php @@ -0,0 +1,18 @@ +registerCSS(slug: "main", resource: "/css/styles.css"); + } + + protected function createJS(): void + { + $this->registerJS(slug: "webpack", resource: "/js/scripts.js"); + } +} \ No newline at end of file diff --git a/app/themes/custom/controllers/MainController.php b/app/themes/custom/controllers/MainController.php new file mode 100644 index 0000000..b0d59fa --- /dev/null +++ b/app/themes/custom/controllers/MainController.php @@ -0,0 +1,28 @@ +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"); + } +} \ No newline at end of file diff --git a/app/themes/custom/manifest.json b/app/themes/custom/manifest.json new file mode 100644 index 0000000..d8902c2 --- /dev/null +++ b/app/themes/custom/manifest.json @@ -0,0 +1,12 @@ +{ + "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", + "routs": "routs/custom.php" +} \ No newline at end of file diff --git a/app/themes/custom/routs/custom.php b/app/themes/custom/routs/custom.php new file mode 100644 index 0000000..bdf1640 --- /dev/null +++ b/app/themes/custom/routs/custom.php @@ -0,0 +1,12 @@ +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']); + + + diff --git a/app/themes/custom/views/layout/main.php b/app/themes/custom/views/layout/main.php new file mode 100644 index 0000000..ea94fe4 --- /dev/null +++ b/app/themes/custom/views/layout/main.php @@ -0,0 +1,92 @@ + + + + + + + getCSSAsSTR(); ?> + + + <?= $title ?> + getMeta() ?> + + + + + + + + + + + + + + + + + + + +getJSAsStr(); ?> + + diff --git a/app/themes/custom/views/main/about.php b/app/themes/custom/views/main/about.php new file mode 100644 index 0000000..47b9fde --- /dev/null +++ b/app/themes/custom/views/main/about.php @@ -0,0 +1,36 @@ +setTitle("Старт Bootstrap"); +$view->setMeta([ + 'description' => 'Дефолтная bootstrap тема' +]); +?> + +
+
+
+
+
+

About Me

+ This is what I do. +
+
+
+
+
+ +
+
+
+
+

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?

+

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!

+

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!

+
+
+
+
\ No newline at end of file diff --git a/app/themes/custom/views/main/index.php b/app/themes/custom/views/main/index.php new file mode 100644 index 0000000..e7e33c1 --- /dev/null +++ b/app/themes/custom/views/main/index.php @@ -0,0 +1,86 @@ +setTitle("IT Guild Micro Framework"); +$view->setMeta([ + 'description' => 'Default IT Guild Micro Framework theme' +]); +?> + +
+
+
+
+
+

Clean Blog

+ A Blog Theme by IT Guild Micro Framework +
+
+
+
+
+ +
+
+ +
+
\ No newline at end of file