active_frontend 16.0.6 → 16.0.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
  SHA256:
3
- metadata.gz: 9edbf075f8202da815467f017a6ce340a5f589444fe923b8bc30d1eca13d0313
4
- data.tar.gz: bf70ed31c22ae9bbfc47934c4755cd6e03a7fae8a3f147a6ea7998b7164cb21d
3
+ metadata.gz: 10c489457f0d4a18c08e1cc570088d89e5559054f03067279717d4e5e98d6c37
4
+ data.tar.gz: bcaab69f11ebb02723242f89155bf30a602d1109ef758875db3d70cb16e841eb
5
5
  SHA512:
6
- metadata.gz: 72ad3ed4f19dc198ecbff63fbc770c26af89b9aec573d4b8ea5965b14e47be20a0b7937ce33a8415093f817b8de03c78422af1c4d22664998be14145a17fc6ba
7
- data.tar.gz: 7f7f06dddd46317a339fdcfb0021a1e572346203245ae03f3dc2835e922fdae5f917faf0652cdebceb3b947cb0837e90ad27bd9a38091a84d6bcc8c0cb328d6f
6
+ metadata.gz: ea805c0280eb3f84e326a99a487608db02db087fad5b010b5c8afcd6623107245077c5cc4c93537a112fa2731fa22f83ab6330d6710da4bcf77aeb6f5084eb84
7
+ data.tar.gz: 3300595d13208483e9f9fbfdf194e29a7b0d78c380ab01f62d5b6bb81c050e098360dbcb7a6418dbbc5d94b29ddeae859d253fe375cf704151be172bb3275646
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveFrontend
4
- VERSION ||= '16.0.6'
4
+ VERSION ||= '16.0.7'
5
5
  end
@@ -6,23 +6,26 @@
6
6
 
7
7
  var Header = function (element, options) {
8
8
  this.$element = $(element);
9
- this.$window = $(window);
10
9
  this.settings = {
11
10
  addClass: this.$element.data('add-class') || Header.DEFAULTS.addClass,
11
+ container: this.$element.data('container') || Header.DEFAULTS.container,
12
12
  offset: this.$element.data('offset') || Header.DEFAULTS.offset,
13
13
  removeClass: this.$element.data('remove-class') || Header.DEFAULTS.removeClass
14
14
  };
15
15
  this.options = $.extend({}, Header.DEFAULTS, this.settings, options);
16
16
 
17
+ this.$window = $(this.options.container);
18
+
17
19
  this.init();
18
20
  };
19
21
 
20
22
  Header.VERSION = '1.0.0';
21
23
  Header.DEFAULTS = {
22
24
  addClass: '',
23
- offset: 10,
25
+ container: window,
26
+ offset: 50,
24
27
  onSwapClassCallback: function () {},
25
- removeClass: 'background-color-transparent border-color-bottom-transparent'
28
+ removeClass: ''
26
29
  };
27
30
 
28
31
  Header.prototype.constructor = Header;
@@ -40,7 +43,8 @@
40
43
  .removeClass(removeClass)
41
44
  .addClass(addClass);
42
45
 
43
- this.options.onSwapClassCallback();
46
+ this.options
47
+ .onSwapClassCallback();
44
48
  };
45
49
 
46
50
  Header.prototype.toggleClasses = function () {
@@ -97,6 +97,11 @@
97
97
  border-color: darker-color(primary);
98
98
  color: text-color-on(primary);
99
99
  }
100
+ .transparent {
101
+ background: color(transparent);
102
+ border-color: color(transparent);
103
+ color: color(white);
104
+ }
100
105
  .light,
101
106
  .white {
102
107
  border-color: color(haze);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.0.6
4
+ version: 16.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-01 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails