sitges 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -3,16 +3,28 @@
3
3
  = Basic Usage
4
4
 
5
5
  This gem is depend from HAML
6
- <tt>gem "haml-rails"</tt>
6
+
7
+ gem "haml-rails"
7
8
 
8
9
  The basic usage is copy all stylesheets files:
9
- <tt>rails generate sitges</tt>
10
+
11
+ rails generate sitges:install
10
12
 
11
13
  And you can acces to stylesheet guide from:
12
- <tt>styleguides</tt>
14
+
15
+ /styleguides
16
+
17
+ Add to your *.scss file:
18
+
19
+ @import "[module]";
13
20
 
14
21
  = Content
15
22
 
16
- * Reset -> Reset from Yahoo Reset
17
- * Grids -> Grids from OOCSS
23
+ Some modules provided by sitges:
24
+
25
+ * Reset -> Reset from Yahoo Reset [reset]
26
+ * Grids -> Grids from OOCSS [grids]
27
+ * Typography -> Rhythm & Proportion from Sitges special functions. [sitges]
28
+ * Basic rails style -> Flash notice divs. [rails]
29
+ * Basic style -> [tables, lists, forms, html5, prettify]
18
30
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -1,3 +1,5 @@
1
1
  module Sitges
2
- VERSION = "0.1.0"
2
+ module Rails
3
+ VERSION = "0.2.0"
4
+ end
3
5
  end
data/lib/sitges.rb CHANGED
@@ -1,3 +1,7 @@
1
1
  module Sitges
2
2
  require 'sitges/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
3
+ module Rails
4
+ class Railtie < ::Rails::Railtie
5
+ end
6
+ end
3
7
  end
data/sitges.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sitges}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Sviridov"]
@@ -25,22 +25,9 @@ Gem::Specification.new do |s|
25
25
  "app/views/layouts/sitges.html.haml",
26
26
  "app/views/sitges/styleguides/show.html.haml",
27
27
  "config/routes.rb",
28
- "lib/generators/sitges/USAGE",
29
- "lib/generators/sitges/sitges_generator.rb",
30
- "lib/generators/sitges/templates/images/input_bg.gif",
31
- "lib/generators/sitges/templates/stylesheets/sass/_forms.scss",
32
- "lib/generators/sitges/templates/stylesheets/sass/_grids.scss",
33
- "lib/generators/sitges/templates/stylesheets/sass/_html5.scss",
34
- "lib/generators/sitges/templates/stylesheets/sass/_lists.scss",
35
- "lib/generators/sitges/templates/stylesheets/sass/_prettify.scss",
36
- "lib/generators/sitges/templates/stylesheets/sass/_rails.scss",
37
- "lib/generators/sitges/templates/stylesheets/sass/_reset.scss",
38
- "lib/generators/sitges/templates/stylesheets/sass/_sitges.scss",
39
- "lib/generators/sitges/templates/stylesheets/sass/_tables.scss",
40
28
  "lib/sitges.rb",
41
29
  "lib/sitges/engine.rb",
42
30
  "lib/sitges/version.rb",
43
- "lib/tasks/.gitkeep",
44
31
  "sitges.gemspec"
45
32
  ]
