grader 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in grader.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License
2
+
3
+ Copyright © 2012 radiant.fm
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # Grader
2
+
3
+ This gem provides a simple way to rapid prototyping of layouts in web apps
4
+ in modern browsers.
5
+
6
+ Grader was extracted from out of [radiant.fm](http://radiant.fm).
7
+
8
+ ## Getting Help
9
+
10
+ * Please report bugs on the [issue tracker](https://github.com/radiantfm/grader/issues).
11
+
12
+ ## Installation
13
+
14
+ Requires Rails 3.1 and higher.
15
+
16
+ ``` ruby
17
+ gem 'grader'
18
+ ```
19
+
20
+ Also you will need [Bourbon](https://github.com/thoughtbot/bourbon) installed.
21
+
22
+ ## Getting Started
23
+
24
+ At first configure [Bourbon](https://github.com/thoughtbot/bourbon) as it
25
+ explained in official github page.
26
+
27
+ Then import grader after bourbon in `application.css.scss`. For example:
28
+
29
+ @import "bourbon";
30
+ @import "grader";
31
+
32
+ By default grader's grid have 12 columns with 60px height per column
33
+ and 20px gutter. You can override it by creating `variables.css.scss`
34
+ and import it to your `application.css.scss` file.
35
+
36
+ For example to create 16 columns grid with 30px height per column
37
+ and 10px gutter:
38
+
39
+ $gw-column: 30px;
40
+ $gw-gutter: 10px;
41
+ $gw-count: 16;
42
+
43
+ ## Usage
44
+
45
+ Simple row with 3 columns:
46
+
47
+ ``` html
48
+ <section class="container">
49
+ <div class="row">
50
+ <div class="span-3">
51
+ Left column.
52
+ </div>
53
+ <div class="span-6">
54
+ Middle column.
55
+ </div>
56
+ <div class="span-3">
57
+ Right column.
58
+ </div>
59
+ </div>
60
+ </secton>
61
+ ```
62
+
63
+ Offsetting columns:
64
+
65
+ ``` html
66
+ <section class="container">
67
+ <div class="row">
68
+ <div class="span-4">
69
+ Left column.
70
+ </div>
71
+ <div class="span-4 prefix-4">
72
+ Right column with margin from left for 4 columns.
73
+ </div>
74
+ </div>
75
+ <div class="row">
76
+ <div class="span-4 suffix-4">
77
+ Left column with margin from right for 4 columns..
78
+ </div>
79
+ <div class="span-4">
80
+ Right column
81
+ </div>
82
+ </div>
83
+ </secton>
84
+ ```
85
+
86
+ Nesting columns:
87
+
88
+ ``` html
89
+ <section class="container">
90
+ <div class="row">
91
+ <div class="span-12">
92
+ Level 1 of column
93
+ <div class="row">
94
+ <div class="span-6">Level 2</div>
95
+ <div class="span-6">Level 2</div>
96
+ </div>
97
+ </div>
98
+ </div>
99
+ </section>
100
+ ```
101
+
102
+ ## License
103
+
104
+ Copyright (c) 2012 radiant.fm
105
+
106
+ Permission is hereby granted, free of charge, to any person obtaining
107
+ a copy of this software and associated documentation files (the
108
+ "Software"), to deal in the Software without restriction, including
109
+ without limitation the rights to use, copy, modify, merge, publish,
110
+ distribute, sublicense, and/or sell copies of the Software, and to
111
+ permit persons to whom the Software is furnished to do so, subject to
112
+ the following conditions:
113
+
114
+ The above copyright notice and this permission notice shall be
115
+ included in all copies or substantial portions of the Software.
116
+
117
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
118
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
119
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
120
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
121
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
122
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
123
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
124
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,78 @@
1
+ $gw-column: 60px !default;
2
+ $gw-gutter: 20px !default;
3
+ $gw-count: 12 !default;
4
+
5
+ article,
6
+ aside,
7
+ details,
8
+ figcaption,
9
+ figure,
10
+ footer,
11
+ header,
12
+ hgroup,
13
+ nav,
14
+ section {
15
+ display: block;
16
+ }
17
+
18
+ .container {
19
+ width: ($gw-column + $gw-gutter) * $gw-count - $gw-gutter;
20
+ margin-left: auto;
21
+ margin-right: auto;
22
+ *zoom: 1;
23
+ }
24
+
25
+ .container:before, .container:after {
26
+ display: table;
27
+ content: "";
28
+ }
29
+ .container:after {
30
+ clear: both;
31
+ }
32
+
33
+ .row {
34
+ margin-left: -20px;
35
+ *zoom: 1;
36
+ }
37
+
38
+ .row:before, .row:after {
39
+ display: table;
40
+ content: "";
41
+ }
42
+ .row:after {
43
+ clear: both;
44
+ }
45
+
46
+ [class*="span"] {
47
+ float: left;
48
+ margin-left: $gw-gutter;
49
+ }
50
+
51
+ @for $i from 1 through $gw-count {
52
+ .span-#{$i} { width: grid-width($i) };
53
+ }
54
+
55
+ @for $i from 1 through $gw-count - 1 {
56
+ .prefix-#{$i} { padding-left: grid-width($i) + $gw-gutter * 2 };
57
+ .suffix-#{$i} { padding-right: grid-width($i) + $gw-gutter * 2 };
58
+ }
59
+
60
+ .clearfix {
61
+ &:before, &:after {
62
+ content: ".";
63
+ display: block;
64
+ height: 0;
65
+ overflow: hidden;
66
+ }
67
+ &:after { clear: both }
68
+ zoom: 1
69
+ }
70
+
71
+ .cleaner {
72
+ clear: both;
73
+ display: block;
74
+ overflow: hidden;
75
+ visibility: hidden;
76
+ width: 0;
77
+ height: 0;
78
+ }
data/grader.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "grader/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "grader"
7
+ s.version = Grader::VERSION
8
+ s.authors = ["Dima Kochnev"]
9
+ s.email = ["kochnev.d@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{CSS lightweight grid framework for Rails}
12
+ s.description = %q{Grader is designed to rapid prototyping web apps in modern browsers}
13
+
14
+ s.rubyforge_project = "grader"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_dependency "bourbon"
22
+ s.add_dependency "rails", ">= 3.1"
23
+ s.add_dependency "sass", ">= 3.1"
24
+
25
+ # specify any dependencies here; for example:
26
+ # s.add_development_dependency "rspec"
27
+ # s.add_runtime_dependency "rest-client"
28
+ end
@@ -0,0 +1,5 @@
1
+ module Grader
2
+ class Engine < Rails::Engine
3
+ # auto wire
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module Grader
2
+ VERSION = "0.0.1"
3
+ end
data/lib/grader.rb ADDED
@@ -0,0 +1,18 @@
1
+ require "grader/version"
2
+
3
+ module Grader
4
+ require "grader/engine"
5
+
6
+ if defined?(Rails)
7
+ module Rails
8
+ class Railtie < ::Rails::Railtie
9
+ railtie_name :grader
10
+ rake_tasks do
11
+ load "tasks/install.rake"
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grader
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dima Kochnev
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-06 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bourbon
16
+ requirement: &70205017485980 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70205017485980
25
+ - !ruby/object:Gem::Dependency
26
+ name: rails
27
+ requirement: &70205017485480 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '3.1'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70205017485480
36
+ - !ruby/object:Gem::Dependency
37
+ name: sass
38
+ requirement: &70205017484980 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '3.1'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70205017484980
47
+ description: Grader is designed to rapid prototyping web apps in modern browsers
48
+ email:
49
+ - kochnev.d@gmail.com
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - .gitignore
55
+ - Gemfile
56
+ - LICENSE
57
+ - README.md
58
+ - Rakefile
59
+ - app/assets/stylesheets/_grader.scss
60
+ - grader.gemspec
61
+ - lib/grader.rb
62
+ - lib/grader/engine.rb
63
+ - lib/grader/version.rb
64
+ homepage: ''
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: grader
84
+ rubygems_version: 1.8.15
85
+ signing_key:
86
+ specification_version: 3
87
+ summary: CSS lightweight grid framework for Rails
88
+ test_files: []