QualKard: scaffold plugin from Skeleton + ported qualcard grading math (v0.2.0)
This commit is contained in:
1
Asset/css/skeleton.css
vendored
1
Asset/css/skeleton.css
vendored
@@ -1 +0,0 @@
|
|||||||
/* Skeleton plugin styles -- add CSS here. Loaded via template:layout:css. */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
// Skeleton plugin script -- add JS here. Loaded via template:layout:js.
|
|
||||||
37
Plugin.php
37
Plugin.php
@@ -1,35 +1,40 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Kanboard\Plugin\Skeleton;
|
namespace Kanboard\Plugin\QualKard;
|
||||||
|
|
||||||
use Kanboard\Core\Plugin\Base;
|
use Kanboard\Core\Plugin\Base;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QualKard -- flashcard spaced repetition on Kanboard cards.
|
||||||
|
*
|
||||||
|
* Each card is a flashcard (title = prompt, description = answer). You grade a due card by dragging
|
||||||
|
* it into a grade column (Hairy/Hard/Medium/Easy); QualKard turns the grade into a due date via the
|
||||||
|
* qualcard average + interval, and the companion RecoReco plugin does all the card movement.
|
||||||
|
*
|
||||||
|
* Requires RecoReco (the move engine). Grading math is ported from Ruben's C program "qualcard".
|
||||||
|
*/
|
||||||
class Plugin extends Base
|
class Plugin extends Base
|
||||||
{
|
{
|
||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
// 1. Render a visible word at the top of every page (the demo output).
|
// Hooks are wired in later versions (setup on Integrations, the grade handler, the badge).
|
||||||
$this->template->hook->attach('template:layout:top', 'skeleton:layout/header');
|
}
|
||||||
|
|
||||||
// 2. Load the plugin stylesheet (currently empty -- proves the CSS hook fires).
|
public function getHelpers()
|
||||||
$this->hook->on('template:layout:css', array(
|
{
|
||||||
'template' => 'plugins/Skeleton/Asset/css/skeleton.css',
|
return array(
|
||||||
));
|
'Plugin\QualKard\Helper' => array('QualKardHelper'),
|
||||||
|
);
|
||||||
// 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 'QualKard';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginDescription()
|
public function getPluginDescription()
|
||||||
{
|
{
|
||||||
return t('Reusable skeleton/template for building Kanboard plugins.');
|
return t('Flashcard spaced repetition: grade a card by dragging it to a column, and it comes back when due (needs RecoReco).');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginAuthor()
|
public function getPluginAuthor()
|
||||||
@@ -39,12 +44,12 @@ class Plugin extends Base
|
|||||||
|
|
||||||
public function getPluginVersion()
|
public function getPluginVersion()
|
||||||
{
|
{
|
||||||
return '0.1.0';
|
return '0.2.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginHomepage()
|
public function getPluginHomepage()
|
||||||
{
|
{
|
||||||
return 'https://code.beco.cc/beco/kanboard-plugin-skeleton';
|
return 'https://code.beco.cc/beco/QualKard';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCompatibleVersion()
|
public function getCompatibleVersion()
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<div class="skeleton-plugin-marker">Skeleton</div>
|
|
||||||
Reference in New Issue
Block a user