grids-overlay 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +54 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/grids/overlay/hashgrid.js +425 -0
- data/app/assets/javascripts/grids/overlay.js.coffee +8 -0
- data/app/assets/stylesheets/grids/overlay.css.scss +40 -0
- data/grids-overlay.gemspec +19 -0
- data/lib/grids-overlay/version.rb +5 -0
- data/lib/grids-overlay.rb +18 -0
- metadata +88 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Vadim Rastyagaev
|
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,54 @@
|
|
1
|
+
**Still is under development. Not recommended to use.**
|
2
|
+
|
3
|
+
Based on [hashgrid](https://github.com/dotjay/hashgrid) overlay for [Grids](https://github.com/whitescape/grids). The library uses [Sprockets](http://getsprockets.org).
|
4
|
+
|
5
|
+
## Requirements
|
6
|
+
|
7
|
+
* [grids gem](https://github.com/whitescape/grids);
|
8
|
+
* [Sprockets](http://getsprockets.org) — already in rails 3.1+;
|
9
|
+
* jQuery;
|
10
|
+
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Add this line to your application's Gemfile:
|
15
|
+
|
16
|
+
gem 'grids'
|
17
|
+
gem 'grids-overlay'
|
18
|
+
|
19
|
+
If you don't use Rails add Grids::Overlay.load_paths to your Sprockets environment:
|
20
|
+
|
21
|
+
Grids::Overlay.load_paths.each {|path| environment.append_path path }
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Import your grid:
|
26
|
+
|
27
|
+
@import 'display.grid';
|
28
|
+
|
29
|
+
Add overlay to your css code:
|
30
|
+
|
31
|
+
@import 'grids/overlay';
|
32
|
+
|
33
|
+
// Temporary set of variables.
|
34
|
+
// Because of sass 3.3 is still unreleased you should add these ones.
|
35
|
+
$overlay-x: display-x(1);
|
36
|
+
$overlay-y: display-y(1);
|
37
|
+
$overlay-gutter-x: display-gutter-x(1);
|
38
|
+
$overlay-gutter-y: display-gutter-y(1);
|
39
|
+
$overlay-modules-x: display-modules-x(1);
|
40
|
+
$overlay-full-page-width: display-full-page-width();
|
41
|
+
|
42
|
+
@include grids-overlay(display) { // Name of your grid.
|
43
|
+
@extend %cendered-grid; // optional
|
44
|
+
}
|
45
|
+
|
46
|
+
Add overlay to your javascript code:
|
47
|
+
|
48
|
+
// = require jquery
|
49
|
+
// = require grids/overlay
|
50
|
+
|
51
|
+
$(function(){
|
52
|
+
new grids.Overlay('display');
|
53
|
+
})
|
54
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,425 @@
|
|
1
|
+
/**
|
2
|
+
* hashgrid (jQuery version, adapters are on the way)
|
3
|
+
* http://github.com/dotjay/hashgrid
|
4
|
+
* Version 8, 06 Oct 2012
|
5
|
+
* Written by Jon Gibbins
|
6
|
+
*
|
7
|
+
* Contibutors:
|
8
|
+
* James Aitken, http://loonypandora.co.uk/
|
9
|
+
* Tom Arnold, http://www.tomarnold.de/
|
10
|
+
* Sean Coates, http://seancoates.com/
|
11
|
+
* Phil Dokas, http://jetless.org/
|
12
|
+
* Andrew Jaswa, http://andrewjaswa.com/
|
13
|
+
* Callum Macrae, http://lynx.io/
|
14
|
+
*/
|
15
|
+
|
16
|
+
/**
|
17
|
+
* @license Copyright 2011 Analog Coop Limited
|
18
|
+
*
|
19
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
20
|
+
* you may not use this file except in compliance with the License.
|
21
|
+
* You may obtain a copy of the License at
|
22
|
+
*
|
23
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
24
|
+
*
|
25
|
+
* Unless required by applicable law or agreed to in writing, software
|
26
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
27
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
28
|
+
* See the License for the specific language governing permissions and
|
29
|
+
* limitations under the License.
|
30
|
+
*/
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Usage
|
34
|
+
*
|
35
|
+
* // The basic #grid setup looks like this
|
36
|
+
* var grid = new hashgrid();
|
37
|
+
*
|
38
|
+
* // But there are a whole bunch of additional options you can set
|
39
|
+
* var grid = new hashgrid({
|
40
|
+
* id: 'mygrid', // set a custom id for the grid container
|
41
|
+
* modifierKey: 'alt', // optional 'ctrl', 'alt' or 'shift'
|
42
|
+
* showGridKey: 's', // key to show the grid
|
43
|
+
* holdGridKey: 'enter', // key to hold the grid in place
|
44
|
+
* foregroundKey: 'f', // key to toggle foreground/background
|
45
|
+
* jumpGridsKey: 'd', // key to cycle through the grid classes
|
46
|
+
* numberOfGrids: 2, // number of grid classes used
|
47
|
+
* classPrefix: 'myclass', // prefix for the grid classes
|
48
|
+
* cookiePrefix: 'mygrid' // prefix for the cookie name
|
49
|
+
* });
|
50
|
+
*/
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Make sure we have the library
|
55
|
+
* TODO: Use an adapter
|
56
|
+
*/
|
57
|
+
if (typeof jQuery == "undefined") {
|
58
|
+
alert("Hashgrid: jQuery not loaded. Make sure it's linked to your pages.");
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
/**
|
63
|
+
* hashgrid overlay
|
64
|
+
* @constructor
|
65
|
+
*/
|
66
|
+
|
67
|
+
if (window.grids == null) window.grids = new Object;
|
68
|
+
grids.hashgrid = function(set) {
|
69
|
+
|
70
|
+
var options = {
|
71
|
+
id: 'grid', // id for the grid container
|
72
|
+
modifierKey: null, // optional 'ctrl', 'alt' or 'shift'
|
73
|
+
showGridKey: 'g', // key to show the grid
|
74
|
+
holdGridKey: 'h', // key to hold the grid in place
|
75
|
+
foregroundKey: 'f', // key to toggle foreground/background
|
76
|
+
jumpGridsKey: 'j', // key to cycle through the grid classes
|
77
|
+
numberOfGrids: 1, // number of grid classes used
|
78
|
+
classPrefix: 'grid-', // prefix for the grid classes
|
79
|
+
cookiePrefix: 'hashgrid', // prefix for the cookie name
|
80
|
+
container: $('body')
|
81
|
+
},
|
82
|
+
alreadyDown,
|
83
|
+
classNumber = 1,
|
84
|
+
gridLines,
|
85
|
+
gridWidth,
|
86
|
+
i,
|
87
|
+
line,
|
88
|
+
lineHeight,
|
89
|
+
numGridLines,
|
90
|
+
overlay,
|
91
|
+
overlayCookie,
|
92
|
+
overlayEl,
|
93
|
+
overlayOn = false,
|
94
|
+
overlayVert,
|
95
|
+
overlayZState = 'B',
|
96
|
+
overlayZBackground = -1,
|
97
|
+
overlayZForeground = 9999,
|
98
|
+
pageHeight,
|
99
|
+
setKey,
|
100
|
+
state,
|
101
|
+
sticky = false,
|
102
|
+
top;
|
103
|
+
|
104
|
+
// Apply options
|
105
|
+
if (typeof set == 'object') {
|
106
|
+
for (setKey in set) {
|
107
|
+
options[setKey] = set[setKey];
|
108
|
+
}
|
109
|
+
}
|
110
|
+
else if (typeof set == 'string') {
|
111
|
+
options.id = set;
|
112
|
+
}
|
113
|
+
|
114
|
+
// Remove any conflicting overlay
|
115
|
+
if ($('#' + options.id).length > 0) {
|
116
|
+
$('#' + options.id).remove();
|
117
|
+
}
|
118
|
+
|
119
|
+
// Create overlay, hidden before adding to DOM
|
120
|
+
overlayEl = $('<div></div>');
|
121
|
+
overlayEl
|
122
|
+
.attr('id', options.id)
|
123
|
+
.css({
|
124
|
+
display: 'none',
|
125
|
+
pointerEvents: 'none'
|
126
|
+
});
|
127
|
+
options.container.prepend(overlayEl);
|
128
|
+
overlay = $('#' + options.id);
|
129
|
+
|
130
|
+
// Unless a custom z-index is set, ensure the overlay will be behind everything
|
131
|
+
if (overlay.css('z-index') == 'auto') overlay.css('z-index', overlayZBackground);
|
132
|
+
|
133
|
+
// Override the default overlay height with the actual page height
|
134
|
+
pageHeight = parseFloat($(document).height());
|
135
|
+
overlay.height(pageHeight);
|
136
|
+
|
137
|
+
// Add the first grid line so that we can measure it
|
138
|
+
overlay.append('<div id="' + options.id + '-horiz" class="horiz first-line">');
|
139
|
+
|
140
|
+
// Position off-screen and display to calculate height
|
141
|
+
top = overlay.css("top");
|
142
|
+
overlay.css({
|
143
|
+
top: '-999px',
|
144
|
+
display: 'block'
|
145
|
+
});
|
146
|
+
|
147
|
+
// Calculate the number of grid lines needed
|
148
|
+
line = $('#' + options.id + '-horiz');
|
149
|
+
lineHeight = line.outerHeight();
|
150
|
+
|
151
|
+
// Hide and reset top
|
152
|
+
overlay.css({
|
153
|
+
display: 'none',
|
154
|
+
top: top
|
155
|
+
});
|
156
|
+
|
157
|
+
// Break on zero line height
|
158
|
+
if (lineHeight <= 0) {
|
159
|
+
return false;
|
160
|
+
}
|
161
|
+
|
162
|
+
// Add the remaining grid lines
|
163
|
+
numGridLines = Math.floor(pageHeight / lineHeight);
|
164
|
+
gridLines = '';
|
165
|
+
|
166
|
+
for (i = numGridLines - 1; i >= 1; i--) {
|
167
|
+
gridLines += '<div class="horiz"></div>';
|
168
|
+
}
|
169
|
+
overlay.append(gridLines);
|
170
|
+
|
171
|
+
// vertical grid
|
172
|
+
overlay.append($('<div class="vert-container"></div>'));
|
173
|
+
overlayVert = overlay.children('.vert-container');
|
174
|
+
gridWidth = overlay.width();
|
175
|
+
overlayVert.css({width: gridWidth, position: 'absolute', top: 0});
|
176
|
+
overlayVert.append('<div class="vert first-line"> </div>');
|
177
|
+
|
178
|
+
// 30 is an arbitrarily large number...
|
179
|
+
// can't calculate the margin width properly
|
180
|
+
gridLines = '';
|
181
|
+
for (i = 0; i < 30; i++) {
|
182
|
+
gridLines += '<div class="vert"> </div>';
|
183
|
+
}
|
184
|
+
overlayVert.append(gridLines);
|
185
|
+
overlayVert.children()
|
186
|
+
.height(pageHeight)
|
187
|
+
.css({ display: 'inline-block' });
|
188
|
+
|
189
|
+
// Check for saved state
|
190
|
+
overlayCookie = readCookie(options.cookiePrefix + options.id);
|
191
|
+
if (typeof overlayCookie == 'string') {
|
192
|
+
state = overlayCookie.split('-');
|
193
|
+
state[2] = Number(state[2]);
|
194
|
+
if ((typeof state[2] == 'number') && !isNaN(state[2])) {
|
195
|
+
classNumber = state[2].toFixed(0);
|
196
|
+
overlay.addClass(options.classPrefix + classNumber);
|
197
|
+
}
|
198
|
+
if (state[1] == 'F') {
|
199
|
+
overlayZState = 'F';
|
200
|
+
overlay.css('z-index', overlayZForeground);
|
201
|
+
}
|
202
|
+
if (state[0] == '1') {
|
203
|
+
overlayOn = true;
|
204
|
+
sticky = true;
|
205
|
+
showOverlay();
|
206
|
+
}
|
207
|
+
}
|
208
|
+
else {
|
209
|
+
overlay.addClass(options.classPrefix + classNumber);
|
210
|
+
}
|
211
|
+
|
212
|
+
// Keyboard controls
|
213
|
+
$(document).bind('keydown', keydownHandler);
|
214
|
+
$(document).bind('keyup', keyupHandler);
|
215
|
+
|
216
|
+
/**
|
217
|
+
* Helpers
|
218
|
+
*/
|
219
|
+
|
220
|
+
function getModifier(e) {
|
221
|
+
if (options.modifierKey == null) return true; // Bypass by default
|
222
|
+
var m = true;
|
223
|
+
switch(options.modifierKey) {
|
224
|
+
case 'ctrl':
|
225
|
+
m = (e.ctrlKey ? e.ctrlKey : false);
|
226
|
+
break;
|
227
|
+
|
228
|
+
case 'alt':
|
229
|
+
m = (e.altKey ? e.altKey : false);
|
230
|
+
break;
|
231
|
+
|
232
|
+
case 'shift':
|
233
|
+
m = (e.shiftKey ? e.shiftKey : false);
|
234
|
+
break;
|
235
|
+
}
|
236
|
+
return m;
|
237
|
+
}
|
238
|
+
|
239
|
+
function getKey(e) {
|
240
|
+
var k = false, c = (e.keyCode ? e.keyCode : e.which);
|
241
|
+
// Handle keywords
|
242
|
+
if (c == 13) k = 'enter';
|
243
|
+
// Handle letters
|
244
|
+
else k = String.fromCharCode(c).toLowerCase();
|
245
|
+
return k;
|
246
|
+
}
|
247
|
+
|
248
|
+
function saveState() {
|
249
|
+
createCookie(options.cookiePrefix + options.id, (sticky ? '1' : '0') + '-' + overlayZState + '-' + classNumber, 1);
|
250
|
+
}
|
251
|
+
|
252
|
+
function showOverlay() {
|
253
|
+
overlay.show();
|
254
|
+
overlayVert.css({width: overlay.width()});
|
255
|
+
// hide any vertical blocks that aren't at the top of the viewport
|
256
|
+
overlayVert.children('.vert').each(function () {
|
257
|
+
var vCol = $(this);
|
258
|
+
vCol.css('display','inline-block');
|
259
|
+
if (vCol.offset().top > vCol.parent().offset().top) {
|
260
|
+
vCol.hide();
|
261
|
+
}
|
262
|
+
});
|
263
|
+
}
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Event handlers
|
267
|
+
*/
|
268
|
+
|
269
|
+
alreadyDown = {};
|
270
|
+
|
271
|
+
function keydownHandler(e) {
|
272
|
+
var k,
|
273
|
+
m,
|
274
|
+
source = e.target.tagName.toLowerCase();
|
275
|
+
|
276
|
+
if ((source == 'input') || (source == 'textarea') || (source == 'select')) {
|
277
|
+
return true;
|
278
|
+
}
|
279
|
+
|
280
|
+
m = getModifier(e);
|
281
|
+
if (!m) {
|
282
|
+
return true;
|
283
|
+
}
|
284
|
+
|
285
|
+
k = getKey(e);
|
286
|
+
if (!k) {
|
287
|
+
return true;
|
288
|
+
}
|
289
|
+
|
290
|
+
if (alreadyDown[k]) {
|
291
|
+
return true;
|
292
|
+
}
|
293
|
+
alreadyDown[k] = true;
|
294
|
+
|
295
|
+
switch(k) {
|
296
|
+
case options.showGridKey:
|
297
|
+
if (!overlayOn) {
|
298
|
+
showOverlay();
|
299
|
+
overlayOn = true;
|
300
|
+
}
|
301
|
+
else if (sticky) {
|
302
|
+
overlay.hide();
|
303
|
+
overlayOn = false;
|
304
|
+
sticky = false;
|
305
|
+
saveState();
|
306
|
+
}
|
307
|
+
break;
|
308
|
+
case options.holdGridKey:
|
309
|
+
if (overlayOn && !sticky) {
|
310
|
+
// Turn sticky overlay on
|
311
|
+
sticky = true;
|
312
|
+
saveState();
|
313
|
+
}
|
314
|
+
break;
|
315
|
+
case options.foregroundKey:
|
316
|
+
if (overlayOn) {
|
317
|
+
// Toggle sticky overlay z-index
|
318
|
+
if (overlay.css('z-index') == overlayZForeground) {
|
319
|
+
overlay.css('z-index', overlayZBackground);
|
320
|
+
overlayZState = 'B';
|
321
|
+
}
|
322
|
+
else {
|
323
|
+
overlay.css('z-index', overlayZForeground);
|
324
|
+
overlayZState = 'F';
|
325
|
+
}
|
326
|
+
saveState();
|
327
|
+
}
|
328
|
+
break;
|
329
|
+
case options.jumpGridsKey:
|
330
|
+
if (overlayOn && (options.numberOfGrids > 1)) {
|
331
|
+
// Cycle through the available grids
|
332
|
+
overlay.removeClass(options.classPrefix + classNumber);
|
333
|
+
classNumber++;
|
334
|
+
if (classNumber > options.numberOfGrids) classNumber = 1;
|
335
|
+
overlay.addClass(options.classPrefix + classNumber);
|
336
|
+
showOverlay();
|
337
|
+
if (/webkit/.test( navigator.userAgent.toLowerCase() )) {
|
338
|
+
forceRepaint();
|
339
|
+
}
|
340
|
+
saveState();
|
341
|
+
}
|
342
|
+
break;
|
343
|
+
}
|
344
|
+
|
345
|
+
return true;
|
346
|
+
}
|
347
|
+
|
348
|
+
function keyupHandler(e) {
|
349
|
+
var k,
|
350
|
+
m = getModifier(e);
|
351
|
+
|
352
|
+
if (!m) {
|
353
|
+
return true;
|
354
|
+
}
|
355
|
+
|
356
|
+
k = getKey(e);
|
357
|
+
alreadyDown[k] = false;
|
358
|
+
|
359
|
+
if (k && (k == options.showGridKey) && !sticky) {
|
360
|
+
overlay.hide();
|
361
|
+
overlayOn = false;
|
362
|
+
}
|
363
|
+
|
364
|
+
return true;
|
365
|
+
}
|
366
|
+
|
367
|
+
/**
|
368
|
+
* Cookie functions
|
369
|
+
*
|
370
|
+
* By Peter-Paul Koch:
|
371
|
+
* http://www.quirksmode.org/js/cookies.html
|
372
|
+
*/
|
373
|
+
function createCookie(name, value, days) {
|
374
|
+
var date,
|
375
|
+
expires = "";
|
376
|
+
|
377
|
+
if (days) {
|
378
|
+
date = new Date();
|
379
|
+
date.setTime( date.getTime() + (days*24*60*60*1000) );
|
380
|
+
expires = "; expires=" + date.toGMTString();
|
381
|
+
}
|
382
|
+
|
383
|
+
document.cookie = name + "=" + value + expires + "; path=/";
|
384
|
+
}
|
385
|
+
|
386
|
+
function readCookie(name) {
|
387
|
+
var c,
|
388
|
+
ca = document.cookie.split(';'),
|
389
|
+
i = 0,
|
390
|
+
len = ca.length,
|
391
|
+
nameEQ = name + "=";
|
392
|
+
|
393
|
+
for (; i < len; i++) {
|
394
|
+
c = ca[i];
|
395
|
+
|
396
|
+
while (c.charAt(0) == ' ') {
|
397
|
+
c = c.substring(1, c.length);
|
398
|
+
}
|
399
|
+
|
400
|
+
if (c.indexOf(nameEQ) == 0) {
|
401
|
+
return c.substring(nameEQ.length, c.length);
|
402
|
+
}
|
403
|
+
}
|
404
|
+
return null;
|
405
|
+
}
|
406
|
+
|
407
|
+
function eraseCookie(name) {
|
408
|
+
createCookie(name, "", -1);
|
409
|
+
}
|
410
|
+
|
411
|
+
/**
|
412
|
+
* Forces a repaint (because WebKit has issues)
|
413
|
+
* http://www.sitepoint.com/forums/showthread.php?p=4538763
|
414
|
+
* http://www.phpied.com/the-new-game-show-will-it-reflow/
|
415
|
+
*/
|
416
|
+
function forceRepaint() {
|
417
|
+
var ss = document.styleSheets[0];
|
418
|
+
try {
|
419
|
+
ss.addRule('.xxxxxx', 'position: relative');
|
420
|
+
ss.removeRule(ss.rules.length - 1);
|
421
|
+
} catch(e) {}
|
422
|
+
}
|
423
|
+
|
424
|
+
return {};
|
425
|
+
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
@import 'spaceless';
|
2
|
+
|
3
|
+
@mixin grids-overlay($name) {
|
4
|
+
##{$name}-grid-overlay {
|
5
|
+
width: $overlay-full-page-width; // width: full-page-width($name);
|
6
|
+
position: absolute;
|
7
|
+
top: 0;
|
8
|
+
left: 0;
|
9
|
+
overflow: hidden;
|
10
|
+
|
11
|
+
&%centered-grid {
|
12
|
+
left: 50%;
|
13
|
+
margin-left: -$overlay-full-page-width / 2;
|
14
|
+
}
|
15
|
+
|
16
|
+
@content;
|
17
|
+
}
|
18
|
+
|
19
|
+
.vert-container {
|
20
|
+
@include spaceless;
|
21
|
+
margin-right: $overlay-gutter-x; // margin-right: gutter-x($name, 1);
|
22
|
+
}
|
23
|
+
|
24
|
+
.vert{
|
25
|
+
display: inline-block;
|
26
|
+
width: $overlay-modules-x; // width: modules-x($name, 1);
|
27
|
+
box-sizing: border-box;
|
28
|
+
-moz-box-sizing: border-box;
|
29
|
+
background: rgba(0, 0, 255, 0.1);
|
30
|
+
margin-right: $overlay-gutter-x;
|
31
|
+
}
|
32
|
+
|
33
|
+
.horiz{
|
34
|
+
height: $overlay-y; // height: y($name, 1);
|
35
|
+
box-sizing: border-box;
|
36
|
+
-moz-box-sizing: border-box;
|
37
|
+
background: rgba(0, 0, 255, 0.1);
|
38
|
+
margin-bottom: $overlay-gutter-y; // margin-bottom: gutter-y($name, 1);
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/grids-overlay/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Vadim Rastyagaev"]
|
6
|
+
gem.email = ["abc@oktoberliner.ru"]
|
7
|
+
gem.description = %q{Overlay for "grids"}
|
8
|
+
gem.summary = %q{Overlay for "grids"}
|
9
|
+
gem.homepage = "https://github.com/whitescape/grids-overlay"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "grids-overlay"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Grids::Overlay::VERSION
|
17
|
+
gem.add_dependency 'grids', '~> 1.1'
|
18
|
+
gem.add_dependency 'spaceless', '~> 1.1'
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spaceless'
|
2
|
+
require 'grids-overlay/version'
|
3
|
+
|
4
|
+
module Grids
|
5
|
+
module Overlay
|
6
|
+
def self.load_paths
|
7
|
+
[
|
8
|
+
File.expand_path('../../app/assets/stylesheets/', __FILE__),
|
9
|
+
File.expand_path('../../app/assets/javascripts/', __FILE__),
|
10
|
+
]
|
11
|
+
end
|
12
|
+
|
13
|
+
if defined? Rails
|
14
|
+
class Engine < ::Rails::Engine
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: grids-overlay
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Vadim Rastyagaev
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-02-18 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: grids
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.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: '1.1'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: spaceless
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.1'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.1'
|
46
|
+
description: Overlay for "grids"
|
47
|
+
email:
|
48
|
+
- abc@oktoberliner.ru
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- LICENSE
|
56
|
+
- README.md
|
57
|
+
- Rakefile
|
58
|
+
- app/assets/javascripts/grids/overlay.js.coffee
|
59
|
+
- app/assets/javascripts/grids/overlay/hashgrid.js
|
60
|
+
- app/assets/stylesheets/grids/overlay.css.scss
|
61
|
+
- grids-overlay.gemspec
|
62
|
+
- lib/grids-overlay.rb
|
63
|
+
- lib/grids-overlay/version.rb
|
64
|
+
homepage: https://github.com/whitescape/grids-overlay
|
65
|
+
licenses: []
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 1.8.23
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: Overlay for "grids"
|
88
|
+
test_files: []
|