-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
executable file
·79 lines (65 loc) · 2.69 KB
/
config.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
<?php
return [
/*
|--------------------------------------------------------------------------
| Inherit from another theme
|--------------------------------------------------------------------------
|
| Set up inherit from another if the file is not exists,
| this is work with "layouts", "partials", "views" and "widgets"
|
| [Notice] assets cannot inherit.
|
*/
'inherit' => null, //default
/*
|--------------------------------------------------------------------------
| Listener from events
|--------------------------------------------------------------------------
|
| You can hook a theme when event fired on activities
| this is cool feature to set up a title, meta, default styles and scripts.
|
| [Notice] these event can be override by package config.
|
*/
'events' => [
// Before event inherit from package config and the theme that call before,
// you can use this event to set meta, breadcrumb template or anything
// you want inheriting.
'before' => function ($theme) {
// You can remove this line anytime.
$theme->setTitle(config('app.name'));
// Breadcrumb template.
// $theme->breadcrumb()->setTemplate('
// <ul class="breadcrumb">
// @foreach ($crumbs as $i => $crumb)
// @if ($i != (count($crumbs) - 1))
// <li><a href="{{ $crumb["url"] }}">{{ $crumb["label"] }}</a><span class="divider">/</span></li>
// @else
// <li class="active">{{ $crumb["label"] }}</li>
// @endif
// @endforeach
// </ul>
// ');
},
// Listen on event before render a theme,
// this event should call to assign some assets,
// breadcrumb template.
'beforeRenderTheme' => function ($theme) {
//You may use this event to set up your assets.
//You may use this event to set up your assets.
$theme->asset()->usepath()->add('normalize', 'css/normalize.css');
$theme->asset()->usepath()->add('user', 'css/vendor.css');
$theme->asset()->usepath()->add('main', 'css/main.css');
$theme->asset()->usepath()->add('jquery', 'packages/jquery/js/jquery.min.js');
},
// Listen on event before render a layout,
// this should call to assign style, script for a layout.
'beforeRenderLayout' => [
'auth' => function ($theme) {
$theme->asset()->usepath()->add('auth', 'css/auth.css');
},
],
],
];