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
var matchedSliderPoint = _.find(slider.points,function(e) { | |
return e.value === slider.value; | |
}); | |
if(matchedSliderPoint === undefined) matchedSliderPoint = slider.points[0]; | |
if(initialize) { | |
this.changeValue(slider, matchedSliderPoint); | |
} else { | |
this.changeValue(slider, slider.currentPoint); | |
} |
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
// components/sass/themes/he-base/_text.scss | |
//Default styles for all text blocks | |
.items { | |
@include p1(); | |
} | |
//Typography classes that are reused. To use these, drop them onto the text block as a class. | |
.p1 { | |
@include p1(); | |
} |
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
game.module( | |
'game.objects' | |
) | |
.body(function() { | |
game.createClass('Canvas', { | |
drawings: [], | |
g: new game.Graphics(), | |
init: function(position, size, style) { |
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
<?php | |
function slider_post_types_register() { | |
register_post_type( 'slider', | |
array( | |
'labels' => array( | |
'name' => __( 'Sliders' ), | |
'singular_name' => __( 'Slider' ), | |
'add_new' => __( 'Add New Slider' ), | |
'add_new_item' => __( 'Add New 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
<?php | |
/* | |
Plugin Name: Swapps Wordpress Slider | |
Plugin URI: http://swapps.io | |
Description: Easy, simple sliders. | |
Author: Julián Bonilla | |
Version: 0.1 | |
Author URI: http://swapps.io/ | |
*/ |
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
<?php | |
$args = array( 'post_type' => 'slider'); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
?> | |
<h2><?php the_title(); ?></h2> | |
<?php | |
if( have_rows('slide') ): ?> | |
<div class="carousel fade-carousel slide" data-ride="carousel" data-interval="4000" id="bs-carousel"> | |
<!-- Overlay --> |