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 +4 -4
- data/app/assets/javascripts/leather/off_canvas.js.coffee +44 -0
- data/app/assets/javascripts/leather.js +1 -1
- data/app/assets/stylesheets/{_devise.css.scss → leather/_devise.css.scss} +4 -8
- data/app/assets/stylesheets/{_off_canvas.css.scss → leather/_off_canvas.css.scss} +33 -0
- data/app/assets/stylesheets/leather/_variables.css.scss +13 -0
- data/app/assets/stylesheets/leather.css.scss +3 -3
- data/app/views/leather/application/ui_kit.html.haml +19 -5
- data/app/views/leather/bootstrap_components/_nav_item.html.haml +1 -1
- data/lib/leather/version.rb +1 -1
- metadata +6 -6
- data/app/assets/javascripts/off_canvas.js.coffee +0 -30
- data/app/assets/stylesheets/_variables.css.scss +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43eabab4009a76849f175719778c30c2c5a3bc94
|
4
|
+
data.tar.gz: 22023eff4f4cccd72ad27f775589f35d8f1102f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
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(
|
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
|
49
|
-
background:
|
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"
|
66
|
-
= link_to "Right", "#", data: { toggle: "off-canvas", side: "right"}, class: "btn btn-primary"
|
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
|
-
|
68
|
+
.off-canvas.off-canvas-inverse.off-canvas-left
|
69
|
+
.brand
|
70
|
+
Off-Canvas Left
|
71
|
+
.close ×
|
70
72
|
.off-canvas.off-canvas-right
|
71
|
-
|
73
|
+
.brand
|
74
|
+
Off-Canvas Right
|
75
|
+
.close ×
|
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
|
2
|
+
= link_to text, href, options
|
data/lib/leather/version.rb
CHANGED
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.
|
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-
|
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;
|