sitges 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,8 @@
5
5
  This gem is depend from HAML
6
6
 
7
7
  gem "haml-rails"
8
+ gem "simple_form"
9
+ gem "compass"
8
10
 
9
11
  The basic usage is copy all stylesheets files:
10
12
 
@@ -26,5 +28,6 @@ Some modules provided by sitges:
26
28
  * Grids -> Grids from OOCSS [grids]
27
29
  * Typography -> Rhythm & Proportion from Sitges special functions. [sitges]
28
30
  * Basic rails style -> Flash notice divs. [rails]
29
- * Basic style -> [tables, lists, forms, html5, prettify]
31
+ * Form -> Forms uses compass and simple_form [forms]
32
+ * Basic style -> [tables, lists, html5, prettify]
30
33
 
@@ -174,45 +174,17 @@
174
174
  %h3 Form styles
175
175
  %ul
176
176
  %li Basic form styles
177
-
178
- = form_for '' do |f|
179
- %table
180
- %tr
181
- %td.label= f.label :version, 'Version:'
182
- %td.text_field= f.text_field :version
183
- %tr
184
- %td.label= f.label :author, 'Author:'
185
- %td.text_field= f.text_field :author
186
- %tr
187
- %td.label= f.label :pass, 'Pass:'
188
- %td.text_field= f.password_field :pass
189
- %tr
190
- %td.label= f.label :search, 'Search:'
191
- %td.text_field= f.search_field :search
192
- %tr
193
- %td.label= f.label :telephone, 'Telephone:'
194
- %td.text_field= f.telephone_field :telephone
195
- %tr
196
- %td.label= f.label :admin, 'Admin?:'
197
- %td= f.check_box :admin
198
- %tr
199
- %td.label= f.label :radio, 'Radio:'
200
- %td= f.radio_button :radio, 'yes'
201
- %tr
202
- %td.label_text_area= f.label :biography, 'Biography:'
203
- %td.text_area= f.text_area :biography
204
- %tr
205
- %td.label_text_area= f.label :date, 'Date:'
206
- %td.select= f.date_select :date, :start_year => 1995
207
- %tr
208
- %td.label_text_area= f.label :email, 'Tu correo electrónico:'
209
- %td.text_field= f.email_field :email
210
- %tr
211
- %td
212
- %td.warning_dialog ¿Por qué tengo que dar esta información?
213
- %tr
214
- %td
215
- %td.submit= f.submit "Edit this article"
177
+ %li Use simple_form gem from https://github.com/plataformatec/simple_form.git
178
+ %li And compass gem
179
+
180
+ = simple_form_for '' do |f|
181
+ = f.input :username, :hint => 'Your username please'
182
+ = f.input :password
183
+ = f.hint 'No special characters, please!'
184
+ = f.input :description, :as => :text
185
+ = f.input :accepts, :as => :radio
186
+ = f.input :date_of_birth, :as => :date, :start_year => Date.today.year - 90, :end_year => Date.today.year - 12, :discard_day => true, :order => [:month, :year], :required => false
187
+ = f.button :submit
216
188
 
217
189
  .clearfix
218
190
  %hr
@@ -1,99 +1,110 @@
1
1
  @import "sitges";
2
+ @import "compass";
2
3
 
3
4
  /* Form */
4
- /*removes dotted outline on submit buttons when clicking in firefox */
5
- input[type="submit"]::-moz-focus-inner {
6
- border: none;
7
- }
8
5
  form {
9
6
  @include rhythm-font(14);
10
7
  @include rhythm-margin(14, 14, 14, 14);
11
- table {
12
- table-layout: auto;
13
- }
14
- tr, td {
15
- border: 0 none;
16
- }
17
8
  }
18
9
  .field_with_errors {
19
10
  input, textarea, select, div.cleditorMain {
20
11
  outline: 2px solid #B02B2C;
21
12
  }
22
13
  }
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
- }
14
+ label abbr{
15
+ float: right;
36
16
  }
37
- td.warning_dialog {
38
- padding-top: 0;
39
- font-size: 11px;
17
+ span.hint {
18
+ margin: 0 0 0 90px;
19
+ display: block;
20
+ color: #3B5998;
21
+ font-size: 12px;
40
22
  }
41
- td.with_warning_dialog {
42
- padding-bottom: 0;
23
+ span.error {
24
+ margin: 0 0 0 90px;
25
+ display: block;
26
+ color: #B02B2C;
43
27
  }
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;
28
+ div.date {
29
+ margin: 5px 0 5px 0;
30
+ label.date {
31
+ display: inline-block;
32
+ vertical-align: baseline;
33
+ width: 80px;
34
+ text-align: right;
35
+ padding: 5px;
36
+ }
37
+ select {
38
+ border: 1px solid #96A6C5;
39
+ font-size: 16px;
40
+ padding: 5px;
56
41
  }
57
42
  }
58
- td.text_field {
59
- width: 90%;
43
+ div.string, div.password {
44
+ margin: 5px 0 5px 0;
60
45
  input {
61
46
  font-size: 16px;
62
- padding: 1em * 1 / 4;
47
+ padding: 5px;
63
48
  background: url("/images/input_bg.gif") repeat-x scroll center top #FFFFFF;
64
49
  border: 1px solid;
65
50
  border-color: #666666 #CCCCCC #CCCCCC;
66
51
  width: 400px;
67
52
  }
53
+ label.string, label.password {
54
+ display: inline-block;
55
+ vertical-align: baseline;
56
+ width: 80px;
57
+ text-align: right;
58
+ padding: 5px;
59
+ }
68
60
  }
69
- td.text_area {
61
+ div.text {
62
+ margin: 5px 0 5px 0;
70
63
  textarea {
71
64
  font-size: 16px;
72
- padding: 1em * 1 / 4;
65
+ padding: 5px;
73
66
  height: 200px;
74
67
  width: 400px;
75
68
  background: url("/images/input_bg.gif") repeat-x scroll center top #FFFFFF;
76
69
  border: 1px solid;
77
70
  border-color:#666666 #CCCCCC #CCCCCC;
78
71
  }
72
+ label.text {
73
+ display: inline-block;
74
+ width: 80px;
75
+ text-align: right;
76
+ vertical-align: top;
77
+ padding: 5px;
78
+ }
79
79
  }
80
- td.select {
81
- select {
82
- font-size: 16px;
80
+ div.radio {
81
+ margin: 5px 0 5px 0;
82
+ label.radio {
83
+ display: inline-block;
84
+ vertical-align: baseline;
85
+ width: 80px;
86
+ text-align: right;
83
87
  padding: 1em * 1 / 4;
84
- border: 1px solid;
85
- border-color: #666666 #CCCCCC #CCCCCC;
86
88
  }
87
89
  }
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
- }
90
+ input[type="submit"] {
91
+ background: url("/images/alert-overlay.png") repeat-x scroll 0 0 #FFB90F;
92
+ border: none;
93
+ border-bottom: 1px solid rgba(0, 0, 0, 0.2);
94
+ border-top: 3px solid rgba(255, 255, 255, 0.4);
95
+ color: #FFFFFF;
96
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
97
+ font-size: 1.4em;
98
+ font-weight: bold;
99
+ padding: 5px 30px 5px 30px;
100
+ margin: 20px 0 0 90px;
101
+ text-align: center;
102
+ @include box-shadow(rgba(0, 0, 0, 0.2), 0, 1px, 3px);
103
+ @include border-radius(5px);
104
+ @include text-shadow(rgba(0, 0, 0, 0.35), -1px, -1px, 0);
105
+ cursor: pointer;
106
+ &:focus, &:hover {
107
+ background-color: #FF9800;
108
+ color: #FFFFFF;
98
109
  }
99
110
  }
@@ -9,7 +9,7 @@ html {
9
9
  -webkit-font-smoothing: antialiased;
10
10
  }
11
11
  div#wrap {
12
- //border: 1px dashed #000000;
12
+ border: 1px dashed #000000;
13
13
  @include rhythm-size(800, none);
14
14
  @include rhythm-margin(12, auto, 12, auto);
15
15
  }
@@ -1,9 +1,5 @@
1
1
  @import "sitges";
2
2
 
3
- div#flash {
4
- @include rhythm-padding(14, 14, none, 14);
5
- }
6
-
7
3
  /* Success, error & notice boxes for messages and errors. */
8
4
  div.error, div.notice, div.success,
9
5
  #flash_failure, #flash_success, #flash_notice, #flash_alert {
@@ -1,7 +1,11 @@
1
1
  @import "sitges";
2
2
 
3
- /* Tables */
3
+ div.table {
4
+ @include rhythm-font(14);
5
+ @include rhythm-margin(14, 14, 14, 14);
6
+ }
4
7
 
8
+ /* Tables */
5
9
  table {
6
10
  //table-layout: fixed;
7
11
  width: 100%;
@@ -13,11 +17,6 @@ table {
13
17
  }
14
18
  }
15
19
 
16
- div.table {
17
- @include rhythm-font(14);
18
- @include rhythm-margin(14, 14, 14, 14);
19
- }
20
-
21
20
  th {
22
21
  border: 1px solid #000000;
23
22
  font-weight: bold;
@@ -1,5 +1,5 @@
1
1
  module Sitges
2
2
  module Rails
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sitges}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Sviridoff"]
12
- s.date = %q{2010-11-11}
12
+ s.date = %q{2010-11-14}
13
13
  s.description = %q{Style helper for Rails 3 projects.}
14
14
  s.email = ["sviridoff.mail@gmail.com"]
15
15
  s.extra_rdoc_files = [
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: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alexander Sviridoff
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-11 00:00:00 +01:00
18
+ date: 2010-11-14 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21