corn_starch 1.9.6 → 1.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5ed4769cf43ec617b4ba6fa2fa00f5674934aad
4
- data.tar.gz: 0056a13a477d121b30a03414de479cfad487bb55
3
+ metadata.gz: 12e0cf5fdc9d3a09f9ea072e0f174d024a2dd823
4
+ data.tar.gz: 3b2d2ad90904f67e0f62f66c2d039c9fae83cc23
5
5
  SHA512:
6
- metadata.gz: 098ac7b9648b09b57f4c339fbaee249ebee3dd12fa2e39e71dd48ad8ea1ac3987d2e9f0ebe5f3cd7ce999c792691a93fd2a2435a12a445e30369cfad98f323ad
7
- data.tar.gz: 9d5a160ccb12907e06017a98fea3afa887be6f7f6ba6a695d62d83dadb01d5bd357e0d50c266253752812c44f4734cab048661aa15db88f0c476466d8bc9498a
6
+ metadata.gz: 05baaf9f2371f6287ba55d52fd0cdcd90a4ac2637cbba8930b7ec7e4731c53e0e756d1d3de147af156879295b7d82dc07fdff1cc857737599109f87282770ed7
7
+ data.tar.gz: 9cc9fa58d17bee3540b07e4a3c7ab626b2d7a20995ff3205b93e070d2ef3def57f720e958e1b2f6bb2ac665c1dd552067e89cc9a26259cac0fbee84329cf61f2
@@ -1,3 +1,3 @@
1
1
  module CornStarch
2
- VERSION = '1.9.6'
2
+ VERSION = '1.9.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_starch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.6
4
+ version: 1.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse
@@ -51,20 +51,15 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - app/assets/javascripts/corn_starch/application.js
54
- - app/assets/javascripts/corn_starch/carousel.js.coffee
55
54
  - app/assets/javascripts/corn_starch/infiniscroll.js.coffee
56
55
  - app/assets/javascripts/corn_starch/modal.js.coffee
57
56
  - app/assets/javascripts/corn_starch/notifications.js.coffee
58
- - app/assets/stylesheets/corn_starch/application.css
59
- - app/assets/stylesheets/corn_starch/carousel.css
60
57
  - app/controllers/corn_starch/corn_starch_controller.rb
61
58
  - app/controllers/corn_starch/sessions_controller.rb
62
- - app/helpers/corn_starch/carousel_helper.rb
63
59
  - app/helpers/corn_starch/corn_starch_helper.rb
64
60
  - app/helpers/corn_starch/gravatar_helper.rb
65
61
  - app/helpers/corn_starch/infiniscroll_helper.rb
66
62
  - app/helpers/corn_starch/modal_helper.rb
67
- - app/views/corn_starch/layouts/_carousel.html.erb
68
63
  - app/views/corn_starch/layouts/_modal.html.erb
69
64
  - app/views/corn_starch/layouts/_notifications.html.erb
70
65
  - app/views/corn_starch/layouts/_pagination.html.erb
@@ -1,55 +0,0 @@
1
- # CornStarch
2
- # by Eresse <eresse@eresse.net>
3
-
4
- # Carousel JS
5
-
6
- # Init Carousel
7
- window.carousel_init = (id, extent) ->
8
-
9
- # Acquire Carousel
10
- box = document.querySelector "##{id}"
11
-
12
- # Acquire Actions & Items
13
- next = box.querySelector '.next'
14
- prev = box.querySelector '.prev'
15
- items = box.querySelectorAll '.carousel-content li'
16
- items = [].slice.call items
17
-
18
- # Init Params
19
- current_idx = 0
20
- amount = items.length
21
- extended = items.slice current_idx, extent
22
-
23
- # Set Active
24
- box.classList.add 'active'
25
-
26
- # Navigate
27
- navigate = (dir) ->
28
-
29
- # Re-Acquire Items
30
- items = box.querySelectorAll '.carousel-content li'
31
- items = [].slice.call items
32
- amount = items.length
33
- current_idx = 0 if current_idx > amount
34
- extended = items.slice current_idx, extent
35
-
36
- # Drop Flag
37
- e.classList.remove 'current' for e in extended
38
-
39
- # Update Position
40
- current_idx = current_idx + dir
41
- current_idx = amount - 1 if dir == -1 && current_idx < 0
42
- current_idx = 0 if dir == 1 && !items[current_idx]
43
- current = items[current_idx]
44
- extended = items.slice current_idx, extent
45
- extended.concat items.slice(0, extent - amount) if extent > amount
46
-
47
- # Flag Elements
48
- e.classList.add 'current' for e in extended
49
-
50
- # Actions
51
- next.click -> navigate 1
52
- prev.click -> navigate -1
53
-
54
- # Initial Nav
55
- navigate 0
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,56 +0,0 @@
1
- /* CornStarch
2
- * by Eresse <eresse@eresse.net>
3
- */
4
-
5
- /* Carousel CSS
6
- */
7
-
8
- .carousel {
9
- width: 100px;
10
- position: relative;
11
- margin: 1em;
12
- border: 1px solid #ccc;
13
- box-shadow: 2px 2px 10px #ccc;
14
- overflow: hidden;
15
- }
16
- .carousel-content {
17
- margin: 0;
18
- padding: 0;
19
- }
20
- .carousel-content li {
21
- margin: 0;
22
- padding: 0;
23
- width: 100%;
24
- list-style: none;
25
- text-align: center;
26
- }
27
-
28
- .carousel.active {
29
- height: 130px;
30
- }
31
- .carousel.active li {
32
- position: absolute;
33
- top: 200px;
34
- }
35
- .carousel.active li.current {
36
- top: 30px;
37
- }
38
-
39
- .carousel.active .carousel-buttons {
40
- padding: 5px 0;
41
- background: #eee;
42
- text-align: center;
43
- z-index: 10;
44
- position: relative;
45
- }
46
- .carousel-buttons button {
47
- border: none;
48
- display: none;
49
- }
50
- .carousel.active .carousel-buttons button {
51
- display: block;
52
- }
53
- .carousel-buttons .offscreen {
54
- position: absolute;
55
- left: -2000px;
56
- }
@@ -1,22 +0,0 @@
1
- # CornStarch
2
- # by Eresse <eresse@eresse.net>
3
-
4
- # CornStarch Module
5
- module CornStarch
6
-
7
- # Carousel Helper
8
- module CarouselHelper
9
-
10
- # Carousel Tag
11
- def carousel_tag params
12
- render layout: 'corn_starch/layouts/carousel', locals: { carousel: params } do
13
- yield params if block_given?
14
- end
15
- end
16
-
17
- # Carousel Name
18
- def carousel_name name
19
- "carousel-#{name}"
20
- end
21
- end
22
- end
@@ -1,21 +0,0 @@
1
- <%# Carousel %>
2
- <%= div_tag class: :carousel, id: carousel_name(carousel[:name]) do %>
3
-
4
- <%# Navigation Buttons %>
5
- <div class='carousel-buttons'>
6
- <button type='button' class='prev'><span class='offscreen'> ◀ </span></button>
7
- <button type='button' class='next'><span class='offscreen'> ▶ </span></button>
8
- </div>
9
-
10
- <%# Elements %>
11
- <%= ol_tag class: 'carousel-content' do %>
12
- <% carousel[:elements].each do |e| %>
13
- <%= li_tag do %>
14
- <%= image_tag e[:url] %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
18
- <% end %>
19
-
20
- <%# Carousel JS %>
21
- <script>carousel_init('<%= carousel_name carousel[:name] %>', <%= carousel[:extent] %>);</script>