This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
80 lines (68 loc) · 2.16 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
use GreenCheap\MyBlog\Bootstrap;
return [
"name" => "myblog",
"main" => function ($app) {
$app["theme_blog"] = new Bootstrap();
},
"autoload" => [
"GreenCheap\\MyBlog\\" => "src",
],
"menus" => [
"main" => "Main",
"others" => "Others",
],
"positions" => [
"navbar" => "Navbar Right",
"navbar-vertical" => "Navbar Left",
"top" => "Top",
"sidebar" => "Sidebar",
"bottom" => "Bottom",
"footer" => "Footer",
],
"node" => [
"section" => "uk-section uk-section-default",
"container" => "uk-container",
"sectionSize" => "",
"sectionImage" => "",
"contentAlign" => "",
"titleHide" => false,
"titleDomElement" => "h1",
"titleColor" => "",
"titleClass" => "",
],
"widget" => [
"onHeightViewport" => false,
"heights" => [
"offset-bottom" => 20,
"offset-top" => 0,
],
"section" => "uk-section uk-section-default",
"sectionSize" => "",
"sectionImage" => "",
"contentAlign" => "",
"titleHide" => false,
"titleDomElement" => "h1",
"titleColor" => "",
"titleClass" => "",
],
"events" => [
"view.system/site/admin/edit" => function ($event, $view) use ($app) {
$view->script("node-theme", "theme:app/bundle/node-theme.js", "site-edit");
},
"view.system/widget/edit" => function ($event, $view) {
$view->script("widget-theme", "theme:app/bundle/widget-theme.js", "widget-edit");
},
"view.scripts" => function ($event, $scripts) {
$scripts->register("blog-theme", "theme:app/bundle/blog-theme.js", "~post-edit");
},
"view.layout" => function ($event, $view) use ($app) {
if ($app->isAdmin()) {
return;
}
$params = $view->params;
$userConfig = $app["config"]->get("system/user");
$params["registration_permit"] = $userConfig->get("registration") != "admin" && $app["user"]->isAnonymous() ? true : false;
},
],
];