sidr-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Jesper Josefsson
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Sidr for Rails
2
+
3
+ Wraps the Sidr javascript lib for the Rails' Asset Pipeline.
4
+
5
+ All the swag for this awesome lib goes out to [Alberto Varela][1].
6
+
7
+ All I did was package for ease of use.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'sidr-rails'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install sidr-rails
22
+
23
+ ## Usage
24
+
25
+ Add the javascript to your javascript manifest:
26
+
27
+ //= require jquery.sidr
28
+
29
+ Optionally add one of the included stylesheets to your CSS manifest:
30
+
31
+ *= require jquery.sidr.light
32
+ *= require jquery.sidr.dark
33
+
34
+ That's all.
35
+
36
+ ## Contributing
37
+
38
+ 1. Fork it
39
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
40
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
41
+ 4. Push to the branch (`git push origin my-new-feature`)
42
+ 5. Create new Pull Request
43
+
44
+
45
+ [1]:http://www.berriart.com/sidr/
data/lib/sidr-rails.rb ADDED
@@ -0,0 +1,6 @@
1
+ module Sidr
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
data/lib/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Sidr
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,260 @@
1
+ /*
2
+ * Sidr
3
+ * https://github.com/artberri/sidr
4
+ *
5
+ * Copyright (c) 2013 Alberto Varela
6
+ * Licensed under the MIT license.
7
+ */
8
+
9
+ ;(function( $ ){
10
+
11
+ var sidrMoving = false,
12
+ sidrOpened = false;
13
+
14
+ // Private methods
15
+ var privateMethods = {
16
+ // Check for valids urls
17
+ // From : http://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-an-url
18
+ isUrl: function (str) {
19
+ var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
20
+ '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
21
+ '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
22
+ '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
23
+ '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
24
+ '(\\#[-a-z\\d_]*)?$','i'); // fragment locator
25
+ if(!pattern.test(str)) {
26
+ return false;
27
+ } else {
28
+ return true;
29
+ }
30
+ },
31
+ // Loads the content into the menu bar
32
+ loadContent: function($menu, content) {
33
+ $menu.html(content);
34
+ },
35
+ // Add sidr prefixes
36
+ addPrefix: function($element) {
37
+ var elementId = $element.attr('id'),
38
+ elementClass = $element.attr('class');
39
+
40
+ if(typeof elementId === 'string' && '' !== elementId) {
41
+ $element.attr('id', elementId.replace(/([A-Za-z0-9_.\-]+)/g, 'sidr-id-$1'));
42
+ }
43
+ if(typeof elementClass === 'string' && '' !== elementClass && 'sidr-inner' !== elementClass) {
44
+ $element.attr('class', elementClass.replace(/([A-Za-z0-9_.\-]+)/g, 'sidr-class-$1'));
45
+ }
46
+ $element.removeAttr('style');
47
+ },
48
+ execute: function(action, name, callback) {
49
+ // Check arguments
50
+ if(typeof name === 'function') {
51
+ callback = name;
52
+ name = 'sidr';
53
+ }
54
+ else if(!name) {
55
+ name = 'sidr';
56
+ }
57
+
58
+ // Declaring
59
+ var $menu = $('#' + name),
60
+ $body = $($menu.data('body')),
61
+ $html = $('html'),
62
+ menuWidth = $menu.outerWidth(true),
63
+ speed = $menu.data('speed'),
64
+ side = $menu.data('side'),
65
+ bodyAnimation,
66
+ menuAnimation,
67
+ scrollTop;
68
+
69
+ // Open Sidr
70
+ if('open' === action || ('toogle' === action && !$menu.is(':visible'))) {
71
+ // Check if we can open it
72
+ if( $menu.is(':visible') || sidrMoving ) {
73
+ return;
74
+ }
75
+
76
+ // If another menu opened close first
77
+ if(sidrOpened !== false) {
78
+ methods.close(sidrOpened, function() {
79
+ methods.open(name);
80
+ });
81
+
82
+ return;
83
+ }
84
+
85
+ // Lock sidr
86
+ sidrMoving = true;
87
+
88
+ // Left or right?
89
+ if(side === 'left') {
90
+ bodyAnimation = {left: menuWidth + 'px'};
91
+ menuAnimation = {left: '0px'};
92
+ }
93
+ else {
94
+ bodyAnimation = {right: menuWidth + 'px'};
95
+ menuAnimation = {right: '0px'};
96
+ }
97
+
98
+ // Prepare page
99
+ scrollTop = $html.scrollTop();
100
+ $html.css('overflow-x', 'hidden').scrollTop(scrollTop);
101
+
102
+ // Open menu
103
+ $body.css({
104
+ width: $body.width(),
105
+ position: 'absolute'
106
+ }).animate(bodyAnimation, speed);
107
+ $menu.css('display', 'block').animate(menuAnimation, speed, function() {
108
+ sidrMoving = false;
109
+ sidrOpened = name;
110
+ // Callback
111
+ if(typeof callback === 'function') {
112
+ callback(name);
113
+ }
114
+ });
115
+ }
116
+ // Close Sidr
117
+ else {
118
+ // Check if we can close it
119
+ if( !$menu.is(':visible') || sidrMoving ) {
120
+ return;
121
+ }
122
+
123
+ // Lock sidr
124
+ sidrMoving = true;
125
+
126
+ // Right or left menu?
127
+ if(side === 'left') {
128
+ bodyAnimation = {left: 0};
129
+ menuAnimation = {left: '-' + menuWidth + 'px'};
130
+ }
131
+ else {
132
+ bodyAnimation = {right: 0};
133
+ menuAnimation = {right: '-' + menuWidth + 'px'};
134
+ }
135
+
136
+ // Close menu
137
+ scrollTop = $html.scrollTop();
138
+ $html.removeAttr('style').scrollTop(scrollTop);
139
+ $body.animate(bodyAnimation, speed);
140
+ $menu.animate(menuAnimation, speed, function() {
141
+ $menu.removeAttr('style');
142
+ $body.removeAttr('style');
143
+ $('html').removeAttr('style');
144
+ sidrMoving = false;
145
+ sidrOpened = false;
146
+ // Callback
147
+ if(typeof callback === 'function') {
148
+ callback(name);
149
+ }
150
+ });
151
+ }
152
+ }
153
+ };
154
+
155
+ // Sidr public methods
156
+ var methods = {
157
+ open: function(name, callback) {
158
+ privateMethods.execute('open', name, callback);
159
+ },
160
+ close: function(name, callback) {
161
+ privateMethods.execute('close', name, callback);
162
+ },
163
+ toogle: function(name, callback) {
164
+ privateMethods.execute('toogle', name, callback);
165
+ }
166
+ };
167
+
168
+ $.sidr = function( method ) {
169
+
170
+ if ( methods[method] ) {
171
+ return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
172
+ } else if ( typeof method === 'function' || typeof method === 'string' || ! method ) {
173
+ return methods.toogle.apply( this, arguments );
174
+ } else {
175
+ $.error( 'Method ' + method + ' does not exist on jQuery.sidr' );
176
+ }
177
+
178
+ };
179
+
180
+ $.fn.sidr = function( options ) {
181
+
182
+ var settings = $.extend( {
183
+ name : 'sidr', // Name for the 'sidr'
184
+ speed : 200, // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds)
185
+ side : 'left', // Accepts 'left' or 'right'
186
+ source : null, // Override the source of the content.
187
+ renaming : true, // The ids and classes will be prepended with a prefix when loading existent content
188
+ body : 'body' // Page container selector,
189
+ }, options);
190
+
191
+ var name = settings.name,
192
+ $sideMenu = $('#' + name);
193
+
194
+ // If the side menu do not exist create it
195
+ if( $sideMenu.length === 0 ) {
196
+ $sideMenu = $('<div />')
197
+ .attr('id', name)
198
+ .appendTo($('body'));
199
+ }
200
+
201
+ // Adding styles and options
202
+ $sideMenu
203
+ .addClass('sidr')
204
+ .addClass(settings.side)
205
+ .data({
206
+ speed : settings.speed,
207
+ side : settings.side,
208
+ body : settings.body
209
+ });
210
+
211
+ // The menu content
212
+ if(typeof settings.source === 'function') {
213
+ var newContent = settings.source(name);
214
+ privateMethods.loadContent($sideMenu, newContent);
215
+ }
216
+ else if(typeof settings.source === 'string' && privateMethods.isUrl(settings.source)) {
217
+ $.get(settings.source, function(data) {
218
+ privateMethods.loadContent($sideMenu, data);
219
+ });
220
+ }
221
+ else if(typeof settings.source === 'string') {
222
+ var htmlContent = '',
223
+ selectors = settings.source.split(',');
224
+
225
+ $.each(selectors, function(index, element) {
226
+ htmlContent += '<div class="sidr-inner">' + $(element).html() + '</div>';
227
+ });
228
+
229
+ // Renaming ids and classes
230
+ if(settings.renaming) {
231
+ var $htmlContent = $('<div />').html(htmlContent);
232
+ $htmlContent.find('*').each(function(index, element) {
233
+ var $element = $(element);
234
+ privateMethods.addPrefix($element);
235
+ });
236
+ htmlContent = $htmlContent.html();
237
+ }
238
+ privateMethods.loadContent($sideMenu, htmlContent);
239
+ }
240
+ else if(settings.source !== null) {
241
+ $.error('Invalid Sidr Source');
242
+ }
243
+
244
+ return this.each(function(){
245
+
246
+ var $this = $(this),
247
+ data = $this.data('sidr');
248
+
249
+ // If the plugin hasn't been initialized yet
250
+ if ( ! data ) {
251
+ $this.data('sidr', name);
252
+ $this.click(function(e) {
253
+ e.preventDefault();
254
+ methods.toogle(name);
255
+ });
256
+ }
257
+ });
258
+ };
259
+
260
+ })( jQuery );
@@ -0,0 +1,190 @@
1
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\000033}}
2
+ .sidr {
3
+ /* Default Settings */
4
+ display: none;
5
+ position: absolute;
6
+ position: fixed;
7
+ top: 0;
8
+ height: 100%;
9
+ z-index: 999999;
10
+ width: 260px;
11
+ overflow-x: none;
12
+ overflow-y: auto;
13
+ /* Theme Settings */
14
+ font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
15
+ font-size: 15px;
16
+ background: #333333;
17
+ color: white;
18
+ -webkit-box-shadow: inset 0 0 5px 5px #222222;
19
+ -moz-box-shadow: inset 0 0 5px 5px #222222;
20
+ box-shadow: inset 0 0 5px 5px #222222;
21
+ }
22
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000315}}
23
+ .sidr .sidr-inner {
24
+ padding: 0 0 15px;
25
+ }
26
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000318}}
27
+ .sidr .sidr-inner > p {
28
+ margin-left: 15px;
29
+ margin-right: 15px;
30
+ }
31
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000324}}
32
+ .sidr.right {
33
+ left: auto;
34
+ right: -260px;
35
+ }
36
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000329}}
37
+ .sidr.left {
38
+ left: -260px;
39
+ right: auto;
40
+ }
41
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000341}}
42
+ .sidr h1, .sidr h2, .sidr h3, .sidr h4, .sidr h5, .sidr h6 {
43
+ font-size: 11px;
44
+ font-weight: normal;
45
+ padding: 0 15px;
46
+ margin: 0 0 5px;
47
+ color: white;
48
+ line-height: 24px;
49
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(100%, #1a1a1a));
50
+ background-image: -webkit-linear-gradient(#4d4d4d, #1a1a1a);
51
+ background-image: -moz-linear-gradient(#4d4d4d, #1a1a1a);
52
+ background-image: -o-linear-gradient(#4d4d4d, #1a1a1a);
53
+ background-image: linear-gradient(#4d4d4d, #1a1a1a);
54
+ -webkit-box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
55
+ -moz-box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
56
+ box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
57
+ }
58
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000352}}
59
+ .sidr p {
60
+ font-size: 13px;
61
+ margin: 0 0 12px;
62
+ }
63
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000355}}
64
+ .sidr p a {
65
+ color: rgba(255, 255, 255, 0.9);
66
+ }
67
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000360}}
68
+ .sidr > p {
69
+ margin-left: 15px;
70
+ margin-right: 15px;
71
+ }
72
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000365}}
73
+ .sidr ul {
74
+ display: block;
75
+ margin: 0 0 15px;
76
+ padding: 0;
77
+ border-top: 1px solid #1a1a1a;
78
+ border-bottom: 1px solid #4d4d4d;
79
+ }
80
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000372}}
81
+ .sidr ul li {
82
+ display: block;
83
+ margin: 0;
84
+ line-height: 48px;
85
+ border-top: 1px solid #4d4d4d;
86
+ border-bottom: 1px solid #1a1a1a;
87
+ }
88
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000381}}
89
+ .sidr ul li:hover, .sidr ul li.active, .sidr ul li.sidr-class-active {
90
+ border-top: none;
91
+ line-height: 49px;
92
+ }
93
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000385}}
94
+ .sidr ul li:hover > a, .sidr ul li:hover > span, .sidr ul li.active > a, .sidr ul li.active > span, .sidr ul li.sidr-class-active > a, .sidr ul li.sidr-class-active > span {
95
+ -webkit-box-shadow: inset 0 0 15px 3px #222222;
96
+ -moz-box-shadow: inset 0 0 15px 3px #222222;
97
+ box-shadow: inset 0 0 15px 3px #222222;
98
+ }
99
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000390}}
100
+ .sidr ul li a, .sidr ul li span {
101
+ padding: 0 15px;
102
+ display: block;
103
+ text-decoration: none;
104
+ color: white;
105
+ }
106
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000397}}
107
+ .sidr ul li ul {
108
+ border-bottom: none;
109
+ margin: 0;
110
+ }
111
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003100}}
112
+ .sidr ul li ul li {
113
+ line-height: 40px;
114
+ font-size: 13px;
115
+ }
116
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003104}}
117
+ .sidr ul li ul li:last-child {
118
+ border-bottom: none;
119
+ }
120
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003110}}
121
+ .sidr ul li ul li:hover, .sidr ul li ul li.active, .sidr ul li ul li.sidr-class-active {
122
+ border-top: none;
123
+ line-height: 41px;
124
+ }
125
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003114}}
126
+ .sidr ul li ul li:hover > a, .sidr ul li ul li:hover > span, .sidr ul li ul li.active > a, .sidr ul li ul li.active > span, .sidr ul li ul li.sidr-class-active > a, .sidr ul li ul li.sidr-class-active > span {
127
+ -webkit-box-shadow: inset 0 0 15px 3px #222222;
128
+ -moz-box-shadow: inset 0 0 15px 3px #222222;
129
+ box-shadow: inset 0 0 15px 3px #222222;
130
+ }
131
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003119}}
132
+ .sidr ul li ul li a, .sidr ul li ul li span {
133
+ color: rgba(255, 255, 255, 0.8);
134
+ padding-left: 30px;
135
+ }
136
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003128}}
137
+ .sidr form {
138
+ margin: 0 15px;
139
+ }
140
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003132}}
141
+ .sidr label {
142
+ font-size: 13px;
143
+ }
144
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003146}}
145
+ .sidr input[type="text"],
146
+ .sidr input[type="password"],
147
+ .sidr input[type="date"],
148
+ .sidr input[type="datetime"],
149
+ .sidr input[type="email"],
150
+ .sidr input[type="number"],
151
+ .sidr input[type="search"],
152
+ .sidr input[type="tel"],
153
+ .sidr input[type="time"],
154
+ .sidr input[type="url"],
155
+ .sidr textarea, .sidr select {
156
+ width: 100%;
157
+ font-size: 13px;
158
+ padding: 5px;
159
+ -webkit-box-sizing: border-box;
160
+ -moz-box-sizing: border-box;
161
+ box-sizing: border-box;
162
+ margin: 0 0 10px;
163
+ -webkit-border-radius: 2px;
164
+ -moz-border-radius: 2px;
165
+ -ms-border-radius: 2px;
166
+ -o-border-radius: 2px;
167
+ border-radius: 2px;
168
+ border: none;
169
+ background: rgba(0, 0, 0, 0.1);
170
+ color: rgba(255, 255, 255, 0.6);
171
+ display: block;
172
+ clear: both;
173
+ }
174
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003160}}
175
+ .sidr input[type=checkbox] {
176
+ width: auto;
177
+ display: inline;
178
+ clear: none;
179
+ }
180
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003167}}
181
+ .sidr input[type=button],
182
+ .sidr input[type=submit] {
183
+ color: #333333;
184
+ background: white;
185
+ }
186
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003171}}
187
+ .sidr input[type=button]:hover,
188
+ .sidr input[type=submit]:hover {
189
+ background: rgba(255, 255, 255, 0.9);
190
+ }
@@ -0,0 +1,190 @@
1
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\000033}}
2
+ .sidr {
3
+ /* Default Settings */
4
+ display: none;
5
+ position: absolute;
6
+ position: fixed;
7
+ top: 0;
8
+ height: 100%;
9
+ z-index: 999999;
10
+ width: 260px;
11
+ overflow-x: none;
12
+ overflow-y: auto;
13
+ /* Theme Settings */
14
+ font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
15
+ font-size: 15px;
16
+ background: #f8f8f8;
17
+ color: #333333;
18
+ -webkit-box-shadow: inset 0 0 5px 5px #ebebeb;
19
+ -moz-box-shadow: inset 0 0 5px 5px #ebebeb;
20
+ box-shadow: inset 0 0 5px 5px #ebebeb;
21
+ }
22
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000315}}
23
+ .sidr .sidr-inner {
24
+ padding: 0 0 15px;
25
+ }
26
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000318}}
27
+ .sidr .sidr-inner > p {
28
+ margin-left: 15px;
29
+ margin-right: 15px;
30
+ }
31
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000324}}
32
+ .sidr.right {
33
+ left: auto;
34
+ right: -260px;
35
+ }
36
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000329}}
37
+ .sidr.left {
38
+ left: -260px;
39
+ right: auto;
40
+ }
41
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000341}}
42
+ .sidr h1, .sidr h2, .sidr h3, .sidr h4, .sidr h5, .sidr h6 {
43
+ font-size: 11px;
44
+ font-weight: normal;
45
+ padding: 0 15px;
46
+ margin: 0 0 5px;
47
+ color: #333333;
48
+ line-height: 24px;
49
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #dfdfdf));
50
+ background-image: -webkit-linear-gradient(#ffffff, #dfdfdf);
51
+ background-image: -moz-linear-gradient(#ffffff, #dfdfdf);
52
+ background-image: -o-linear-gradient(#ffffff, #dfdfdf);
53
+ background-image: linear-gradient(#ffffff, #dfdfdf);
54
+ -webkit-box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
55
+ -moz-box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
56
+ box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
57
+ }
58
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000352}}
59
+ .sidr p {
60
+ font-size: 13px;
61
+ margin: 0 0 12px;
62
+ }
63
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000355}}
64
+ .sidr p a {
65
+ color: rgba(51, 51, 51, 0.9);
66
+ }
67
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000360}}
68
+ .sidr > p {
69
+ margin-left: 15px;
70
+ margin-right: 15px;
71
+ }
72
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000365}}
73
+ .sidr ul {
74
+ display: block;
75
+ margin: 0 0 15px;
76
+ padding: 0;
77
+ border-top: 1px solid #dfdfdf;
78
+ border-bottom: 1px solid white;
79
+ }
80
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000372}}
81
+ .sidr ul li {
82
+ display: block;
83
+ margin: 0;
84
+ line-height: 48px;
85
+ border-top: 1px solid white;
86
+ border-bottom: 1px solid #dfdfdf;
87
+ }
88
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000381}}
89
+ .sidr ul li:hover, .sidr ul li.active, .sidr ul li.sidr-class-active {
90
+ border-top: none;
91
+ line-height: 49px;
92
+ }
93
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000385}}
94
+ .sidr ul li:hover > a, .sidr ul li:hover > span, .sidr ul li.active > a, .sidr ul li.active > span, .sidr ul li.sidr-class-active > a, .sidr ul li.sidr-class-active > span {
95
+ -webkit-box-shadow: inset 0 0 15px 3px #ebebeb;
96
+ -moz-box-shadow: inset 0 0 15px 3px #ebebeb;
97
+ box-shadow: inset 0 0 15px 3px #ebebeb;
98
+ }
99
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000390}}
100
+ .sidr ul li a, .sidr ul li span {
101
+ padding: 0 15px;
102
+ display: block;
103
+ text-decoration: none;
104
+ color: #333333;
105
+ }
106
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\0000397}}
107
+ .sidr ul li ul {
108
+ border-bottom: none;
109
+ margin: 0;
110
+ }
111
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003100}}
112
+ .sidr ul li ul li {
113
+ line-height: 40px;
114
+ font-size: 13px;
115
+ }
116
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003104}}
117
+ .sidr ul li ul li:last-child {
118
+ border-bottom: none;
119
+ }
120
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003110}}
121
+ .sidr ul li ul li:hover, .sidr ul li ul li.active, .sidr ul li ul li.sidr-class-active {
122
+ border-top: none;
123
+ line-height: 41px;
124
+ }
125
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003114}}
126
+ .sidr ul li ul li:hover > a, .sidr ul li ul li:hover > span, .sidr ul li ul li.active > a, .sidr ul li ul li.active > span, .sidr ul li ul li.sidr-class-active > a, .sidr ul li ul li.sidr-class-active > span {
127
+ -webkit-box-shadow: inset 0 0 15px 3px #ebebeb;
128
+ -moz-box-shadow: inset 0 0 15px 3px #ebebeb;
129
+ box-shadow: inset 0 0 15px 3px #ebebeb;
130
+ }
131
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003119}}
132
+ .sidr ul li ul li a, .sidr ul li ul li span {
133
+ color: rgba(51, 51, 51, 0.8);
134
+ padding-left: 30px;
135
+ }
136
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003128}}
137
+ .sidr form {
138
+ margin: 0 15px;
139
+ }
140
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003132}}
141
+ .sidr label {
142
+ font-size: 13px;
143
+ }
144
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003146}}
145
+ .sidr input[type="text"],
146
+ .sidr input[type="password"],
147
+ .sidr input[type="date"],
148
+ .sidr input[type="datetime"],
149
+ .sidr input[type="email"],
150
+ .sidr input[type="number"],
151
+ .sidr input[type="search"],
152
+ .sidr input[type="tel"],
153
+ .sidr input[type="time"],
154
+ .sidr input[type="url"],
155
+ .sidr textarea, .sidr select {
156
+ width: 100%;
157
+ font-size: 13px;
158
+ padding: 5px;
159
+ -webkit-box-sizing: border-box;
160
+ -moz-box-sizing: border-box;
161
+ box-sizing: border-box;
162
+ margin: 0 0 10px;
163
+ -webkit-border-radius: 2px;
164
+ -moz-border-radius: 2px;
165
+ -ms-border-radius: 2px;
166
+ -o-border-radius: 2px;
167
+ border-radius: 2px;
168
+ border: none;
169
+ background: rgba(0, 0, 0, 0.1);
170
+ color: rgba(51, 51, 51, 0.6);
171
+ display: block;
172
+ clear: both;
173
+ }
174
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003160}}
175
+ .sidr input[type=checkbox] {
176
+ width: auto;
177
+ display: inline;
178
+ clear: none;
179
+ }
180
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003167}}
181
+ .sidr input[type=button],
182
+ .sidr input[type=submit] {
183
+ color: #f8f8f8;
184
+ background: #333333;
185
+ }
186
+ @media -sass-debug-info{filename{font-family:file\:\/\/\/var\/www\/sidr\/src\/scss\/sidr\/_base\.scss}line{font-family:\00003171}}
187
+ .sidr input[type=button]:hover,
188
+ .sidr input[type=submit]:hover {
189
+ background: rgba(51, 51, 51, 0.9);
190
+ }
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sidr-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jesper Josefsson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-06-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: railties
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.3'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.3'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: Sidr.js package for the Ruby on Rails Asset Pipeline
63
+ email:
64
+ - jesper.josefsson@gmail.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - lib/sidr-rails.rb
70
+ - lib/version.rb
71
+ - vendor/assets/javascript/jquery.sidr.js
72
+ - vendor/assets/stylesheets/jquery.sidr.dark.css
73
+ - vendor/assets/stylesheets/jquery.sidr.light.css
74
+ - LICENSE.txt
75
+ - README.md
76
+ homepage: ''
77
+ licenses:
78
+ - MIT
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ segments:
90
+ - 0
91
+ hash: 3038398677301477437
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ segments:
99
+ - 0
100
+ hash: 3038398677301477437
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 1.8.23
104
+ signing_key:
105
+ specification_version: 3
106
+ summary: Sidr.js package for the Ruby on Rails Asset Pipeline
107
+ test_files: []