*/ 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_carouselitem extends syntax_plugin_mikioplugin_core { public $tag = 'carousel-item'; public $requires_tag = 'carousel'; public $hasEndTag = false; public $options = array( 'active' => array('type' => 'boolean', 'default' => 'false'), 'image' => array('type' => 'media', 'default' => ''), 'title' => array('type' => 'text', 'default' => ''), 'text' => array('type' => 'text', 'default' => ''), 'url' => array('type' => 'url', 'default' => ''), 'background-color' => array('type' => 'color', 'default' => ''), 'placeholder-text' => array('type' => 'text', 'default' => ''), 'placeholder-text-color' => array('type' => 'color', 'default' => ''), 'placeholder-color' => array('type' => 'color', 'default' => ''), 'delay' => array('type' => 'float', 'default' =>'4.5'), ); public function __construct() { $this->options['placeholder-color']['default'] = $this->callMikioOptionDefault('placeholder', 'color'); $this->options['placeholder-text-color']['default'] = $this->callMikioOptionDefault('placeholder', 'text-color'); } public function render_lexer_special(Doku_Renderer $renderer, $data) { $classes = $this->buildClass($data, array('active'), ''); $renderer->doc .= '
'; if($data['image'] != '') { $renderer->doc .= ''; } else { if($data['placeholder-text'] != '') { $this->syntaxRender($renderer, 'placeholder', '', array('text' => $data['placeholder-text'], 'color' => $data['placeholder-color'], 'text-color' => $data['placeholder-text-color'])); } } if($data['title'] != '' || $data['text'] != '') { $renderer->doc .= '
'; if($data['title'] != '') { $renderer->doc .= '
' . ($data['url'] != '' ? '' : '') . $data['title'] . ($data['url'] != '' ? '' : '') . '
'; } if($data['text'] != '') { $renderer->doc .= '

' . $data['text'] . '

'; } $renderer->doc .= '
'; } $renderer->doc .= '
'; } } ?>