gouy 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c38229631cd4ccfd32e78306bd6a9d5a82cf9a4b
4
+ data.tar.gz: 5353676d4eca170de4930646f1bded6c8e43f784
5
+ SHA512:
6
+ metadata.gz: 469a86fd048f39aead9c1ba5760cfd18c640657acf3ddcb18016899e631c728cee6427c7f7e63551b7b0c9bf83ffcc0dccb274e31ead1d7a61c2ae0176a7473c
7
+ data.tar.gz: 45848157884dd60c4e8f3f87169c0b8e991e4e8e5623b250b5c74c39f6847bd9c1dd80115bda96e674a5c8e2469975b67a5c9bdbe4f7a3686ad287dcd10fb72e
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,47 @@
1
+ # gouy jekyll theme
2
+
3
+ Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes` and your sass in `_sass`. To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Jekyll site's `Gemfile`:
10
+
11
+ ```ruby
12
+ gem "gouy"
13
+ ```
14
+
15
+ And add this line to your Jekyll site's `_config.yml`:
16
+
17
+ ```yaml
18
+ theme: gouy
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install gouy
28
+ ## Usage
29
+
30
+ TODO: Write usage instructions here. Describe your available layouts, includes, and/or sass.
31
+
32
+ ## Contributing
33
+
34
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[afroware]/gouy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
35
+
36
+ ## Development
37
+
38
+ To set up your environment to develop this theme, run `bundle install`.
39
+
40
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
41
+
42
+ When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
43
+
44
+ ## License
45
+
46
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
47
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ layout: default
3
+ type: archive
4
+ ---
5
+
6
+ <div class="post-header">
7
+ <h1 class="post-title-main">{{ page.title }}</h1>
8
+ </div>
9
+ <div class="post-content">
10
+
11
+ {{ content }}
12
+ </div>
13
+
14
+
15
+
@@ -0,0 +1 @@
1
+ <div markdown="span" class="bs-callout bs-callout-{{include.type}}">{{include.content}}</div>
@@ -0,0 +1,19 @@
1
+ <div class="seriesContext">
2
+ <div class="btn-group">
3
+ <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Getting Started <span class="caret"></span></button>
4
+ <ol class="dropdown-menu">
5
+ {% assign pages = site.pages | sort:"weight" %}
6
+ {% for p in pages %}
7
+ {% if p.series == "Getting Started" %}
8
+ {% if p.url == page.url %}
9
+ <li class="active"> → {{p.title}}</li>
10
+ {% else %}
11
+ <li>
12
+ <a href="{{p.url | remove: "/"}}">{{p.title}}</a>
13
+ </li>
14
+ {% endif %}
15
+ {% endif %}
16
+ {% endfor %}
17
+ </ol>
18
+ </div>
19
+ </div>
@@ -0,0 +1,10 @@
1
+ <p>{% assign series_pages = site.tags.series_acme %}
2
+ {% for p in pages %}
3
+ {% if p.series == "Getting Started" %}
4
+ {% assign nextTopic = page.weight | plus: "1" %}
5
+ {% if p.weight == nextTopic %}
6
+ <a href="{{p.url | remove: "/"}}"><button type="button" class="btn btn-primary">Next: {{p.title}}</button></a>
7
+ {% endif %}
8
+ {% endif %}
9
+ {% endfor %}
10
+ </p>
@@ -0,0 +1,19 @@
1
+ <div class="seriesContext">
2
+ <div class="btn-group">
3
+ <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Series Demo <span class="caret"></span></button>
4
+ <ol class="dropdown-menu">
5
+ {% assign pages = site.pages | sort:"weight" %}
6
+ {% for p in pages %}
7
+ {% if p.series == "ACME series" %}
8
+ {% if p.url == page.url %}
9
+ <li class="active"> → {{p.weight}}. {{p.title}}</li>
10
+ {% else %}
11
+ <li>
12
+ <a href="{{p.url | remove: "/"}}">{{p.weight}}. {{p.title}}</a>
13
+ </li>
14
+ {% endif %}
15
+ {% endif %}
16
+ {% endfor %}
17
+ </ol>
18
+ </div>
19
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="seriesContext">
2
+ <a>
3
+ {% assign pages = site.pages | sort:"weight" %}
4
+ {% for pg in pages %}
5
+ {% if pg.series == "ACME series" %}
6
+ {% if pg.weight > page.weight %}
7
+ <a href="{{pg.url | remove: '/'}}"><button type="button" class="btn btn-primary">Next: {{pg.title}}</button></a>
8
+ {% break %}
9
+ {% endif %}
10
+ {% endif %}
11
+ {% endfor %}
12
+ </a>
13
+ &nbsp;
14
+ <div class="btn-group">
15
+ <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Jump to: <span class="caret"></span></button>
16
+ <ol class="dropdown-menu">
17
+ {% for pg in pages %}
18
+ {% if pg.series == "ACME series" %}
19
+ {% if pg.url == page.url %}
20
+ <li class="active"> → {{pg.weight}}. {{pg.title}}</li>
21
+ {% else %}
22
+ <li>
23
+ <a href="{{pg.url | remove: '/'}}">{{pg.title}}</a>
24
+ </li>
25
+ {% endif %}
26
+ {% endif %}
27
+ {% endfor %}
28
+ </ol>
29
+ </div>
30
+ </div>
@@ -0,0 +1,14 @@
1
+
2
+ <div id="userMap">
3
+ <div class="content"><a href="p2_sample1.html"><div class="box box1">Connect to ADB</div></a></div>
4
+ <div class="arrow">→</div>
5
+ <div class="content"><a href="p2_sample2.html"><div class="box box2">Download and Build the Starter Kit</div></a></div>
6
+ <div class="arrow">→</div>
7
+ <div class="content"><a href="p2_sample3.html"><div class="box box3">Take a Tour</div></a></div>
8
+ <div class="arrow">→</div>
9
+ <div class="content"><a href="p2_sample4.html"><div class="box box4">Load Your Widgets</div></a></div>
10
+ <div class="arrow">→</div>
11
+ <div class="content"><a href="p2_sample5.html"><div class="box box5">Query for Something</div></a></div>
12
+ <div class="clearfix"></div>
13
+
14
+ </div>
@@ -0,0 +1,91 @@
1
+ <div id="userMap">
2
+
3
+ <!-- Button trigger modal -->
4
+ <button type="button" class="btn btn-default btn-lg modalButton1" data-toggle="modal" data-target="#myModal1">Get Started</button>
5
+
6
+ <!-- Modal -->
7
+ <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
8
+ <div class="modal-dialog" role="document">
9
+ <div class="modal-content">
10
+ <div class="modal-header">
11
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
12
+ <h4 class="modal-title" id="myModalLabel">Get Started</h4>
13
+ </div>
14
+ <div class="modal-body">
15
+ <p>This is just dummy text ... Your first steps should be to get started. You will need to do the following:</p>
16
+
17
+ <ul>
18
+ <li><a href="p2_sample6.html">Sample 6</a></li>
19
+ <li><a href="p2_sample7.html">Sample 7</a></li>
20
+ <li><a href="p2_sample8.html">Sample 8</a></li>
21
+ </ul>
22
+ <p>If you run into any of these setup issues, you must solve them before you can continue on.</p>
23
+
24
+ </div>
25
+ <div class="modal-footer">
26
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <span class="complexArrow">→</span>
32
+
33
+ <!-- Button trigger modal -->
34
+ <button type="button" class="btn btn-default btn-lg modalButton2" data-toggle="modal" data-target="#myModal2">Build your widgets</button>
35
+ <!-- Modal -->
36
+ <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
37
+ <div class="modal-dialog" role="document">
38
+ <div class="modal-content">
39
+ <div class="modal-header">
40
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
41
+ <h4 class="modal-title" id="myModalLabel">Build your widgets</h4>
42
+ </div>
43
+ <div class="modal-body">
44
+ <p>In this step, you will build the widgets for your system. The widgets form the various components that blah blah blah this is dummy text power the nuclear capabilities of your energy transformer into deep space using wormhole technology and warp drive speeds.</p>
45
+
46
+ <p>In order to configure your widgets, you will need to follow these topics:</p>
47
+ <ul>
48
+ <li><a href="p2_sample9.html">Sample 9</a></li>
49
+ <li><a href="p2_sample10.html">Sample 10</a></li>
50
+ <li><a href="p2_sample11.html">Sample 11</a></li>
51
+ </ul>
52
+ </div>
53
+ <div class="modal-footer">
54
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+
60
+ <span class="complexArrow">→</span>
61
+
62
+ <!-- Button trigger modal -->
63
+ <button type="button" class="btn btn-default btn-lg modalButton3" data-toggle="modal" data-target="#myModal3">Publish your app</button>
64
+ <!-- Modal -->
65
+ <div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
66
+ <div class="modal-dialog" role="document">
67
+ <div class="modal-content">
68
+ <div class="modal-header">
69
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
70
+ <h4 class="modal-title" id="myModalLabel">Publish your app</h4>
71
+ </div>
72
+ <div class="modal-body">
73
+ <p>After you've configured all the necessary components to build your space transformer, you need to publish your app. Of course this content is also just dummy text. Pay no particular attention to the content but rather the format and placement of the map.</p>
74
+ <p>To publish your app, see the following:
75
+ <ul>
76
+ <li><a href="p2_sample12.html">Sample 12</a></li>
77
+ <li><a href="p2_sample13.html">Sample 13</a></li>
78
+ <li><a href="p2_sample14.html">Sample 14</a></li>
79
+ </ul>
80
+ </div>
81
+ <div class="modal-footer">
82
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </div>
87
+
88
+
89
+ <div class="clearfix"></div>
90
+
91
+ </div>
@@ -0,0 +1,25 @@
1
+ {% if site.disqus_shortname %}
2
+
3
+ <div id="disqus_thread"></div>
4
+ <script>
5
+ /**
6
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
7
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
8
+ */
9
+
10
+ var disqus_config = function () {
11
+ this.page.url = "{{site.url}}/{{page.permalink}}"; // Replace PAGE_URL with your page's canonical URL variable
12
+ this.page.identifier = "{{page.permalink}}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
13
+ };
14
+
15
+ (function() { // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
16
+ var d = document, s = d.createElement('script');
17
+
18
+ s.src = 'https://{{site.disqus_shortname}}.disqus.com/embed.js'; // IMPORTANT: Replace EXAMPLE with your forum shortname!
19
+
20
+ s.setAttribute('data-timestamp', +new Date());
21
+ (d.head || d.body).appendChild(s);
22
+ })();
23
+ </script>
24
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
25
+ {% endif %}
@@ -0,0 +1,13 @@
1
+ <li>
2
+ {% if site.feedback_text %}
3
+ {% assign feedback_text = site.feedback_text %}
4
+ {% else %}
5
+ {% assign feedback_text = "Feedback" %}
6
+ {% endif %}
7
+
8
+ {% if site.feedback_link %}
9
+ <a class="email" title="Submit feedback" href="{{site.feedback_link}}">{{feedback_text}}</a>
10
+ {% else %}
11
+ <a class="email" title="Submit feedback" href="#" onclick="javascript:window.location='mailto:{{site.feedback_email}}?subject={{site.feedback_subject_line}} feedback&body=I have some feedback about the {{page.title}} page: ' + window.location.href;"><i class="fa fa-envelope-o"></i> {{feedback_text}}</a>
12
+ {% endif %}
13
+ </li>
@@ -0,0 +1,9 @@
1
+ <footer>
2
+ <div class="row">
3
+ <div class="col-lg-12 footer">
4
+ &copy;{{ site.time | date: "%Y" }} {{site.company_name}}. All rights reserved. <br />
5
+ {% if page.last_updated %}<span>Page last updated:</span> {{page.last_updated}}<br/>{% endif %} Site last generated: {{ site.time | date: "%b %-d, %Y" }} <br />
6
+ <p><img src="{{ "images/company_logo.png" }}" alt="Company logo"/></p>
7
+ </div>
8
+ </div>
9
+ </footer>
@@ -0,0 +1,6 @@
1
+ <!-- the google_analytics_id gets auto inserted from the config file -->
2
+
3
+ {% if site.google_analytics %}
4
+
5
+ <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','{{site.google_analytics}}','auto');ga('require','displayfeatures');ga('send','pageview');</script>
6
+ {% endif %}
@@ -0,0 +1,39 @@
1
+ <meta charset="utf-8">
2
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1">
4
+ <meta name="description" content="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %}">
5
+ <meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
6
+ <title>{{ page.title }} | {{ site.site_title }}</title>
7
+ <link rel="stylesheet" href="{{ "css/syntax.css" }}">
8
+
9
+ <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
10
+ <!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
11
+ <link rel="stylesheet" href="css/modern-business.css">
12
+ <!-- Latest compiled and minified CSS -->
13
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
14
+ <link rel="stylesheet" href="css/customstyles.css">
15
+ <link rel="stylesheet" href="css/boxshadowproperties.css">
16
+ <!-- most color styles are extracted out to here -->
17
+ <link rel="stylesheet" href="css/theme-blue.css">
18
+
19
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
20
+
21
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
22
+ <script src="{{ "js/jquery.navgoco.min.js" }}"></script>
23
+
24
+
25
+ <!-- Latest compiled and minified JavaScript -->
26
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
27
+ <!-- Anchor.js -->
28
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
29
+ <script src="{{ "js/toc.js" }}"></script>
30
+ <script src="{{ "js/customscripts.js" }}"></script>
31
+
32
+ <link rel="shortcut icon" href="{{ "images/favicon.ico" }}">
33
+
34
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
35
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
36
+ <!--[if lt IE 9]>
37
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
38
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
39
+ <![endif]-->
@@ -0,0 +1,28 @@
1
+ <meta charset="utf-8">
2
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1">
4
+ <meta name="description" content="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %}">
5
+ <meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
6
+ <title>{% if page.homepage == true %} {{site.homepage_title}} {% elsif page.title %}{{ page.title }}{% endif %} | {{ site.site_title }}</title>
7
+
8
+
9
+ <link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
10
+ <link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | prepend: site.baseurl | prepend: site.url }}">
11
+ <link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl | prepend: site.url }}">
12
+ <link rel="stylesheet" href="{{ "/css/modern-business.css" | prepend: site.baseurl | prepend: site.url }}">
13
+ <link rel="stylesheet" href="{{ "/css/customstyles.css" | prepend: site.baseurl | prepend: site.url }}">
14
+ <link rel="stylesheet" href="{{ "/css/theme-blue.css" | prepend: site.baseurl | prepend: site.url }}">
15
+ <link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
16
+ <link rel="stylesheet" href="{{ "/css/printstyles.css" | prepend: site.baseurl }}">
17
+
18
+ <script>
19
+ Prince.addScriptFunc("datestamp", function() {
20
+ return "PDF last generated: {{ site.time | date: '%B %d, %Y' }}";
21
+ });
22
+ </script>
23
+
24
+ <script>
25
+ Prince.addScriptFunc("guideName", function() {
26
+ return "{{site.print_title}} User Guide";
27
+ });
28
+ </script>
@@ -0,0 +1 @@
1
+ <figure>{% if {{include.url}} %}<a class="no_icon" target="_blank" href="{{include.url}}">{% endif %}<img class="docimage" src="images/{{include.file}}" alt="{{include.alt}}" {% if {{include.max-width}} %}style="max-width: {{include.max-width}}px"{% endif %} />{% if {{include.url}} %}</a>{% endif %}{% if {{include.caption}} %}<figcaption>{{include.caption}}</figcaption>{% endif %}</figure>
@@ -0,0 +1 @@
1
+ <div markdown="span" class="alert alert-warning" role="alert"><i class="fa fa-warning"></i> <b>Important:</b> {{include.content}}</div>
@@ -0,0 +1,130 @@
1
+ <script type="text/javascript">
2
+ $(document).ready(function() {
3
+ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });
4
+ });
5
+
6
+ </script>
7
+ <!-- shuffle -->
8
+ <script>
9
+ var shuffleme = (function( $ ) {
10
+ 'use strict';
11
+
12
+ var $grid = $('#grid'),
13
+ $filterOptions = $('.filter-options'),
14
+ $sizer = $grid.find('.shuffle_sizer'),
15
+
16
+ init = function() {
17
+
18
+ // None of these need to be executed synchronously
19
+ setTimeout(function() {
20
+ listen();
21
+ setupFilters();
22
+ }, 100);
23
+
24
+ // instantiate the plugin
25
+ $grid.shuffle({
26
+ itemSelector: '[class*="col-"]',
27
+ sizer: $sizer
28
+ });
29
+ },
30
+
31
+ // Set up button clicks
32
+ setupFilters = function() {
33
+ var $btns = $filterOptions.children();
34
+ $btns.on('click', function() {
35
+ var $this = $(this),
36
+ isActive = $this.hasClass( 'active' ),
37
+ group = isActive ? 'all' : $this.data('group');
38
+
39
+ // Hide current label, show current label in title
40
+ if ( !isActive ) {
41
+ $('.filter-options .active').removeClass('active');
42
+ }
43
+
44
+ $this.toggleClass('active');
45
+
46
+ // Filter elements
47
+ $grid.shuffle( 'shuffle', group );
48
+ });
49
+
50
+ $btns = null;
51
+ },
52
+
53
+ // Re layout shuffle when images load. This is only needed
54
+ // below 768 pixels because the .picture-item height is auto and therefore
55
+ // the height of the picture-item is dependent on the image
56
+ // I recommend using imagesloaded to determine when an image is loaded
57
+ // but that doesn't support IE7
58
+ listen = function() {
59
+ var debouncedLayout = $.throttle( 300, function() {
60
+ $grid.shuffle('update');
61
+ });
62
+
63
+ // Get all images inside shuffle
64
+ $grid.find('img').each(function() {
65
+ var proxyImage;
66
+
67
+ // Image already loaded
68
+ if ( this.complete && this.naturalWidth !== undefined ) {
69
+ return;
70
+ }
71
+
72
+ // If none of the checks above matched, simulate loading on detached element.
73
+ proxyImage = new Image();
74
+ $( proxyImage ).on('load', function() {
75
+ $(this).off('load');
76
+ debouncedLayout();
77
+ });
78
+
79
+ proxyImage.src = this.src;
80
+ });
81
+
82
+ // Because this method doesn't seem to be perfect.
83
+ setTimeout(function() {
84
+ debouncedLayout();
85
+ }, 500);
86
+ };
87
+
88
+ return {
89
+ init: init
90
+ };
91
+ }( jQuery ));
92
+
93
+
94
+
95
+ $(document).ready(function() {
96
+ shuffleme.init();
97
+ });
98
+
99
+ </script>
100
+
101
+ <!-- new attempt-->
102
+
103
+ <script>
104
+ $(document).ready(function() {
105
+
106
+ /* initialize shuffle plugin */
107
+ var $grid = $('#grid');
108
+
109
+ $grid.shuffle({
110
+ itemSelector: '.item' // the selector for the items in the grid
111
+ });
112
+
113
+ });</script>
114
+
115
+ <script>
116
+ $('#filter a').click(function (e) {
117
+ e.preventDefault();
118
+
119
+ // set active class
120
+ $('#filter a').removeClass('active');
121
+ $(this).addClass('active');
122
+
123
+ // get group name from clicked item
124
+ var groupName = $(this).attr('data-group');
125
+
126
+ // reshuffle grid
127
+ $grid.shuffle('shuffle', groupName );
128
+ });</script>
129
+
130
+