From 244f89aabae0bd501f72c9a0ba7769ab7e4e4179 Mon Sep 17 00:00:00 2001 From: Glen Cheney Date: Sat, 26 Mar 2016 17:28:34 -0700 Subject: [PATCH] Move gulp tasks to separate files. Replace grid. Add autoprefixer. --- _includes/adding-removing.html | 8 +- _includes/advanced-filters.html | 8 +- _includes/credit-jake.html | 2 +- _includes/demo-list.html | 4 +- _includes/events.html | 8 +- _includes/head.html | 2 +- _includes/nav.html | 14 +- _includes/options.html | 4 +- _includes/picture-item.html | 2 +- _includes/sorting.html | 12 +- _includes/usage.html | 16 +- _layouts/default.html | 6 +- _posts/2013-05-01-basic.html | 14 +- _posts/2013-05-02-adaptive.html | 8 +- _posts/2013-05-03-images.html | 12 +- _posts/2013-06-19-adding-removing.html | 4 +- _posts/2013-06-26-mobile-grid.html | 30 +- _posts/2013-06-29-image-problems.html | 10 +- _posts/2013-07-16-faq.html | 18 +- _posts/2013-08-25-animated.html | 14 +- _posts/2014-03-08-bootstrap3-grid.html | 6 +- _posts/2014-04-09-requirejs.html | 12 +- _scss/_bootstrap.scss | 1147 ---------------- _scss/_global.scss | 11 - _scss/_grid-framework.scss | 159 +++ _scss/_grid.scss | 126 ++ _scss/_mixins.scss | 61 + _scss/_mobile-grid.scss | 24 - _scss/_site-nav.scss | 5 +- _scss/_type.scss | 21 +- _scss/_variables.scss | 18 +- _scss/shuffle-styles.scss | 25 +- _scss/style.scss | 6 +- bower.json | 4 +- css/gallery.css | 4 +- css/shuffle-styles.css | 37 +- css/style.css | 1691 ++++++++---------------- dist/shuffle.js | 2 + gulp/config.js | 4 + gulp/tasks/compile.js | 31 + gulp/tasks/css.js | 17 + gulp/tasks/jekyll.js | 11 + gulp/tasks/set-watching.js | 11 + gulpfile.js | 72 +- index.html | 186 ++- package.json | 2 + src/shuffle.es6.js | 11 +- 47 files changed, 1329 insertions(+), 2571 deletions(-) delete mode 100755 _scss/_bootstrap.scss create mode 100644 _scss/_grid-framework.scss create mode 100644 _scss/_grid.scss create mode 100644 _scss/_mixins.scss delete mode 100644 _scss/_mobile-grid.scss create mode 100644 gulp/config.js create mode 100644 gulp/tasks/compile.js create mode 100644 gulp/tasks/css.js create mode 100644 gulp/tasks/jekyll.js create mode 100644 gulp/tasks/set-watching.js diff --git a/_includes/adding-removing.html b/_includes/adding-removing.html index 14963ed..2dcb768 100644 --- a/_includes/adding-removing.html +++ b/_includes/adding-removing.html @@ -2,16 +2,20 @@

You can add and remove elements from shuffle after it has been created. This also works for infinite scrolling.

Add a collection

-
// Adds 2 <div>s to an existing Shuffle instance.
+
+
// Adds 2 <div>s to an existing Shuffle instance.
 var $item1 = $('<div class="gallery-item item1">')
 var $item2 = $('<div class="gallery-item item2">')
 var $items = $item1.add($item2);
 $('#my-shuffle').append($items);
 $('#my-shuffle').shuffle('appended', $items);
+

Remove a collection

-
// Remove the 2 <div>s which were just added.
+
+
// Remove the 2 <div>s which were just added.
 var $items = $('.gallery-item');
 $('#my-shuffle').shuffle('remove', $items);
+
diff --git a/_includes/advanced-filters.html b/_includes/advanced-filters.html index a1edff7..3a9bbcc 100644 --- a/_includes/advanced-filters.html +++ b/_includes/advanced-filters.html @@ -3,13 +3,16 @@

By passing a function to shuffle, you can customize the filtering to your hearts content. Shuffle will iterate over each item and give your function the element wrapped in jQuery and the shuffle instance. Return true to keep the element or false to hide it.

Example

-
// Filters elements with a data-title attribute with less than 10 characters
+
+
// Filters elements with a data-title attribute with less than 10 characters
 $('#grid').shuffle('shuffle', function($el, shuffle) {
   return $el.data('title').length < 10;
 });
+

Searching

-
// Advanced filtering
+
+
// Advanced filtering
 $('.js-shuffle-search').on('keyup change', function() {
   var val = this.value.toLowerCase();
   $grid.shuffle('shuffle', function($el, shuffle) {
@@ -23,5 +26,6 @@ $('.js-shuffle-search').on('keyup change', function() {
     return text.indexOf(val) !== -1;
   });
 });
+
diff --git a/_includes/credit-jake.html b/_includes/credit-jake.html index 8d73f36..fafd5a9 100644 --- a/_includes/credit-jake.html +++ b/_includes/credit-jake.html @@ -1,5 +1,5 @@ diff --git a/_includes/demo-list.html b/_includes/demo-list.html index d0b4c77..b26801b 100644 --- a/_includes/demo-list.html +++ b/_includes/demo-list.html @@ -1,6 +1,6 @@ -
+
{% for post in site.demos %} -
+
diff --git a/_includes/events.html b/_includes/events.html index c62c7f2..64dfa06 100644 --- a/_includes/events.html +++ b/_includes/events.html @@ -8,17 +8,21 @@

Get notified when shuffle is done with setup

-
$grid.on('done.shuffle', function() {
+
+
$grid.on('done.shuffle', function() {
   console.log('Finished initializing shuffle!');
 });
 
 // Initialize shuffle
 $grid.shuffle( options );
+

Do something when an item is removed

-
$grid.on('removed.shuffle', function( evt, $collection, shuffle ) {
+
+
$grid.on('removed.shuffle', function( evt, $collection, shuffle ) {
   console.log( this, evt, $collection, shuffle );
 });
+
diff --git a/_includes/head.html b/_includes/head.html index bae700f..6c5b0ad 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,5 +1,5 @@ - + {{ page.title }} diff --git a/_includes/nav.html b/_includes/nav.html index e8cdf85..0df131e 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -2,20 +2,20 @@