Created
February 24, 2014 14:10
-
-
Save flashvnn/9189060 to your computer and use it in GitHub Desktop.
liquid_slider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$preset = new stdClass(); | |
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */ | |
$preset->api_version = 1; | |
$preset->name = 'liquid_slider'; | |
$preset->title = 'Liquid Slider'; | |
$preset->html = '<div class="liquid-slider" id="slider-id"> | |
{{#data}} | |
<div> | |
<h2 class="title">{{title}}</h2> | |
{{{description}}} | |
</div> | |
{{/data}} | |
</div> | |
<script> | |
(function($){ | |
$(document).ready(function() { | |
$(\'#slider-id\').liquidSlider(); | |
}); | |
})(jQuery); | |
</script> | |
'; | |
$preset->css = ''; | |
$preset->ext_css = 'http://kevinbatdorf.github.io/liquidslider/css/liquid-slider.css'; | |
$preset->ext_js = 'http://kevinbatdorf.github.io/liquidslider/js/jquery.easing.1.3.js | |
http://kevinbatdorf.github.io/liquidslider/js/jquery.touchSwipe.min.js | |
http://kevinbatdorf.github.io/liquidslider/js/jquery.liquid-slider.js'; | |
$preset->html_compiled = '<?php return function ($in) { | |
$cx = Array( | |
\'flags\' => Array( | |
\'jstrue\' => false, | |
\'jsobj\' => false, | |
), | |
\'scopes\' => Array($in), | |
\'path\' => Array(), | |
); | |
ob_start();echo \'<div class="liquid-slider" id="slider-id"> | |
\',LCRun::sec(\'data\', $cx, $in, false, function($cx, $in) {echo \' | |
<div> | |
<h2 class="title">\',htmlentities($in[\'title\'], ENT_QUOTES),\'</h2> | |
\',$in[\'description\'],\' | |
</div> | |
\';}),\' | |
</div> | |
<script> | |
(function($){ | |
$(document).ready(function() { | |
$(\\\'#slider-id\\\').liquidSlider(); | |
}); | |
})(jQuery); | |
</script> | |
\';return ob_get_clean(); | |
} | |
?>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment