From 29ed19b4cbfd3a4cfa12a4367210652fea0faba6 Mon Sep 17 00:00:00 2001 From: Ruben Carlo Benante Date: Wed, 1 Jul 2026 09:50:40 -0300 Subject: [PATCH] plugin main php file --- Plugin.php | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Plugin.php b/Plugin.php index 78240ed..c535518 100644 --- a/Plugin.php +++ b/Plugin.php @@ -1,6 +1,6 @@ template->hook->attach('template:layout:top', 'skeleton:layout/header'); - - // 2. Load the plugin stylesheet (currently empty -- proves the CSS hook fires). + // Load the plugin stylesheet (drag cursor styling; inert until enabled). $this->hook->on('template:layout:css', array( - 'template' => 'plugins/Skeleton/Asset/css/skeleton.css', + 'template' => 'plugins/TweakDrag/Asset/css/tweak-drag.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', - )); + // Inject the column-gap CSS variable and, when enabled, the gap rule. + $this->template->hook->attach('template:layout:head', 'tweakDrag:layout/variable'); + + // Add a "Tweak Drag" entry to the Settings sidebar. + $this->template->hook->attach('template:config:sidebar', 'tweakDrag:config/sidebar'); + + // Optional: click-and-drag the board background to scroll horizontally. + if ((int) $this->configModel->get('tweakdrag_drag_scroll', 1) === 1) { + $this->hook->on('template:layout:js', array( + 'template' => 'plugins/TweakDrag/Asset/js/drag-scroll.js', + )); + } } public function getPluginName() { - return 'Skeleton'; + return 'TweakDrag'; } public function getPluginDescription() { - return t('Reusable skeleton/template for building Kanboard plugins.'); + return t('Board drag, touch and column-gap tweaks (drag-to-scroll, wider column gap).'); } public function getPluginAuthor() @@ -44,7 +49,7 @@ class Plugin extends Base public function getPluginHomepage() { - return 'https://code.beco.cc/beco/kanboard-plugin-skeleton'; + return 'https://code.beco.cc/beco/TweakDrag'; } public function getCompatibleVersion()