From 8e8633cdd146145fdafe9a9fbf0260bac3ae2007 Mon Sep 17 00:00:00 2001 From: Dan Croak Date: Fri, 3 Jul 2009 18:55:56 -0400 Subject: [PATCH] upgraded stylus. altered script/create_project script so it doesn't bomb on running the tests --- public/stylesheets/framework/color.css | 35 +++++++++++++++++++++++++++++++++++ public/stylesheets/framework/forms.css | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/stylesheets/framework/layout.css | 39 +++++++++++++++++++++++++++++++++++++++ public/stylesheets/framework/reset.css | 45 +++++++++++++++++++++++++++++++++++++++++++++ public/stylesheets/framework/typography.css | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/stylesheets/screen.css | 6 ++++++ script/create_project | 4 +++- stylus | 1 - 8 files changed, 291 insertions(+), 2 deletions(-) create mode 100644 public/stylesheets/framework/color.css create mode 100644 public/stylesheets/framework/forms.css create mode 100644 public/stylesheets/framework/layout.css create mode 100644 public/stylesheets/framework/reset.css create mode 100644 public/stylesheets/framework/typography.css create mode 100644 public/stylesheets/screen.css delete mode 160000 stylus diff --git a/public/stylesheets/framework/color.css b/public/stylesheets/framework/color.css new file mode 100644 index 0000000..8ea9f09 --- /dev/null +++ b/public/stylesheets/framework/color.css @@ -0,0 +1,35 @@ +/* body */ + +body { + background-color: white; } + +/* links */ + +a { + color: white; } +a:visited { + color: dimgray; } +a:hover { + color: white; + background-color: black; } + +/* flash */ + +#flash_success { + background: seagreen; } +#flash_failure { + background: tomato; } + +/* errors */ + +.fieldWithErrors { + background-color: tomato; } +#errorExplanation { + border-color: tomato; + background-color: snow; } +#errorExplanation h2 { + background-color: firebrick; + color: white; } +#errorExplanation p { + color: darkgray; } + diff --git a/public/stylesheets/framework/forms.css b/public/stylesheets/framework/forms.css new file mode 100644 index 0000000..b552554 --- /dev/null +++ b/public/stylesheets/framework/forms.css @@ -0,0 +1,90 @@ +/* heavily inspired by Justin French's formtastic styles */ + +/* fieldsets */ + +fieldset.inputs, fieldset.buttons { + margin: 1em 0; } + +/* labels */ + +label { + display: block; + font-size: 1.4em; } + +/* instruction */ + +fieldset p.instruction { + font-size: 1em; } + +/* hidden field */ + +fieldset div.hidden { + display: none; } + +/* inputs */ + +input { + vertical-align: middle; } + +fieldset div.string, +fieldset div.numeric, +fieldset div.password { + margin: 0 0 2em 0; } + +fieldset div.string input, +fieldset div.numeric input, +fieldset div.text textarea { + padding: 0.4em; } + +fieldset div.password input { + font-weight: bold; } + +fieldset div.boolean label, +fieldset div.boolean input { + display: inline; } + +fieldset div.boolean label { + margin: 0 0.5em 0 0.2em; } + +/* radio buttons and check boxes */ + +fieldset div.radios fieldset ol, +fieldset div.checks fieldset ol, { + margin-bottom: -0.6em; } +fieldset div.radios fieldset ol li, +fieldset div.checks fieldset ol li, { + margin: 0.1em 0 0.5em 0; } +fieldset div.radios fieldset ol li label, +fieldset div.checks fieldset ol li label { + float: none; } +fieldset div.radios fieldset ol li label input, +fieldset div.checks fieldset ol li label input, { + margin-right: 0.2em; } + +/* dates, times, and datetimes */ + +fieldset div.date fieldset ol li, +fieldset div.time fieldset ol li, +fieldset div.datetime fieldset ol li { + float: left; + width: auto; + margin: 0 .3em 0 0; } + +fieldset div.date fieldset ol li label, +fieldset div.time fieldset ol li label, +fieldset div.datetime fieldset ol li label { + display: none; } + +fieldset div.date fieldset ol li label input, +fieldset div.time fieldset ol li label input, +fieldset div.datetime fieldset ol li label input { + display: inline; + margin: 0; + padding: 0; } + +/* buttons */ + +fieldset.buttons input { + font-size: 1.2em; + padding: 1em; } + diff --git a/public/stylesheets/framework/layout.css b/public/stylesheets/framework/layout.css new file mode 100644 index 0000000..bfe129f --- /dev/null +++ b/public/stylesheets/framework/layout.css @@ -0,0 +1,39 @@ +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; } +* html .clearfix { + height: 1%; } +*:first-child+html .clearfix { + min-height: 1px; } + +.half, +.quarter, +.three_quarters { + display: inline-block; + vertical-align: top; } + +.middle { + margin: 0 auto; } + +.center { + text-align: center; } + +/* grid 960 { 480 240 120 60 30 15 5 } */ + +/*.grid_960 */ +.grid_960 .row { + width: 96em; + margin: 0 auto; } + +.grid_960 .half { + width: 48em; } + +.grid_960 .quarter { + width: 24em; } + +.grid_960 .three_quarters { + width: 72em; } + diff --git a/public/stylesheets/framework/reset.css b/public/stylesheets/framework/reset.css new file mode 100644 index 0000000..5f9a26b --- /dev/null +++ b/public/stylesheets/framework/reset.css @@ -0,0 +1,45 @@ +/* global defaults from http://meyerweb.com/tools/css/reset */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; } + +body { + line-height: 1; } + +ol, ul { + list-style: none; } + +blockquote, q { + quotes: none; } + +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; } + +:focus { + outline: 0; } + +ins { + text-decoration: none; } +del { + text-decoration: line-through; } + +table { + border-collapse: collapse; + border-spacing: 0; } + diff --git a/public/stylesheets/framework/typography.css b/public/stylesheets/framework/typography.css new file mode 100644 index 0000000..634a0a6 --- /dev/null +++ b/public/stylesheets/framework/typography.css @@ -0,0 +1,73 @@ +/* + Formula: + base line-height / font-size = element line-height + + Example: + base line-height: 1.8 (18px) + + 1.8 / 7.2em = .25 + + 2.1 lineheight +*/ + +body { + background-position: top left; + font-size: .625em; /* 62.5% of browser default (16px) is 10px */ + font-family: Lucida Sans, Arial, Helvetica,sans-serif; } + +h1, h2, h3, h4, h5, h6 { + font-family: Georgia, "Times New Roman", Times, serif; + font-weight: normal; } + +p { + font-size: 1.4em; + line-height: 1.5; + margin: 0 1.5em 1.5em 0; } + +h1 { + font-size: 4.2em; + line-height: 1; + margin: 0 .5em .5em 0; } + +h2 { + font-size: 3.5em; + line-height: 1.2; + margin: 0 .6em .6em 0; } + +h3 { + font-size: 2.8em; + line-height: .75em; + margin: 0 .75em .75em 0 } + +ul { + list-style-type: square; + margin: 0 1.5em 1.5em 1em; } + +ul, +dl, +th, +td, +legend { + font-size: 1.4em; + line-height: 1.5; } + +#flash_notice, #flash_success, #flash_failure { + letter-spacing: .15em; + padding: .5em 0; + border-top: 1px dashed; + border-bottom: 1px dashed; } + +#flash { + font-size: 2.4em; + width: 100%; } + +p, li { + font-weight: lighter; + font-family: Gotham, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; } + +a { + text-decoration: none; } + +a:hover { + text-decoration: underline; } + diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css new file mode 100644 index 0000000..e32f588 --- /dev/null +++ b/public/stylesheets/screen.css @@ -0,0 +1,6 @@ +@import url("framework/reset.css"); +@import url("framework/typography.css"); +@import url("framework/layout.css"); +@import url("framework/forms.css"); +@import url("framework/color.css"); + diff --git a/script/create_project b/script/create_project index 594afad..151844f 100755 --- a/script/create_project +++ b/script/create_project @@ -54,11 +54,13 @@ end run("git commit -a -m 'Initial commit'") run("rake db:migrate") -run("rake db:test:prepare") +run("rake db:migrate RAILS_ENV=test") +run("rake db:migrate RAILS_ENV=cucumber") run("rake") puts puts "If you want email, edit config/initializers/mail.rb" +puts "If you want error notifications, edit config/initializers/hoptoad.rb" puts "If you want file uploads, edit config/s3.yml" puts puts "When you're ready to deploy, run these commands:" diff --git a/stylus b/stylus deleted file mode 160000 index 313c45a..0000000 --- a/stylus +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 313c45ac55c521f273377824108fbed6a312fe25 -- libgit2 0.21.2