*/ if (!defined('DOKU_INC')) die(); if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(dirname(__FILE__).'/core.php'); class syntax_plugin_mikioplugin_progressbar extends syntax_plugin_mikioplugin_core { public $tag = 'progressbar'; public $hasEndTag = false; public $options = array( 'width' => array('type' => 'number', 'default' => '0'), // 'height' => array('type' => 'size', 'default' => '1em'), 'striped' => array('type' => 'boolean', 'default' => 'false'), 'animated' => array('type' => 'boolean', 'default' => 'false'), 'text' => array('type' => 'text', 'default' => ''), // 'type' => array('type' => 'choice', // 'data' => array('primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'), // 'default' => 'primary'), ); public function __construct() { $this->addCommonOptions('height type'); $this->options['type']['default'] = 'primary'; $this->options['height']['default'] = '1.5em'; } public function render_lexer_special(Doku_Renderer $renderer, $data) { $classes = $this->buildClass($data, array('striped', 'animated')); $styles = $this->buildStyle(array('height' => $data['height']), TRUE); $renderer->doc .= '
'; $renderer->doc .= '
' . $data['text'] . '
'; $renderer->doc .= '
'; } } ?>