plugin v0.2

This commit is contained in:
2026-06-28 16:36:58 -03:00
parent 248cfe201b
commit e46a124bad

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace Kanboard\Plugin\Skeleton; namespace Kanboard\Plugin\ShrinkVertically;
use Kanboard\Core\Plugin\Base; use Kanboard\Core\Plugin\Base;
@@ -8,28 +8,21 @@ class Plugin extends Base
{ {
public function initialize() public function initialize()
{ {
// 1. Render a visible word at the top of every page (the demo output). // Inject a small CSS override that reduces the height of vertically
$this->template->hook->attach('template:layout:top', 'skeleton:layout/header'); // collapsed board columns so the horizontal scrollbar stays visible.
// 2. Load the plugin stylesheet (currently empty -- proves the CSS hook fires).
$this->hook->on('template:layout:css', array( $this->hook->on('template:layout:css', array(
'template' => 'plugins/Skeleton/Asset/css/skeleton.css', 'template' => 'plugins/ShrinkVertically/Asset/css/shrink-vertically.css',
));
// 3. Load the plugin script (currently empty -- proves the JS hook fires).
$this->hook->on('template:layout:js', array(
'template' => 'plugins/Skeleton/Asset/js/skeleton.js',
)); ));
} }
public function getPluginName() public function getPluginName()
{ {
return 'Skeleton'; return 'ShrinkVertically';
} }
public function getPluginDescription() public function getPluginDescription()
{ {
return t('Reusable skeleton/template for building Kanboard plugins.'); return t('Shrink vertically-collapsed board columns so the horizontal scrollbar stays visible.');
} }
public function getPluginAuthor() public function getPluginAuthor()
@@ -44,7 +37,7 @@ class Plugin extends Base
public function getPluginHomepage() public function getPluginHomepage()
{ {
return 'https://code.beco.cc/beco/kanboard-plugin-skeleton'; return 'https://code.beco.cc/beco/shrink-vertically';
} }
public function getCompatibleVersion() public function getCompatibleVersion()