-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.php
51 lines (39 loc) · 1.19 KB
/
Plugin.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
<?php
namespace Kanboard\Plugin\DarkModeSwitcher;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
class Plugin extends Base
{
public function initialize()
{
/* Add the switcher button in the header */
$this->template->hook->attach('template:header:dropdown', 'DarkModeSwitcher:SwitcherButton');
/* Add css if dark mode is enabled */
$this->template->hook->attach('template:layout:head', 'DarkModeSwitcher:DarkModeStyleInclude');
/* Load button handling js */
$this->hook->on('template:layout:js', array('template' => 'plugins/DarkModeSwitcher/Assets/SwitcherButton.js'));
}
public function onStartup()
{
}
public function getPluginName()
{
return 'Dark mode Switcher';
}
public function getPluginDescription()
{
return t('A simple plugin that adds a button to switch between dark and light modes');
}
public function getPluginAuthor()
{
return 'Jeroen Tas';
}
public function getPluginVersion()
{
return '1.0.0';
}
public function getPluginHomepage()
{
return 'https://github.com/Jeroen-45/kanboard-dark-mode-switcher';
}
}