diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-21 21:07:15 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-21 21:07:15 -0400 |
commit | 78ecdc05c34f706a4eab3ff09161a3a79189cdf6 (patch) | |
tree | 8fbc6f854b73509408b841fc21ba698f38b0b931 /doc | |
parent | 2cff1d6a37977caec4376e1dee0b9215d2ecdca8 (diff) |
Add plugin hooks for assets
Diffstat (limited to 'doc')
-rw-r--r-- | doc/plugins.markdown | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/plugins.markdown b/doc/plugins.markdown index cccda796..1f04374f 100644 --- a/doc/plugins.markdown +++ b/doc/plugins.markdown @@ -154,6 +154,34 @@ List of merge hooks: - `$start` Calendar start date (string, ISO-8601 format) - `$end` Calendar end date (string, ISO-8601 format) +Asset Hooks +----------- + +Asset hooks can be used to add easily a new stylesheet or a new javascript file in the layout. You can use this feature to create a theme and override all Kanboard default styles. + +Example to add a new stylesheet: + +```php +<?php + +namespace Plugin\Css; + +use Core\Plugin\Base; + +class Plugin extends Base +{ + public function initialize() + { + $this->hook->on('template:layout:css', 'plugins/Css/skin.css'); + } +} +``` + +List of asset Hooks: + +- `template:layout:css` +- `template:layout:js` + Template hooks -------------- @@ -338,3 +366,4 @@ Examples of plugins - [User timetable](https://github.com/kanboard/plugin-timetable) - [Subtask Forecast](https://github.com/kanboard/plugin-subtask-forecast) - [Theme plugin sample](https://github.com/kanboard/plugin-example-theme) +- [CSS plugin sample](https://github.com/kanboard/plugin-example-css) |