Commit 8e8633cdd146145fdafe9a9fbf0260bac3ae2007
1 parent
b63e4ea4
Exists in
master
and in
1 other branch
upgraded stylus. altered script/create_project script so it doesn't bomb on running the tests
Showing
8 changed files
with
291 additions
and
2 deletions
Show diff stats
@@ -0,0 +1,35 @@ | @@ -0,0 +1,35 @@ | ||
1 | +/* body */ | ||
2 | + | ||
3 | +body { | ||
4 | + background-color: white; } | ||
5 | + | ||
6 | +/* links */ | ||
7 | + | ||
8 | +a { | ||
9 | + color: white; } | ||
10 | +a:visited { | ||
11 | + color: dimgray; } | ||
12 | +a:hover { | ||
13 | + color: white; | ||
14 | + background-color: black; } | ||
15 | + | ||
16 | +/* flash */ | ||
17 | + | ||
18 | +#flash_success { | ||
19 | + background: seagreen; } | ||
20 | +#flash_failure { | ||
21 | + background: tomato; } | ||
22 | + | ||
23 | +/* errors */ | ||
24 | + | ||
25 | +.fieldWithErrors { | ||
26 | + background-color: tomato; } | ||
27 | +#errorExplanation { | ||
28 | + border-color: tomato; | ||
29 | + background-color: snow; } | ||
30 | +#errorExplanation h2 { | ||
31 | + background-color: firebrick; | ||
32 | + color: white; } | ||
33 | +#errorExplanation p { | ||
34 | + color: darkgray; } | ||
35 | + |
@@ -0,0 +1,90 @@ | @@ -0,0 +1,90 @@ | ||
1 | +/* heavily inspired by Justin French's formtastic styles */ | ||
2 | + | ||
3 | +/* fieldsets */ | ||
4 | + | ||
5 | +fieldset.inputs, fieldset.buttons { | ||
6 | + margin: 1em 0; } | ||
7 | + | ||
8 | +/* labels */ | ||
9 | + | ||
10 | +label { | ||
11 | + display: block; | ||
12 | + font-size: 1.4em; } | ||
13 | + | ||
14 | +/* instruction */ | ||
15 | + | ||
16 | +fieldset p.instruction { | ||
17 | + font-size: 1em; } | ||
18 | + | ||
19 | +/* hidden field */ | ||
20 | + | ||
21 | +fieldset div.hidden { | ||
22 | + display: none; } | ||
23 | + | ||
24 | +/* inputs */ | ||
25 | + | ||
26 | +input { | ||
27 | + vertical-align: middle; } | ||
28 | + | ||
29 | +fieldset div.string, | ||
30 | +fieldset div.numeric, | ||
31 | +fieldset div.password { | ||
32 | + margin: 0 0 2em 0; } | ||
33 | + | ||
34 | +fieldset div.string input, | ||
35 | +fieldset div.numeric input, | ||
36 | +fieldset div.text textarea { | ||
37 | + padding: 0.4em; } | ||
38 | + | ||
39 | +fieldset div.password input { | ||
40 | + font-weight: bold; } | ||
41 | + | ||
42 | +fieldset div.boolean label, | ||
43 | +fieldset div.boolean input { | ||
44 | + display: inline; } | ||
45 | + | ||
46 | +fieldset div.boolean label { | ||
47 | + margin: 0 0.5em 0 0.2em; } | ||
48 | + | ||
49 | +/* radio buttons and check boxes */ | ||
50 | + | ||
51 | +fieldset div.radios fieldset ol, | ||
52 | +fieldset div.checks fieldset ol, { | ||
53 | + margin-bottom: -0.6em; } | ||
54 | +fieldset div.radios fieldset ol li, | ||
55 | +fieldset div.checks fieldset ol li, { | ||
56 | + margin: 0.1em 0 0.5em 0; } | ||
57 | +fieldset div.radios fieldset ol li label, | ||
58 | +fieldset div.checks fieldset ol li label { | ||
59 | + float: none; } | ||
60 | +fieldset div.radios fieldset ol li label input, | ||
61 | +fieldset div.checks fieldset ol li label input, { | ||
62 | + margin-right: 0.2em; } | ||
63 | + | ||
64 | +/* dates, times, and datetimes */ | ||
65 | + | ||
66 | +fieldset div.date fieldset ol li, | ||
67 | +fieldset div.time fieldset ol li, | ||
68 | +fieldset div.datetime fieldset ol li { | ||
69 | + float: left; | ||
70 | + width: auto; | ||
71 | + margin: 0 .3em 0 0; } | ||
72 | + | ||
73 | +fieldset div.date fieldset ol li label, | ||
74 | +fieldset div.time fieldset ol li label, | ||
75 | +fieldset div.datetime fieldset ol li label { | ||
76 | + display: none; } | ||
77 | + | ||
78 | +fieldset div.date fieldset ol li label input, | ||
79 | +fieldset div.time fieldset ol li label input, | ||
80 | +fieldset div.datetime fieldset ol li label input { | ||
81 | + display: inline; | ||
82 | + margin: 0; | ||
83 | + padding: 0; } | ||
84 | + | ||
85 | +/* buttons */ | ||
86 | + | ||
87 | +fieldset.buttons input { | ||
88 | + font-size: 1.2em; | ||
89 | + padding: 1em; } | ||
90 | + |
@@ -0,0 +1,39 @@ | @@ -0,0 +1,39 @@ | ||
1 | +.clearfix:after { | ||
2 | + content: "."; | ||
3 | + display: block; | ||
4 | + height: 0; | ||
5 | + clear: both; | ||
6 | + visibility: hidden; } | ||
7 | +* html .clearfix { | ||
8 | + height: 1%; } | ||
9 | +*:first-child+html .clearfix { | ||
10 | + min-height: 1px; } | ||
11 | + | ||
12 | +.half, | ||
13 | +.quarter, | ||
14 | +.three_quarters { | ||
15 | + display: inline-block; | ||
16 | + vertical-align: top; } | ||
17 | + | ||
18 | +.middle { | ||
19 | + margin: 0 auto; } | ||
20 | + | ||
21 | +.center { | ||
22 | + text-align: center; } | ||
23 | + | ||
24 | +/* grid 960 { 480 240 120 60 30 15 5 } */ | ||
25 | + | ||
26 | +/*.grid_960 */ | ||
27 | +.grid_960 .row { | ||
28 | + width: 96em; | ||
29 | + margin: 0 auto; } | ||
30 | + | ||
31 | +.grid_960 .half { | ||
32 | + width: 48em; } | ||
33 | + | ||
34 | +.grid_960 .quarter { | ||
35 | + width: 24em; } | ||
36 | + | ||
37 | +.grid_960 .three_quarters { | ||
38 | + width: 72em; } | ||
39 | + |
@@ -0,0 +1,45 @@ | @@ -0,0 +1,45 @@ | ||
1 | +/* global defaults from http://meyerweb.com/tools/css/reset */ | ||
2 | + | ||
3 | +html, body, div, span, applet, object, iframe, | ||
4 | +h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
5 | +a, abbr, acronym, address, big, cite, code, | ||
6 | +del, dfn, em, font, img, ins, kbd, q, s, samp, | ||
7 | +small, strike, strong, sub, sup, tt, var, | ||
8 | +b, u, i, center, | ||
9 | +dl, dt, dd, ol, ul, li, | ||
10 | +fieldset, form, label, legend, | ||
11 | +table, caption, tbody, tfoot, thead, tr, th, td { | ||
12 | + margin: 0; | ||
13 | + padding: 0; | ||
14 | + border: 0; | ||
15 | + outline: 0; | ||
16 | + font-size: 100%; | ||
17 | + vertical-align: baseline; | ||
18 | + background: transparent; } | ||
19 | + | ||
20 | +body { | ||
21 | + line-height: 1; } | ||
22 | + | ||
23 | +ol, ul { | ||
24 | + list-style: none; } | ||
25 | + | ||
26 | +blockquote, q { | ||
27 | + quotes: none; } | ||
28 | + | ||
29 | +blockquote:before, blockquote:after, | ||
30 | +q:before, q:after { | ||
31 | + content: ''; | ||
32 | + content: none; } | ||
33 | + | ||
34 | +:focus { | ||
35 | + outline: 0; } | ||
36 | + | ||
37 | +ins { | ||
38 | + text-decoration: none; } | ||
39 | +del { | ||
40 | + text-decoration: line-through; } | ||
41 | + | ||
42 | +table { | ||
43 | + border-collapse: collapse; | ||
44 | + border-spacing: 0; } | ||
45 | + |
@@ -0,0 +1,73 @@ | @@ -0,0 +1,73 @@ | ||
1 | +/* | ||
2 | + Formula: | ||
3 | + base line-height / font-size = element line-height | ||
4 | + | ||
5 | + Example: | ||
6 | + base line-height: 1.8 (18px) | ||
7 | + | ||
8 | + 1.8 / 7.2em = .25 | ||
9 | + | ||
10 | + 2.1 lineheight | ||
11 | +*/ | ||
12 | + | ||
13 | +body { | ||
14 | + background-position: top left; | ||
15 | + font-size: .625em; /* 62.5% of browser default (16px) is 10px */ | ||
16 | + font-family: Lucida Sans, Arial, Helvetica,sans-serif; } | ||
17 | + | ||
18 | +h1, h2, h3, h4, h5, h6 { | ||
19 | + font-family: Georgia, "Times New Roman", Times, serif; | ||
20 | + font-weight: normal; } | ||
21 | + | ||
22 | +p { | ||
23 | + font-size: 1.4em; | ||
24 | + line-height: 1.5; | ||
25 | + margin: 0 1.5em 1.5em 0; } | ||
26 | + | ||
27 | +h1 { | ||
28 | + font-size: 4.2em; | ||
29 | + line-height: 1; | ||
30 | + margin: 0 .5em .5em 0; } | ||
31 | + | ||
32 | +h2 { | ||
33 | + font-size: 3.5em; | ||
34 | + line-height: 1.2; | ||
35 | + margin: 0 .6em .6em 0; } | ||
36 | + | ||
37 | +h3 { | ||
38 | + font-size: 2.8em; | ||
39 | + line-height: .75em; | ||
40 | + margin: 0 .75em .75em 0 } | ||
41 | + | ||
42 | +ul { | ||
43 | + list-style-type: square; | ||
44 | + margin: 0 1.5em 1.5em 1em; } | ||
45 | + | ||
46 | +ul, | ||
47 | +dl, | ||
48 | +th, | ||
49 | +td, | ||
50 | +legend { | ||
51 | + font-size: 1.4em; | ||
52 | + line-height: 1.5; } | ||
53 | + | ||
54 | +#flash_notice, #flash_success, #flash_failure { | ||
55 | + letter-spacing: .15em; | ||
56 | + padding: .5em 0; | ||
57 | + border-top: 1px dashed; | ||
58 | + border-bottom: 1px dashed; } | ||
59 | + | ||
60 | +#flash { | ||
61 | + font-size: 2.4em; | ||
62 | + width: 100%; } | ||
63 | + | ||
64 | +p, li { | ||
65 | + font-weight: lighter; | ||
66 | + font-family: Gotham, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; } | ||
67 | + | ||
68 | +a { | ||
69 | + text-decoration: none; } | ||
70 | + | ||
71 | +a:hover { | ||
72 | + text-decoration: underline; } | ||
73 | + |
script/create_project
@@ -54,11 +54,13 @@ end | @@ -54,11 +54,13 @@ end | ||
54 | 54 | ||
55 | run("git commit -a -m 'Initial commit'") | 55 | run("git commit -a -m 'Initial commit'") |
56 | run("rake db:migrate") | 56 | run("rake db:migrate") |
57 | -run("rake db:test:prepare") | 57 | +run("rake db:migrate RAILS_ENV=test") |
58 | +run("rake db:migrate RAILS_ENV=cucumber") | ||
58 | run("rake") | 59 | run("rake") |
59 | 60 | ||
60 | puts | 61 | puts |
61 | puts "If you want email, edit config/initializers/mail.rb" | 62 | puts "If you want email, edit config/initializers/mail.rb" |
63 | +puts "If you want error notifications, edit config/initializers/hoptoad.rb" | ||
62 | puts "If you want file uploads, edit config/s3.yml" | 64 | puts "If you want file uploads, edit config/s3.yml" |
63 | puts | 65 | puts |
64 | puts "When you're ready to deploy, run these commands:" | 66 | puts "When you're ready to deploy, run these commands:" |
stylus
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -Subproject commit 313c45ac55c521f273377824108fbed6a312fe25 |