phpvms/config/themes.php

69 lines
2.4 KiB
PHP
Raw Normal View History

<?php
return [
2018-08-27 00:40:04 +08:00
'themes_path' => resource_path('views/layouts'), // eg: base_path('resources/themes')
'asset_not_found' => 'LOG_ERROR',
'default' => 'default',
2020-02-23 05:03:01 +08:00
'cache' => false,
2018-08-27 00:40:04 +08:00
/*
|--------------------------------------------------------------------------
| Define available themes. Format:
|
2019-05-13 02:26:44 +08:00
| 'theme-name' => [
| 'extends' => 'theme-to-extend', // optional
| 'views-path' => 'path-to-views', // defaults to: resources/views/theme-name
| 'asset-path' => 'path-to-assets', // defaults to: public/theme-name
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| // You can add your own custom keys
| // Use Theme::getSetting('key') & Theme::setSetting('key', 'value') to access them
| 'key' => 'value',
| ],
2018-08-27 00:40:04 +08:00
|
|--------------------------------------------------------------------------
*/
2018-08-27 00:40:04 +08:00
'themes' => [
2018-08-27 00:40:04 +08:00
'default' => [
'extends' => 'false',
],
2019-05-13 02:26:44 +08:00
// Add your themes here. These settings will override theme.json settings defined for each theme
2018-08-27 00:40:04 +08:00
/*
|---------------------------[ Example Structure ]--------------------------
|
2019-05-13 02:26:44 +08:00
| // Full theme Syntax:
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| 'example1' => [
| 'extends' => null, // doesn't extend any theme
| 'views-path' => example, // = resources/views/example_theme
| 'asset-path' => example, // = public/example_theme
| ],
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| // Use all Defaults:
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| 'example2', // Assets =\public\example2, Views =\resources\views\example2
| // Note that if you use all default values, you can omit declaration completely.
| // i.e. defaults will be used when you call Theme::set('undefined-theme')
2018-08-27 00:40:04 +08:00
|
|
2019-05-13 02:26:44 +08:00
| // This theme shares the views with example2 but defines its own assets in \public\example3
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| 'example3' => [
| 'views-path' => 'example',
| ],
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| // This theme extends example1 and may override SOME views\assets in its own paths
2018-08-27 00:40:04 +08:00
|
2019-05-13 02:26:44 +08:00
| 'example4' => [
| 'extends' => 'example1',
| ],
2018-08-27 00:40:04 +08:00
|
|--------------------------------------------------------------------------
*/
],
];