leather 0.2.25 → 0.2.26

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: 714806637994d05adc0eeb9dfdac5697d3a64507
4
- data.tar.gz: 23bf11e4bd547f64d0b109036dba8cc6f8b0693b
3
+ metadata.gz: 43eabab4009a76849f175719778c30c2c5a3bc94
4
+ data.tar.gz: 22023eff4f4cccd72ad27f775589f35d8f1102f7
5
5
  SHA512:
6
- metadata.gz: f3693be45cb5a6b3db851ef0fa35f940a282c345fe8cfaf844de6de28946274497b411e805fca2b1286a29a1780134b327fdd9af1ccea0b8da72f7465573acae
7
- data.tar.gz: c1f0e9aa758163ac0e49fe131dc45879df5190e6fd5c93ffd72f8bbd2951a96985014aac96e545b1639c3d255e0d02de0d3cbc06d652b32667ec255d2def42d4
6
+ metadata.gz: a5d0b74bb6e1553ae57fdeb375aa433d2388748f594eaeffbdb57eb439d7ac01a7abc3969de5e0e77efb2b74a37a4710fa7f5fbf9dd6505aa4c3e1f76d6c4cc2
7
+ data.tar.gz: 1811276929d7855dc5c0a620b577ef06b31dcea19facb5a8c79ac479007b61c400bd6121226f8c9f957c8312e73dd0efea132cf3a2f8c03a6c8b14c053440c73
@@ -0,0 +1,44 @@
1
+ $ ->
2
+ if $(".off-canvas").length > 0
3
+ offCanvas.init()
4
+
5
+ offCanvas =
6
+ init: ->
7
+ @setupDocument()
8
+ @bindEvents()
9
+
10
+ setupDocument: ->
11
+ $('body').wrapInner("<div id='off-canvas-wrapper' />")
12
+ $(".off-canvas, .fixed").each ->
13
+ $("#off-canvas-wrapper").before(this)
14
+
15
+ bindEvents: ->
16
+ $(document).on 'click', '[data-toggle="off-canvas"]', (e) ->
17
+ if e.handled != true
18
+ e.handled = offCanvas.toggle($(this), e)
19
+
20
+ $(document).on 'click touchstart', '.off-canvas-show-left, .off-canvas-show-right', (e) ->
21
+ clicked = $(e.target)
22
+ if e.handled != true
23
+ if (!clicked.hasClass("off-canvas") && clicked.parents(".off-canvas").length == 0 && clicked.data('toggle') != "off-canvas")
24
+ e.preventDefault()
25
+ else if (clicked.data('toggle') == "off-canvas" || (clicked.parents(".off-canvas").length && clicked.hasClass("close")))
26
+ e.handled = offCanvas.close(e)
27
+
28
+ toggle: (target, e) ->
29
+ e.stopPropagation()
30
+ e.preventDefault()
31
+ side = target.data('side')
32
+ if side == "left"
33
+ $('body').removeClass "off-canvas-show-right"
34
+ if side == "right"
35
+ $('body').removeClass "off-canvas-show-left"
36
+ $('body').toggleClass("off-canvas-show-#{side}")
37
+ true
38
+
39
+ close: (e) ->
40
+ e.preventDefault()
41
+ e.stopPropagation()
42
+ $('body').removeClass("off-canvas-show-right")
43
+ $('body').removeClass("off-canvas-show-left")
44
+ true
@@ -10,4 +10,4 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require_directory .
13
+ //= require_tree .
@@ -1,8 +1,4 @@
1
- html, body {
2
- height: 100%;
3
- }
4
-
5
- .text-white { color: $white; }
1
+ .text-white { color: #ffffff; }
6
2
 
7
3
  .devise_sessions, .devise_registrations, .devise_passwords {
8
4
  &.new, &.create {
@@ -34,7 +30,7 @@ html, body {
34
30
  text-decoration: none;
35
31
  @include transition(color 0.25s linear);
36
32
  &:hover {
37
- color: darken($white, 20%);
33
+ color: darken(#ffffff, 20%);
38
34
  }
39
35
  }
40
36
  }
@@ -45,8 +41,8 @@ html, body {
45
41
  form {
46
42
  @include border-top-radius($border-radius-base);
47
43
  @include border-bottom-radius($border-radius-base);
48
- border: 1px solid $white;
49
- background: $white;
44
+ border: 1px solid #ffffff;
45
+ background: #ffffff;
50
46
  box-shadow: 1px 1px 3px $gray-dark;
51
47
  padding: 40px 40px 20px;
52
48
  border-top: 6px solid $devise-box-border-color;
@@ -8,9 +8,42 @@
8
8
  color: $off-canvas-color;
9
9
  &.off-canvas-right {
10
10
  right: -$off-canvas-width;
11
+ border-left: 1px solid $off-canvas-border;
11
12
  }
12
13
  &.off-canvas-left {
13
14
  left: -$off-canvas-width;
15
+ border-right: 1px solid $off-canvas-border;
16
+ }
17
+ &.off-canvas-inverse {
18
+ background: $off-canvas-inverse-bg;
19
+ color: $off-canvas-inverse-color;
20
+ &.off-canvas-right {
21
+ border-color: $off-canvas-inverse-border;
22
+ }
23
+ &.off-canvas-left {
24
+ border-color: $off-canvas-inverse-border;
25
+ }
26
+
27
+ .brand {
28
+ color: $off-canvas-inverse-brand-color;
29
+ }
30
+
31
+ .close {
32
+ color: $off-canvas-inverse-brand-color;
33
+ opacity: 0.8;
34
+ }
35
+ }
36
+
37
+ .brand {
38
+ padding: 15px;
39
+ font-size: 18px;
40
+ line-height: 20px;
41
+ color: $navbar-default-brand-color;
42
+
43
+ .close {
44
+ position: relative;
45
+ top: -3px;
46
+ }
14
47
  }
15
48
  }
16
49
 
@@ -0,0 +1,13 @@
1
+ $devise-bg-gradient-start: #355069 !default;
2
+ $devise-bg-gradient-end: #5E7A9B !default;
3
+ $devise-box-border-color: #6ED5E4 !default;
4
+
5
+ $off-canvas-width: 300px !default;
6
+ $off-canvas-bg-color: $navbar-default-bg !default;
7
+ $off-canvas-border: $navbar-default-border !default;
8
+ $off-canvas-color: #333333 !default;
9
+
10
+ $off-canvas-inverse-bg: $navbar-inverse-bg !default;
11
+ $off-canvas-inverse-color: $navbar-inverse-link-hover-color !default;
12
+ $off-canvas-inverse-border: $navbar-inverse-border !default;
13
+ $off-canvas-inverse-brand-color: $navbar-inverse-link-hover-color !default;
@@ -1,3 +1,3 @@
1
- @import "variables.css.scss";
2
- @import "devise";
3
- @import "off_canvas";
1
+ @import "leather/variables.css.scss";
2
+ @import "leather/devise";
3
+ @import "leather/off_canvas";
@@ -62,13 +62,17 @@
62
62
 
63
63
  .container
64
64
  %h1.page-header Off-Canvas Menus
65
- = link_to "Left", "#", data: { toggle: "off-canvas", side: "left"}, class: "btn btn-primary", style: "z-index: 9005;"
66
- = link_to "Right", "#", data: { toggle: "off-canvas", side: "right"}, class: "btn btn-primary", style: "z-index: 9005;"
65
+ = link_to "Left", "#", data: { toggle: "off-canvas", side: "left"}, class: "btn btn-primary"
66
+ = link_to "Right", "#", data: { toggle: "off-canvas", side: "right"}, class: "btn btn-primary"
67
67
 
68
- .off-canvas.off-canvas-left
69
- TEST
68
+ .off-canvas.off-canvas-inverse.off-canvas-left
69
+ .brand
70
+ Off-Canvas Left
71
+ .close &times;
70
72
  .off-canvas.off-canvas-right
71
- TEST
73
+ .brand
74
+ Off-Canvas Right
75
+ .close &times;
72
76
 
73
77
  %h1.page-header Typography
74
78
  %h3 Headings
@@ -136,6 +140,16 @@
136
140
  %button.btn.btn-danger{type: "button"} Danger
137
141
  / Deemphasize a button by making it look like a link while maintaining button behavior
138
142
  %button.btn.btn-link{type: "button"} Link
143
+
144
+ %hr
145
+
146
+ .row
147
+ .col-md-12
148
+ %button.btn.btn-default.btn-lg{type: "button"} Large
149
+ %button.btn.btn-default{type: "button"} Default
150
+ %button.btn.btn-default.btn-sm{type: "button"} Small
151
+ %button.btn.btn-default.btn-xs{type: "button"} Extra Small
152
+
139
153
  %h1.page-header Tables
140
154
  %h3 Basic Table
141
155
  = render 'table', table_class: ""
@@ -1,2 +1,2 @@
1
1
  %li{ class: active_class(href, options) }
2
- =link_to text, href#, options
2
+ = link_to text, href, options
@@ -1,3 +1,3 @@
1
1
  module Leather
2
- VERSION = "0.2.25"
2
+ VERSION = "0.2.26"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Van Der Beek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -146,11 +146,11 @@ files:
146
146
  - MIT-LICENSE
147
147
  - Rakefile
148
148
  - app/assets/javascripts/leather.js
149
- - app/assets/javascripts/off_canvas.js.coffee
150
- - app/assets/stylesheets/_devise.css.scss
151
- - app/assets/stylesheets/_off_canvas.css.scss
152
- - app/assets/stylesheets/_variables.css.scss
149
+ - app/assets/javascripts/leather/off_canvas.js.coffee
153
150
  - app/assets/stylesheets/leather.css.scss
151
+ - app/assets/stylesheets/leather/_devise.css.scss
152
+ - app/assets/stylesheets/leather/_off_canvas.css.scss
153
+ - app/assets/stylesheets/leather/_variables.css.scss
154
154
  - app/controllers/leather/application_controller.rb
155
155
  - app/helpers/leather/application_helper.rb
156
156
  - app/views/leather/application/_table.html.haml
@@ -1,30 +0,0 @@
1
- $ ->
2
- if $(".off-canvas").length > 0
3
- console.log "setting up off-canvas"
4
-
5
- $('body').wrapInner("<div id='off-canvas-wrapper' />")
6
-
7
- $(".off-canvas, .fixed").each ->
8
- $("#off-canvas-wrapper").before(this)
9
-
10
- $(document).on 'click', '[data-toggle="off-canvas"]', (e) ->
11
- e.stopPropagation()
12
- e.preventDefault()
13
- if e.handled != true
14
- side = $(this).data('side')
15
- if side == "left"
16
- $('body').removeClass "off-canvas-show-right"
17
- if side == "right"
18
- $('body').removeClass "off-canvas-show-left"
19
- $('body').toggleClass("off-canvas-show-#{side}")
20
- e.handled = true
21
- else
22
- false
23
-
24
- $(document).on 'click touchstart', '.off-canvas-show-left, .off-canvas-show-right', (e) ->
25
- if e.handled != true
26
- e.preventDefault()
27
- unless ($(e.target).hasClass("off-canvas") || $(e.target).data('toggle') == "off-canvas")
28
- $(this).removeClass("off-canvas-show-right")
29
- $(this).removeClass("off-canvas-show-left")
30
- e.handled = true
@@ -1,9 +0,0 @@
1
- $white: #ffffff !default;
2
-
3
- $devise-bg-gradient-start: #355069 !default;
4
- $devise-bg-gradient-end: #5E7A9B !default;
5
- $devise-box-border-color: #6ED5E4 !default;
6
-
7
- $off-canvas-width: 300px !default;
8
- $off-canvas-bg-color: #f1f1f1 !default;
9
- $off-canvas-color: #333333 !default;