46
33
  s.rdoc_options = ["--charset=UTF-8"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitges
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexander Sviridov
@@ -37,22 +37,9 @@ files:
37
37
  - app/views/layouts/sitges.html.haml
38
38
  - app/views/sitges/styleguides/show.html.haml
39
39
  - config/routes.rb
40
- - lib/generators/sitges/USAGE
41
- - lib/generators/sitges/sitges_generator.rb
42
- - lib/generators/sitges/templates/images/input_bg.gif
43
- - lib/generators/sitges/templates/stylesheets/sass/_forms.scss
44
- - lib/generators/sitges/templates/stylesheets/sass/_grids.scss
45
- - lib/generators/sitges/templates/stylesheets/sass/_html5.scss
46
- - lib/generators/sitges/templates/stylesheets/sass/_lists.scss
47
- - lib/generators/sitges/templates/stylesheets/sass/_prettify.scss
48
- - lib/generators/sitges/templates/stylesheets/sass/_rails.scss
49
- - lib/generators/sitges/templates/stylesheets/sass/_reset.scss
50
- - lib/generators/sitges/templates/stylesheets/sass/_sitges.scss
51
- - lib/generators/sitges/templates/stylesheets/sass/_tables.scss
52
40
  - lib/sitges.rb
53
41
  - lib/sitges/engine.rb
54
42
  - lib/sitges/version.rb
55
- - lib/tasks/.gitkeep
56
43
  - sitges.gemspec
57
44
  has_rdoc: true
58
45
  homepage:
@@ -1,8 +0,0 @@
1
- Description:
2
- Explain the generator
3
-
4
- Example:
5
- rails generate sitges Thing
6
-
7
- This will create:
8
- what/will/it/create
@@ -1,8 +0,0 @@
1
- class SitgesGenerator < Rails::Generators::Base
2
- source_root File.expand_path('../templates', __FILE__)
3
- # argument :layout_name, :type => :string, :default => "application"
4
- def generate_layout
5
- directory "stylesheets", "public/stylesheets/"
6
- directory "images", "public/images/"
7
- end
8
- end
@@ -1,99 +0,0 @@
1
- @import "sitges";
2
-
3
- /* Form */
4
- /*removes dotted outline on submit buttons when clicking in firefox */
5
- input[type="submit"]::-moz-focus-inner {
6
- border: none;
7
- }
8
- form {
9
- @include rhythm-font(14);
10
- @include rhythm-margin(14, 14, 14, 14);
11
- table {
12
- table-layout: auto;
13
- }
14
- tr, td {
15
- border: 0 none;
16
- }
17
- }
18
- .field_with_errors {
19
- input, textarea, select, div.cleditorMain {
20
- outline: 2px solid #B02B2C;
21
- }
22
- }
23
- div#error_explanation {
24
- border: 1px solid;
25
- border-color: darken(#B02B2C, 20%);
26
- background: #B02B2C;
27
- color: #fff;
28
- @include rhythm-margin(14, none, 14, none);
29
- h1, h2, h3, h4, h5, h6, p {
30
- color: #fff;
31
- font-size: 18px;
32
- }
33
- ul {
34
- font-size: 1em;
35
- }
36
- }
37
- td.warning_dialog {
38
- padding-top: 0;
39
- font-size: 11px;
40
- }
41
- td.with_warning_dialog {
42
- padding-bottom: 0;
43
- }
44
- td.label_text_area {
45
- text-align: right;
46
- vertical-align: top;
47
- padding-top: 1em * 1 / 2;
48
- }
49
- td.label {
50
- text-align: right;
51
- width: 10%;
52
- }
53
- td.file_field {
54
- input {
55
- //padding: 1em * 1 / 4;
56
- }
57
- }
58
- td.text_field {
59
- width: 90%;
60
- input {
61
- font-size: 16px;
62
- padding: 1em * 1 / 4;
63
- background: url("/images/input_bg.gif") repeat-x scroll center top #FFFFFF;
64
- border: 1px solid;
65
- border-color: #666666 #CCCCCC #CCCCCC;
66
- width: 400px;
67
- }
68
- }
69
- td.text_area {
70
- textarea {
71
- font-size: 16px;
72
- padding: 1em * 1 / 4;
73
- height: 200px;
74
- width: 400px;
75
- background: url("/images/input_bg.gif") repeat-x scroll center top #FFFFFF;
76
- border: 1px solid;
77
- border-color:#666666 #CCCCCC #CCCCCC;
78
- }
79
- }
80
- td.select {
81
- select {
82
- font-size: 16px;
83
- padding: 1em * 1 / 4;
84
- border: 1px solid;
85
- border-color: #666666 #CCCCCC #CCCCCC;
86
- }
87
- }
88
- td.submit {
89
- padding-top: 1em * 1 / 1;
90
- input {
91
- padding: 1em * 1 / 1.2;
92
- cursor:pointer;
93
- display:inline-block;
94
- font-size:12px;
95
- font-weight:bold;
96
- &:hover {
97
- }
98
- }
99
- }
@@ -1,15 +0,0 @@
1
- @media screen and (max-width: 319px) {.unit{float: none !important; width: auto !important;}}
2
- .line:after,.lastUnit:after{clear:both;display:block;visibility:hidden;overflow:hidden;height:0 !important;line-height:0;font-size:xx-large;content:" x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ";}
3
- .line{*zoom:1;}
4
- .unit{float:left;}
5
- .size1of1{float:none;}
6
- .size1of2{width:50%;}
7
- .size1of3{width:33.33333%;}
8
- .size2of3{width:66.66666%;}
9
- .size1of4{width:25%;}
10
- .size3of4{width:75%;}
11
- .size1of5{width:20%;}
12
- .size2of5{width:40%;}
13
- .size3of5{width:60%;}
14
- .size4of5{width:80%;}
15
- .lastUnit{display:table-cell;float:none;width:auto;*display:block;*zoom:1;_position:relative;_left:-3px;_margin-right:-3px;}
@@ -1,3 +0,0 @@
1
- section, article, header, footer, nav {
2
- display: block;
3
- }
@@ -1,42 +0,0 @@
1
- @import "sitges";
2
-
3
- /* Lists */
4
- ul, ol {
5
- list-style-position: inside;
6
- @include rhythm-font(14);
7
- @include rhythm-margin(14, 14, 14, 14);
8
- }
9
-
10
- li ul, li ol {
11
- font-size: 1em;
12
- }
13
-
14
- ul {
15
- list-style-type: disc;
16
- }
17
-
18
- ol {
19
- list-style-type: decimal;
20
- }
21
-
22
- dl {
23
- @include rhythm-font(14);
24
- @include rhythm-margin(14, 14, 14, 14);
25
- }
26
-
27
- dl dt {
28
- font-weight: bold;
29
- margin-top: 1em * $base_size / 12;
30
- }
31
-
32
- dl dd {
33
- margin-bottom: 0em;
34
- }
35
-
36
- dd {
37
- margin-left: 1em * $base_size / 12;
38
- }
39
-
40
- ol ol, ol ul, ul ul, ul ol {
41
- margin-left: 1em * $base_size / 12;
42
- }
@@ -1,185 +0,0 @@
1
- @import "sitges";
2
-
3
- *, :active, :focus {
4
- outline:0 none;
5
- }
6
- ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
7
- ::selection { background:#FF5E99; color:#fff; text-shadow: none; }
8
- html {
9
- -webkit-font-smoothing: antialiased;
10
- }
11
- div#wrap {
12
- //border: 1px dashed #000000;
13
- @include rhythm-size(800, none);
14
- @include rhythm-margin(12, auto, 12, auto);
15
- }
16
- body {
17
- font-size: 1em;
18
- font-family: Arial, Verdana, sans-serif;
19
- -webkit-user-select: none;
20
- color: lighten(#000000, 30%);
21
- cursor: default;
22
- }
23
- img {
24
- -ms-interpolation-mode:bicubic;
25
- }
26
- h1, h2, h3, h4, h5, h6 {
27
- font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
28
- color: #356AA0;
29
- text-rendering: optimizeLegibility;
30
- }
31
- h1 {
32
- @include rhythm-font(20);
33
- @include rhythm-padding(20, 20, 0, 20);
34
- //@include rhythm-margin(0, 0, 20, 0);
35
- font-weight: bold;
36
- }
37
- h2 {
38
- @include rhythm-font(18);
39
- @include rhythm-padding(18, 18, 0, 18);
40
- //@include rhythm-margin(0, 0, 18, 0);
41
- word-spacing:-1px;
42
- font-weight: normal;
43
- }
44
- h3 {
45
- @include rhythm-font(16);
46
- @include rhythm-padding(16, 16, 0, 16);
47
- //@include rhythm-margin(0, 0, 16, 0);
48
- font-weight: bold;
49
- }
50
- h4 {
51
- @include rhythm-font(16);
52
- @include rhythm-padding(16, 16, 0, 16);
53
- //@include rhythm-margin(0, 0, 16, 0);
54
- font-weight: bold;
55
- }
56
- h5 {
57
- @include rhythm-font(16);
58
- @include rhythm-padding(16, 16, 0, 16);
59
- //@include rhythm-margin(0, 0, 16, 0);
60
- font-weight: bold;
61
- }
62
- h6 {
63
- @include rhythm-font(16);
64
- @include rhythm-padding(16, 16, 0, 16);
65
- //@include rhythm-margin(0, 0, 16, 0);
66
- font-weight: bold;
67
- }
68
- p {
69
- @include rhythm-font(14);
70
- @include rhythm-margin(14, 14, 14, 14);
71
- }
72
-
73
- /* Use this to create a horizontal ruler across a column. */
74
- hr {
75
- background: #000000;
76
- border: none;
77
- clear: both;
78
- color: #000000;
79
- float: none;
80
- height: 1px;
81
- @include rhythm-font(14);
82
- @include rhythm-margin(14, 14, 14, 14);
83
- }
84
-
85
- hr.space {
86
- background: #fff;
87
- color: #fff;
88
- }
89
-
90
- /* Clearfix hack I love you */
91
- .clearfix:after {
92
- content:".";
93
- display:block;
94
- height:0;
95
- clear:both;
96
- visibility:hidden;
97
- }
98
-
99
- .clearfix {display:inline-block;}
100
- /* Hide from IE Mac \*/
101
- .clearfix {display:block;}
102
- /* End hide from IE Mac */
103
-
104
- abbr, acronym {
105
- border-bottom: 1px dotted #666;
106
- cursor: help;
107
- }
108
-
109
- address {
110
- font-style: italic;
111
- @include rhythm-font(14);
112
- @include rhythm-margin(14, 14, 14, 14);
113
- }
114
-
115
- del {
116
- color:#666;
117
- }
118
-
119
- a, a:link {
120
- color: #1a4882;
121
- text-decoration: underline;
122
- }
123
-
124
- a:visited {
125
- color: #1a4882;
126
- }
127
-
128
- a:hover {
129
- color: #052246;
130
- }
131
-
132
- a:active,
133
- a:focus {
134
- color: #1a4882;
135
- }
136
-
137
- blockquote {
138
- //@include rhythm-font(14);
139
- @include rhythm-margin(14, 14, 14, 14);
140
- border-left: 4px solid #d1d1d1;
141
- color: lighten(#000000, 50%);
142
- font-style: italic;
143
- //font-size: 1em;
144
- }
145
-
146
- strong {
147
- font-weight: bold;
148
- }
149
-
150
- em,
151
- dfn {
152
- font-style: italic;
153
- }
154
-
155
- dfn {
156
- font-weight: bold;
157
- }
158
-
159
- pre, code {
160
- @include rhythm-font(14);
161
- @include rhythm-margin(14, 14, 14, 14);
162
- white-space: pre;
163
- display: block;
164
- }
165
-
166
- pre, code, tt {
167
- font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace;
168
- }
169
-
170
- pre.code {
171
- background: #000;
172
- color: #fff;
173
- @include rhythm-font(14);
174
- @include rhythm-padding(14, 14, 14, 14);
175
- code {
176
- margin: 0;
177
- }
178
- }
179
-
180
- tt {
181
- display: block;
182
- @include rhythm-font(14);
183
- @include rhythm-margin(14, 14, 14, 14);
184
- }
185
-
@@ -1,39 +0,0 @@
1
- @import "sitges";
2
-
3
- div#flash {
4
- @include rhythm-padding(14, 14, none, 14);
5
- }
6
-
7
- /* Success, error & notice boxes for messages and errors. */
8
- div.error, div.notice, div.success,
9
- #flash_failure, #flash_success, #flash_notice, #flash_alert {
10
- border: 1px solid;
11
- color: #fff;
12
- h1, h2, h3, h4, h5, h6, p {
13
- color: #fff;
14
- }
15
- }
16
-
17
- div.error,
18
- #flash_failure,
19
- #flash_alert {
20
- border-color: darken(#B02B2C, 20%);
21
- background: #B02B2C;
22
- }
23
-
24
- div.notice,
25
- #flash_notice {
26
- border-color: darken(#356AA0, 20%);
27
- background: #356AA0;
28
- }
29
-
30
- div.success,
31
- #flash_success {
32
- border-color: darken(#73880A, 20%);
33
- background: #73880A;
34
- }
35
- .highlight {
36
- background: lighten(#356AA0, 45%);
37
- text-decoration: none;
38
- font-style: italic;
39
- }
@@ -1,54 +0,0 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/ */
2
- /* v1.0 | 20080212 */
3
-
4
- html, body, div, span, applet, object, iframe,
5
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6
- a, abbr, acronym, address, big, cite, code,
7
- del, dfn, em, font, img, ins, kbd, q, s, samp,
8
- small, strike, strong, sub, sup, tt, var,
9
- b, u, i, center,
10
- dl, dt, dd, ol, ul, li,
11
- fieldset, form, label, legend,
12
- table, caption, tbody, tfoot, thead, tr, th, td {
13
- margin: 0;
14
- padding: 0;
15
- border: 0;
16
- outline: 0;
17
- font-size: 100%;
18
- vertical-align: baseline;
19
- background: transparent;
20
- }
21
- body {
22
- line-height: 1;
23
- }
24
- ol, ul {
25
- list-style: none;
26
- }
27
- blockquote, q {
28
- quotes: none;
29
- }
30
- blockquote:before, blockquote:after,
31
- q:before, q:after {
32
- content: '';
33
- content: none;
34
- }
35
-
36
- /* remember to define focus styles! */
37
- :focus {
38
- outline: 0;
39
- }
40
-
41
- /* remember to highlight inserts somehow! */
42
- ins {
43
- text-decoration: none;
44
- }
45
- del {
46
- text-decoration: line-through;
47
- }
48
-
49
- /* tables still need 'cellspacing="0"' in the markup */
50
- table {
51
- border-collapse: collapse;
52
- border-spacing: 0;
53
- }
54
-
@@ -1,106 +0,0 @@
1
- /*
2
- Formulas ritmo vertical:
3
- (1 ÷ tamaño de fuente padre × requerido por el valor en pixel = valor en em)
4
- */
5
-
6
- $parent_size: 16;
7
- $base_size: 18;
8
-
9
- @mixin rhythm-size($w, $h, $parent_size: $parent_size) {
10
- @if $w == none {
11
- } @else {
12
- width: 1em / $parent_size * $w;
13
- }
14
-
15
- @if $h == none {
16
- } @else {
17
- height: 1em / $parent_size * $h;
18
- }
19
- }
20
-
21
- @mixin rhythm-font($s, $base_size: $base_size, $parent_size: $parent_size) {
22
- @if $s == none {
23
- } @else if $s == 1 {
24
- font-size: 1em;
25
- line-height: 1em;
26
- } @else {
27
- font-size: 1em / $parent_size * $s;
28
- line-height: 1em * $base_size / $s;
29
- }
30
- }
31
-
32
- @mixin rhythm-margin($t, $r, $b, $l, $base_size: $base_size) {
33
- @if $t == auto {
34
- margin-top: $t;
35
- } @else if $t == 0 {
36
- margin-top: $t;
37
- } @else if $t == none {
38
- } @else {
39
- margin-top: 1em * $base_size / $t;
40
- }
41
-
42
- @if $r == auto {
43
- margin-right: $r;
44
- } @else if $r == 0 {
45
- margin-right: $r;
46
- } @else if $r == none {
47
- } @else {
48
- margin-right: 1em * $base_size / $r;
49
- }
50
-
51
- @if $b == auto {
52
- margin-bottom: $b;
53
- } @else if $b == 0 {
54
- margin-bottom: $b;
55
- } @else if $b == none {
56
- } @else {
57
- margin-bottom: 1em * $base_size / $b;
58
- }
59
-
60
- @if $l == auto {
61
- margin-left: $l;
62
- } @else if $l == 0 {
63
- margin-left: $l;
64
- } @else if $l == none {
65
- } @else {
66
- margin-left: 1em * $base_size / $l;
67
- }
68
- }
69
-
70
- @mixin rhythm-padding($t, $r, $b, $l, $base_size: $base_size) {
71
- @if $t == auto {
72
- padding-top: $t;
73
- } @else if $t == 0 {
74
- padding-top: $t;
75
- } @else if $t == none {
76
- } @else {
77
- padding-top: 1em * $base_size / $t;
78
- }
79
-
80
- @if $r == auto {
81
- padding-right: $r;
82
- } @else if $r == 0 {
83
- padding-right: $r;
84
- } @else if $r == none {
85
- } @else {
86
- padding-right: 1em * $base_size / $r;
87
- }
88
-
89
- @if $b == auto {
90
- padding-bottom: $b;
91
- } @else if $b == 0 {
92
- padding-bottom: $b;
93
- } @else if $b == none {
94
- } @else {
95
- padding-bottom: 1em * $base_size / $b;
96
- }
97
-
98
- @if $l == auto {
99
- padding-left: $l;
100
- } @else if $l == 0 {
101
- padding-left: $l;
102
- } @else if $l == none {
103
- } @else {
104
- padding-left: 1em * $base_size / $l;
105
- }
106
- }
@@ -1,41 +0,0 @@
1
- @import "sitges";
2
-
3
- /* Tables */
4
-
5
- table {
6
- //table-layout: fixed;
7
- width: 100%;
8
- ul {
9
- margin-bottom: 0;
10
- margin-right: 0;
11
- margin-top: 0;
12
- font-size: 1em;
13
- }
14
- }
15
-
16
- div.table {
17
- @include rhythm-font(14);
18
- @include rhythm-margin(14, 14, 14, 14);
19
- }
20
-
21
- th {
22
- border: 1px solid #000000;
23
- font-weight: bold;
24
- text-align: left;
25
- }
26
-
27
- td {
28
- border: 1px solid #000000;
29
- }
30
-
31
- caption, th, td {
32
- padding: 1em * 1 / 4;
33
- }
34
-
35
- caption {
36
- background: #f1f1f1;
37
- }
38
-
39
- tr, td, th {
40
- vertical-align: middle;
41
- }
data/lib/tasks/.gitkeep DELETED
File without changes