*/ 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_carousel extends syntax_plugin_mikioplugin_core { public $tag = 'carousel'; public $hasEndTag = true; public $options = array( 'transition' => array( 'type' => 'choice', 'data' => array('slide', 'fade'), 'default' => '' ), 'indicators' => array('type' => 'boolean', 'default' => 'true'), 'controls' => array('type' => 'boolean', 'default' => 'true'), 'start' => array('type' => 'boolean', 'default' => 'false'), 'cover' => array('type' => 'boolean', 'default' => 'false'), 'control-color' => array('type' => 'color', 'default' => '#fff'), 'control-outline-color' => array('type' => 'color', 'default' => ''), 'control-outline-width' => array('type' => 'multisize', 'default' => ''), ); public function __construct() { $this->addCommonOptions('height'); } public function render_lexer_enter(Doku_Renderer $renderer, $data) { $classes = $this->buildClass($data, array('transition')); $styles = $this->buildStyle(array('height' => $data['height']), TRUE); $renderer->doc .= '
'; $renderer->doc .= '
'; } public function render_lexer_exit(Doku_Renderer $renderer, $data) { $renderer->doc .= '
'; if ($data['controls'] === TRUE) { $svg_styles = $this->buildStyle(array('fill' => $data['control-color'], 'stroke' => $data['control-outline-color'], 'stroke-width' => $data['control-outline-width']), TRUE); $renderer->doc .= ''; $renderer->doc .= ''; } if ($data['indicators'] === TRUE) { $renderer->doc .= ''; } $renderer->doc .= '
'; } }