leather 0.2.16 → 0.2.17

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: 29b987d25a95c6bc90280876aaf504bd5eb66691
4
- data.tar.gz: 4ff343ff83ff1206eeb7a5d6cf661931b25d06c8
3
+ metadata.gz: 58cad7035870c45d051ae556dc1139a7f1e978df
4
+ data.tar.gz: d13ace0cecbb7d9a1eddab67ac10b9d713591d39
5
5
  SHA512:
6
- metadata.gz: 286731579f7b0df2e71b829a9bb5fe4cf67f4db8be6a9f49e9dd590f6b22bb13f3aecd5f69d8358dd94b400af35321c06c33e5e98bc71b65fe6516ac5fff9612
7
- data.tar.gz: bca0821446a8fda5adb3cc31ba0d64b0b65ce7e475b38fe9d436e598d5de64f0c8c282c7b373f8682385d9d095f3ad78b1d17709f6ba543c613fe5eec9e27af7
6
+ metadata.gz: 4daed41a567eb83fc5723a6c2edf38bfdc174d269bf1451f6757234a6d6ac3281741fff11e536a8b7c5a77463ade3b873104428e68778d825025f8c59d8c5ca0
7
+ data.tar.gz: 2b05175f0701ac81ba4a9a7562840da1695304b168000e4bc10fce5909b7dec01af0d29a3b9d1efde55c16327184dc214a2dfa6fde92f3f31fc853c4b49edc45
@@ -13,6 +13,8 @@ module Leather
13
13
  def copy_ui_kit_styles
14
14
  copy_file("bootstrap_variables.css.scss", Rails.root.join("app", "assets", "stylesheets", "bootstrap_variables.css.scss"))
15
15
  copy_file("_devise.css.scss", Rails.root.join("app", "assets", "stylesheets", "_devise.css.scss"))
16
+ copy_file("_off_canvas.css.scss", Rails.root.join("app", "assets", "stylesheets", "_off_canvas.css.scss"))
17
+ copy_file("off_canvas.js.coffee", Rails.root.join("app", "assets", "javascripts", "off_canvas.js.coffee"))
16
18
  end
17
19
 
18
20
  def copy_high_voltage_config
@@ -1,3 +1,3 @@
1
1
  module Leather
2
- VERSION = "0.2.16"
2
+ VERSION = "0.2.17"
3
3
  end
@@ -0,0 +1,37 @@
1
+ $off-canvas-width: 300px;
2
+ $off-canvas-bg-color: #f1f1f1;
3
+ $off-canvas-color: #333;
4
+
5
+ .off-canvas {
6
+ position: fixed;
7
+ top: 0;
8
+ bottom: 0;
9
+ z-index: 10000;
10
+ width: $off-canvas-width;
11
+ background: $off-canvas-bg-color;
12
+ color: $off-canvas-color;
13
+ &.off-canvas-right {
14
+ right: -$off-canvas-width;
15
+ }
16
+ &.off-canvas-left {
17
+ left: -$off-canvas-width;
18
+ }
19
+ }
20
+
21
+ .off-canvas-show-right {
22
+ position: relative;
23
+ right: $off-canvas-width;
24
+ overflow: hidden;
25
+ .off-canvas-right {
26
+ right: 0;
27
+ }
28
+ }
29
+
30
+ .off-canvas-show-left {
31
+ position: relative;
32
+ left: $off-canvas-width;
33
+ overflow: hidden;
34
+ .off-canvas-left {
35
+ left: 0;
36
+ }
37
+ }
@@ -1,3 +1,4 @@
1
1
  HighVoltage.configure do |config|
2
2
  config.home_page = 'home'
3
+ config.route_drawer = HighVoltage::RouteDrawers::Root
3
4
  end
@@ -0,0 +1,13 @@
1
+ $ ->
2
+ $(document).on 'click', '[data-toggle="off-canvas"]', ->
3
+ side = $(this).data('side')
4
+ if side == "left"
5
+ $('body').removeClass "off-canvas-show-right"
6
+ if side == "right"
7
+ $('body').removeClass "off-canvas-show-left"
8
+ $('body').toggleClass("off-canvas-show-#{side}")
9
+
10
+ $('body').click (e) ->
11
+ unless ($(e.target).hasClass("off-canvas") || $(e.target).data('toggle') == "off-canvas")
12
+ $(this).removeClass("off-canvas-show-right")
13
+ $(this).removeClass("off-canvas-show-left")
@@ -44,6 +44,14 @@
44
44
  %li.divider
45
45
  = nav_item 'Separated link', '#'
46
46
 
47
+ .container
48
+ = link_to "Left", "#", data: { toggle: "off-canvas", side: "left"}, class: "btn btn-primary"
49
+ .off-canvas.off-canvas-left
50
+ TEST
51
+ = link_to "Right", "#", data: { toggle: "off-canvas", side: "right"}, class: "btn btn-primary"
52
+ .off-canvas.off-canvas-right
53
+ TEST
54
+
47
55
  .jumbotron
48
56
  .container
49
57
  %h1 Hello, world!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Van Der Beek
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: coffee-rails
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description: Bootstrap tools - UI Kit, Devise Views, and Component Partials
126
140
  email:
127
141
  - earlynovrock@gmail.com
@@ -148,8 +162,10 @@ files:
148
162
  - lib/leather/version.rb
149
163
  - lib/tasks/leather_tasks.rake
150
164
  - templates/_devise.css.scss
165
+ - templates/_off_canvas.css.scss
151
166
  - templates/bootstrap_variables.css.scss
152
167
  - templates/high_voltage.rb
168
+ - templates/off_canvas.js.coffee
153
169
  - templates/views/devise/passwords/edit.html.erb
154
170
  - templates/views/devise/passwords/new.html.erb
155
171
  - templates/views/devise/registrations/new.html.erb