From d3a8294d3d1cbc9be08dee09162399f858913318 Mon Sep 17 00:00:00 2001 From: Dan Croak Date: Thu, 13 Aug 2009 22:41:49 -0400 Subject: [PATCH] replaced evergreen with flutie --- app/views/layouts/application.html.erb | 2 +- config/initializers/flutie_expansion.rb | 9 +++++++++ public/flutie/stylesheets/defaults.css | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/flutie/stylesheets/forms.css | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/flutie/stylesheets/lists.css | 25 +++++++++++++++++++++++++ public/flutie/stylesheets/reset.css | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ public/flutie/stylesheets/screen.css | 0 public/flutie/stylesheets/tables.css | 23 +++++++++++++++++++++++ public/flutie/stylesheets/type.css | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/stylesheets/framework/color.css | 47 ----------------------------------------------- public/stylesheets/framework/grid.css | 46 ---------------------------------------------- public/stylesheets/framework/reset.css | 44 -------------------------------------------- public/stylesheets/framework/spacing.css | 97 ------------------------------------------------------------------------------------------------- public/stylesheets/framework/typography.css | 142 ---------------------------------------------------------------------------------------------------------------------------------------------- public/stylesheets/screen.css | 6 ------ script/create_project | 2 ++ vendor/plugins/flutie/README.textile | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/Rakefile | 41 +++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/app/controllers/flutie/styleguides_controller.rb | 23 +++++++++++++++++++++++ vendor/plugins/flutie/app/views/flutie/styleguides/show.erb | 742 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/app/views/layouts/flutie.erb | 30 ++++++++++++++++++++++++++++++ vendor/plugins/flutie/config/flutie_expansion.rb | 9 +++++++++ vendor/plugins/flutie/config/flutie_routes.rb | 7 +++++++ vendor/plugins/flutie/flutie.gemspec | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/init.rb | 1 + vendor/plugins/flutie/install.rb | 19 +++++++++++++++++++ vendor/plugins/flutie/lib/flutie.rb | 4 ++++ vendor/plugins/flutie/lib/flutie/extensions/routes.rb | 14 ++++++++++++++ vendor/plugins/flutie/public/stylesheets/defaults.css | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/public/stylesheets/forms.css | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/public/stylesheets/lists.css | 25 +++++++++++++++++++++++++ vendor/plugins/flutie/public/stylesheets/reset.css | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/public/stylesheets/screen.css | 0 vendor/plugins/flutie/public/stylesheets/tables.css | 23 +++++++++++++++++++++++ vendor/plugins/flutie/public/stylesheets/type.css | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/rails/init.rb | 1 + vendor/plugins/flutie/test/fixtures/app/views/styleguides/_one.erb | 1 + vendor/plugins/flutie/test/fixtures/app/views/styleguides/_two.erb | 1 + vendor/plugins/flutie/test/functional/styleguides_controller_test.rb | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vendor/plugins/flutie/test/test_helper.rb | 16 ++++++++++++++++ vendor/plugins/flutie/test/unit/initialization_test.rb | 18 ++++++++++++++++++ 41 files changed, 1902 insertions(+), 383 deletions(-) create mode 100644 config/initializers/flutie_expansion.rb create mode 100644 public/flutie/stylesheets/defaults.css create mode 100644 public/flutie/stylesheets/forms.css create mode 100644 public/flutie/stylesheets/lists.css create mode 100644 public/flutie/stylesheets/reset.css create mode 100644 public/flutie/stylesheets/screen.css create mode 100644 public/flutie/stylesheets/tables.css create mode 100644 public/flutie/stylesheets/type.css delete mode 100644 public/stylesheets/framework/color.css delete mode 100644 public/stylesheets/framework/grid.css delete mode 100644 public/stylesheets/framework/reset.css delete mode 100644 public/stylesheets/framework/spacing.css delete mode 100644 public/stylesheets/framework/typography.css delete mode 100644 public/stylesheets/screen.css create mode 100644 vendor/plugins/flutie/README.textile create mode 100644 vendor/plugins/flutie/Rakefile create mode 100644 vendor/plugins/flutie/app/controllers/flutie/styleguides_controller.rb create mode 100644 vendor/plugins/flutie/app/views/flutie/styleguides/show.erb create mode 100644 vendor/plugins/flutie/app/views/layouts/flutie.erb create mode 100644 vendor/plugins/flutie/config/flutie_expansion.rb create mode 100644 vendor/plugins/flutie/config/flutie_routes.rb create mode 100644 vendor/plugins/flutie/flutie.gemspec create mode 100644 vendor/plugins/flutie/init.rb create mode 100644 vendor/plugins/flutie/install.rb create mode 100644 vendor/plugins/flutie/lib/flutie.rb create mode 100644 vendor/plugins/flutie/lib/flutie/extensions/routes.rb create mode 100644 vendor/plugins/flutie/public/stylesheets/defaults.css create mode 100644 vendor/plugins/flutie/public/stylesheets/forms.css create mode 100644 vendor/plugins/flutie/public/stylesheets/lists.css create mode 100644 vendor/plugins/flutie/public/stylesheets/reset.css create mode 100644 vendor/plugins/flutie/public/stylesheets/screen.css create mode 100644 vendor/plugins/flutie/public/stylesheets/tables.css create mode 100644 vendor/plugins/flutie/public/stylesheets/type.css create mode 100644 vendor/plugins/flutie/rails/init.rb create mode 100644 vendor/plugins/flutie/test/fixtures/app/views/styleguides/_one.erb create mode 100644 vendor/plugins/flutie/test/fixtures/app/views/styleguides/_two.erb create mode 100644 vendor/plugins/flutie/test/functional/styleguides_controller_test.rb create mode 100644 vendor/plugins/flutie/test/test_helper.rb create mode 100644 vendor/plugins/flutie/test/unit/initialization_test.rb diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d698b1b..e295483 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,7 @@ CHANGEME - <%= stylesheet_link_tag 'screen', :media => 'all', :cache => true %> + <%= stylesheet_link_tag :flutie, CHANGEME, :cache => 'screen' %>
diff --git a/config/initializers/flutie_expansion.rb b/config/initializers/flutie_expansion.rb new file mode 100644 index 0000000..f8a2e9a --- /dev/null +++ b/config/initializers/flutie_expansion.rb @@ -0,0 +1,9 @@ +ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :flutie => [ + '/flutie/stylesheets/reset', + '/flutie/stylesheets/defaults', + '/flutie/stylesheets/type', + '/flutie/stylesheets/forms', + '/flutie/stylesheets/tables', + '/flutie/stylesheets/lists', + '/flutie/stylesheets/screen' +] diff --git a/public/flutie/stylesheets/defaults.css b/public/flutie/stylesheets/defaults.css new file mode 100644 index 0000000..440e645 --- /dev/null +++ b/public/flutie/stylesheets/defaults.css @@ -0,0 +1,78 @@ +body { + color: #222; + font-size: 13px; + font-family: arial, "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + color: #111; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +/* Success, error & notice boxes for messages and errors. */ +div.error, div.notice, div.success { + padding: .8em; + margin-bottom: 1em; + border: 1px solid #ddd; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +div.error { + background: #FBE3E4; + color: #D12F19; + border-color: #FBC2C4; +} +div.error a { color: #D12F19; } + +div.notice { + background: #FFF6BF; + color: #817134; + border-color: #FFD324; +} +div.notice a { color: #817134; } + +div.success { + background: #E6EFC2; + color: #529214; + border-color: #C6D880; +} +div.success a { color: #529214; } + +/* Misc classes and elements */ + +/* Use a .box to create a padded box inside a column. */ +.box { + padding: 1.5em; + margin-bottom: 1.5em; + background: #eee; +} + +/* Use this to create a horizontal ruler across a column. */ +hr { + background: #ddd; + color: #ddd; + clear: both; + float: none; + width: 100%; + height: 1px; + margin: 0 0 1.4em; + border: none; +} +hr.space { + background: #fff; + color: #fff; +} + +/* Clearfix hack I love you */ +.clearfix:after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + +.clearfix {display:inline-block;} +/* Hide from IE Mac \*/ +.clearfix {display:block;} +/* End hide from IE Mac */ diff --git a/public/flutie/stylesheets/forms.css b/public/flutie/stylesheets/forms.css new file mode 100644 index 0000000..863f6f9 --- /dev/null +++ b/public/flutie/stylesheets/forms.css @@ -0,0 +1,113 @@ +/* Forms */ + +form ol { + list-style: none; + margin: 0 0 1em 0; +} +form ol ol { margin-left: 0; } +form ol li { margin: 0 0 1em 0; } +form ol ol li { margin: 0 0 .25em 0; } + +form ol li.error input { background: #FBE3E4; } +p.inline-errors { color: #D12F19; } +form ol li.file { + background: #e1e1e1; + border: 1px solid #c8c8c8; + padding: 10px; +} + +form abbr { border-bottom: 0; } + +label { display: block; } +.required label { font-weight: bold; } +.checkbox_field label, .radio_field label { font-weight: normal; } + +a.cancel { color: #7d0d0d; } +.inline-hints { + font-size: .8em; + color: #666; + margin-bottom: .25em; +} + +/* Fieldsets */ +fieldset { + margin: 0 0 1.5em 0; + background: #f1f1f1; + padding: 1.5em 1.5em 1em 1.5em; + border: 1px solid #e3e3e3; +} +fieldset fieldset, fieldset fieldset fieldset { + padding: 0; + border: 0; +} +legend { font-weight: bold; } +fieldset.buttons { + background: inherit; + border: 0; + padding: 0; +} +fieldset.buttons li { display: inline; } +.radio fieldset { + padding: 0; + margin: 0; +} + +/* Text fields */ +input[type="text"], input[type="password"] { + width: 300px; + padding: 3px 2px; + font-size: inherit; +} +input[disabled='disabled'] { + background-color: #fcfcfc; + cursor:default; +} +input[type="checkbox"] { + margin: 0 3px 0 0; + vertical-align: middle; + position: relative; + top: -2px; +} +input[type="radio"] { + margin: 0 3px 0 0; + vertical-align: middle; + position: relative; + top: -2px; +} +.check_boxes label { + vertical-align: middle; + padding: 0; + display: inline; +} +.radio label { padding: 0; } + +/* Textareas */ +textarea { + width: 440px; + height: 200px; + margin: 0 0.5em 0.5em 0; + padding: 5px; + font-size: inherit; +} + +/* Select fields */ +fieldset .select select { + width:200px; + font-size: .9em; +} +optgroup { margin: 0 0 .5em 0; } + +/* Date & Time */ +form ol li.date ol li, form ol li.time ol li { + display: inline; +} +form ol li.datetime ol li { + display: inline-block; +} +form ol li.datetime select, form ol li.date select, form ol li.time select { + display: inline; + width: auto; +} +form ol li.date label, form ol li.time label { + display: none; +} diff --git a/public/flutie/stylesheets/lists.css b/public/flutie/stylesheets/lists.css new file mode 100644 index 0000000..3b5e4ff --- /dev/null +++ b/public/flutie/stylesheets/lists.css @@ -0,0 +1,25 @@ +/* Lists */ + +ul, ol { + margin-bottom: 1.5em; + list-style-position: inside; +} +ul { list-style-type: disc; } +ol { list-style-type: decimal; } + +dl { + margin-bottom: 1.5em; + line-height: 1.4; +} +dl dt { + font-weight: bold; + margin-top: .5em; +} +dl dd { margin-bottom: 0em;} +dd { margin-left: .5em; } + +li { line-height: 1.4; } + +ol ol, ol ul, ul ul, ul ol { + margin-left: 1em; +} diff --git a/public/flutie/stylesheets/reset.css b/public/flutie/stylesheets/reset.css new file mode 100644 index 0000000..25f9fb9 --- /dev/null +++ b/public/flutie/stylesheets/reset.css @@ -0,0 +1,49 @@ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +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; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/public/flutie/stylesheets/screen.css b/public/flutie/stylesheets/screen.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/public/flutie/stylesheets/screen.css diff --git a/public/flutie/stylesheets/tables.css b/public/flutie/stylesheets/tables.css new file mode 100644 index 0000000..e80e275 --- /dev/null +++ b/public/flutie/stylesheets/tables.css @@ -0,0 +1,23 @@ +/* Tables */ + +table { + margin-bottom: 2em; + width: 100%; +} +th { + border-bottom: 2px solid #ccc; + font-weight: bold; + text-align: left; +} +td { border-bottom: 1px solid #ddd; } +caption, th, td { + padding: 4px 10px 4px 0; +} +caption { + background: #f1f1f1; + padding: 10px 0; + margin-bottom: 1em; +} + +/* Use this if you use span-x classes on th/td. */ +table .last { padding-right: 0; } diff --git a/public/flutie/stylesheets/type.css b/public/flutie/stylesheets/type.css new file mode 100644 index 0000000..5745e01 --- /dev/null +++ b/public/flutie/stylesheets/type.css @@ -0,0 +1,90 @@ +/* Headings */ + +h1, h2, h3, h4, h5, h6 { font-weight: bold; } + +h1 { + font-size: 2.2em; + line-height: 1; + margin-bottom: 0.25em; +} +h2 { + font-size: 1.6em; + margin-bottom: 0.25em; + line-height: 1.1; +} +h3 { + font-size: 1.3em; + line-height: 1; + margin-bottom: .25em; +} +h4 { + font-size: 1.1em; + line-height: 1.25; + margin-bottom: .25em; +} +h5 { + font-size: 1em; + margin-bottom: .25em; +} +h6 { + font-size: 1em; + margin-bottom: .25em; +} + +/* Text elements */ + +p.last { margin-bottom: 0; } +p img { + float: left; + margin: 1.5em 1.5em 1.5em 0; + padding: 0; +} +p img.top { margin-top: 0; } /* Use this if the image is at the top of the

. */ +img { margin: 0 0 1.5em; } + +abbr, acronym { + border-bottom: 1px dotted #666; + cursor: help; +} +address { + margin-top: 1.5em; + font-style: italic; +} +del { color:#666; } + +a, a:link { + color: #1a4882; + text-decoration: underline; +} +a:visited { color: #1a4882; } +a:hover { color: #052246; } +a:active, a:focus { color: #1a4882; } + +blockquote { + margin: 1.5em 0; + color: #666; + font-style: italic; + padding-left: 1em; + border-left: 4px solid #d1d1d1; +} +strong { font-weight: bold; } +em, dfn { font-style: italic; } +dfn { font-weight: bold; } +pre, code { + margin: 1.5em 0; + white-space: pre; +} +pre, code, tt { + font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace; + line-height: 1.5; +} +pre.code { + background: #000; + color: #fff; + padding: 20px; +} +tt { + display: block; + margin: 1.5em 0; + line-height: 1.5; +} diff --git a/public/stylesheets/framework/color.css b/public/stylesheets/framework/color.css deleted file mode 100644 index dcec1e6..0000000 --- a/public/stylesheets/framework/color.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - We use CSS color names by default for readability. - http://www.w3schools.com/css/css_colorsfull.asp - - It is expected the designer(s) will pick a scheme that may include hex colors. - http://colors.napcsweb.com/colorschemer - - We prefer off-white & off-black because computer screens - have high black/white contrast. -*/ - -/* body */ - -body { - background-color: snow; } - -/* links */ - -a { - color: midgnightblue; } -a:visited { - color: dimgray; } - -/* flash */ - -#flash_success { - background: seagreen; } -#flash_failure { - color: beige; - background: firebrick; } -#flash_notice { - color: snow; - background: dimgray; } - -/* errors */ - -.fieldWithErrors { - background-color: tomato; } -#errorExplanation { - border-color: tomato; - background-color: snow; } -#errorExplanation h2 { - background-color: firebrick; - color: floralwhite; } -#errorExplanation p { - color: darkgray; } - diff --git a/public/stylesheets/framework/grid.css b/public/stylesheets/framework/grid.css deleted file mode 100644 index 0c6eb33..0000000 --- a/public/stylesheets/framework/grid.css +++ /dev/null @@ -1,46 +0,0 @@ -/* - grid - - Every column can be divided into two, three, four and five parts. - Idea from http://code.google.com/p/malo -*/ - -.main { - margin: 0 auto; - width: 96em; } - -.grid { - float: left; - display: inline; - *margin-left: -0.04em; } /* IE margin hack */ - -.grid .whole { - width: 100%; } - -.grid .one_fifth { - width: 20% } - -.grid .one_fourth { - width: 25%; } - -.grid .one_third { - width: 33.33% } - -.grid .two_fifths { - width: 40%; } - -.grid .one_half { - width: 50%; } - -.grid .three_fifths { - width: 60% } - -.grid .two_thirds { - width: 66.66%; } - -.grid .three_quarters { - width: 75%; } - -.grid .four_fifths { - width: 80%; } - diff --git a/public/stylesheets/framework/reset.css b/public/stylesheets/framework/reset.css deleted file mode 100644 index 73b05d0..0000000 --- a/public/stylesheets/framework/reset.css +++ /dev/null @@ -1,44 +0,0 @@ -/* http://meyerweb.com/eric/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/spacing.css b/public/stylesheets/framework/spacing.css deleted file mode 100644 index 0db81da..0000000 --- a/public/stylesheets/framework/spacing.css +++ /dev/null @@ -1,97 +0,0 @@ -p { - padding: 0.4em 0; } - -/* flashes & errors */ - -#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { - padding: 0.6em; } - -/* fieldsets */ - -fieldset.inputs, fieldset.buttons { - margin: 1em 0; } - -/* labels */ - -label { - display: block; - font-size: 1.4em; } - -/* hidden field */ - -fieldset div.hidden { - display: none; } - -/* inputs */ - -input { - vertical-align: middle; } - -fieldset div.string, -fieldset div.numeric, -fieldset div.password, -fieldset div.text, -fieldset div.boolean { - margin: 0 0 1em 0; } - -fieldset div.string label, -fieldset div.numeric label, -fieldset div.password label, -fieldset div.text label { - padding: 0.2em 0; } - -fieldset div.string input, -fieldset div.numeric input, -fieldset div.password input, -fieldset div.text textarea { - padding: 0.4em; } - -fieldset div.boolean label { - display: inline; - margin: 0.2em; } - -fieldset div.boolean input { - margin: 0; - vertical-align: top; } - -/* 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 { - padding: 1em; } - diff --git a/public/stylesheets/framework/typography.css b/public/stylesheets/framework/typography.css deleted file mode 100644 index 50894bb..0000000 --- a/public/stylesheets/framework/typography.css +++ /dev/null @@ -1,142 +0,0 @@ -/* - scale - - Use the classic typographer's scale: - 6,7,8,9,10,11,12,14,16,18,21,24,36,48,60,72 - - We use ems for font size. - - Our typographical math is made easier by Richard Rutter's 62.5% trick: - http://www.clagnut.com/blog/348/ - - 16 pixels is 1.6em. 18 pixels is 1.8em. 9 pixels is 0.9em. - - Inheritance slightly complicates the math, but there's a simple formula: - - child pixels / parent pixels = child ems -*/ - -body { - font-size: .625em; } - -h1 { - font-size: 4.8em; } - -h2 { - font-size: 3.6em; } - -h3 { - font-size: 2.4em; } - -h4 { - font-size: 2.1em; } - -h5 { - font-size: 1.8em; } - -h6 { - font-size: 1.6em; } - -#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { - font-size: 1.6em; } - -p, ul, dl, th, td, legend { - font-size: 1.4em; } - -fieldset.buttons input { - font-size: 1.2em; } - -fieldset p.instruction { - font-size: 1em; } - -/* typeface */ - -body { - font-family: Verdana, "Lucida Grande", Lucida, Arial, sans-serif; } - -h1, h2, h3, h4, h5, h6 { - font-family: Georgia, "Times New Roman", Times, serif; } - -pre, code { - font-family: Monaco, "DejaVu Sans", Courier, "Courier New", monospace; } - -/* weighting */ - -h1, h2, h3, h4, h5, h6 { - font-weight: normal; } - -p, ul, li, dl, th, td, legend { - font-weight: lighter; } - -#flash_notice, #flash_success, #flash_failure, #errorExplanation ul li { - font-weight: bold; } - -/* - leading - - d. The space between lines of type. - - Blocks of text usually need positive leading. - Headers usually need less leading. - - Darker faces usually need more lead than lighter ones. - Sans serif type usually needs more lead then serif type. - - Leading is set with line-height. - line-height can be (and should be) set with a unit-less integer. - We use the unit-less integer to ensure line-height scales with text. -*/ - -h1 { - line-height: 1.0; } - -h2 { - line-height: 1.2; } - -h3 { - line-height: 1.4; } - -h4 { - line-height: 1.6; } - -h5 { - line-height: 1.6; } - -h6, p { - line-height: 1.8; } - -ul, dl, th, td, legend { - line-height: 1.6; } - -/* justification */ - -body { - text-align: left; } - -/* decoration */ - -ul { - list-style-position: outside; - list-style-type: square; } - -a, a:visited, a:link { - text-decoration: none; } - -a:hover { - text-decoration: underline; } - -th { - text-transform: uppercase; } - -fieldset div.password input { - font-weight: bold; } - -/* - the measure - - d. The length of a single line of text. - - We use ems to set the width of blocks of text. - Typically, between 30 and 50 ems is recommended for optimal readibility. -*/ - diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css deleted file mode 100644 index 466d441..0000000 --- a/public/stylesheets/screen.css +++ /dev/null @@ -1,6 +0,0 @@ -@import url("framework/reset.css"); -@import url("framework/typography.css"); -@import url("framework/color.css"); -@import url("framework/grid.css"); -@import url("framework/spacing.css"); - diff --git a/script/create_project b/script/create_project index 4e27d75..3c38dd7 100755 --- a/script/create_project +++ b/script/create_project @@ -88,6 +88,8 @@ if not_installed?("rubaidh-google_analytics") run "sudo gem install rubaidh-google_analytics --version='1.1.4'" end +run("sudo touch public/stylesheets/#{project_name}.css") + run("sudo touch log/development.log") run("sudo chmod 0666 log/development.log") run("sudo touch log/test.log") diff --git a/vendor/plugins/flutie/README.textile b/vendor/plugins/flutie/README.textile new file mode 100644 index 0000000..47b88c9 --- /dev/null +++ b/vendor/plugins/flutie/README.textile @@ -0,0 +1,82 @@ +h1. Flutie + +Basic, default styles for rails applications + +h2. Installation + +Flutie is a Rails engine. It works with versions of Rails greater than 2.3. + +Flutie is recommended to be run as a plugin so that the automatic installer is run. + +script/plugin install git@github.com:thoughtbot/flutie.git + +The installer will copy the Flutie stylesheets into public/flutie/stylesheets + +Once Flutie is installed, with your application running (not in production environment) you can browse to /styleguide. This will present you with many standard markup elements that are present in a Rails application, in your default application layout. + +Click on the "Default styles" link to view the same markup with a barebones layout that only contains the Flutie stylesheets. Click on "Application styles" to view the markup in your application layout. + +h2. Usage + +Flutie registers a :flutie shortcut for stylesheets, so in your layout you can do... + + <%= stylesheet_link_tag :flutie, 'admin', :cache => true %> + +...this will include all the flutie stylesheets, then the 'admin' stylesheet, and it will cache them all into one file. + +To add custom styles to the styleguide add partials to the app/views/styleguides directory. For example: + +bc. app/views/styleguides/_todo_item.erb: + +bc..

    +
  1. This is a todo item
  2. +
+ +p. Plugin authors can also add to the styleguide by ensuring that their view path +is in ActionController::Base.view_paths and by placing a partial under the +styleguides directory. For example: + +bc. ActionController::Base.append_view_path(File.join(File.dirname(__FILE__), 'views')) + +bc. my_awesome_plugin/views/styleguides/_pagination.erb: + +bc.. + +h2. Gem Installation + +You can also install Flutie as a gem, but then you'll need to run the install task manually. + +In config/environment.rb: + +
+config.gem "thoughtbot-flutie", 
+  :lib     => 'flutie', 
+  :source  => 'http://gems.github.com', 
+  :version => '1.0.0'
+
+ +Vendor the gem: + +
+rake gems:install
+rake gems:unpack
+
+ +Run the installer: + +
+ruby vendor/gems/thoughtbot-flutie-1.0.0/install.rb
+
+ +h2. + +h2. Authors + +Flutie was written by thoughtbot, inc. + +h2. Suggestions, Bugs, Refactoring? + +Fork away and create a "Github Issue":http://github.com/thoughtbot/flutie/issues. Please don't send pull requests. diff --git a/vendor/plugins/flutie/Rakefile b/vendor/plugins/flutie/Rakefile new file mode 100644 index 0000000..b985106 --- /dev/null +++ b/vendor/plugins/flutie/Rakefile @@ -0,0 +1,41 @@ +# encoding: utf-8 + +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +desc 'Default: run unit tests.' +task :default => :test + +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = true +end + +Rake::RDocTask.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'Flutie' + rdoc.options << '--line-numbers' << '--inline-source' + rdoc.rdoc_files.include('README') + rdoc.rdoc_files.include('lib/**/*.rb') +end + +gem_spec = Gem::Specification.new do |gem_spec| + gem_spec.name = "flutie" + gem_spec.version = "1.0" + gem_spec.summary = "style defaults" + gem_spec.email = "support@thoughtbot.com" + gem_spec.homepage = "http://github.com/thoughtbot/flutie" + gem_spec.description = "Rails authentication with email & password." + gem_spec.authors = ["thoughtbot"] + gem_spec.files = FileList["[A-Z]*", "{app,config,lib,rails}/**/*"] +end + +desc "Generate a gemspec file" +task :gemspec do + File.open("#{gem_spec.name}.gemspec", 'w') do |f| + f.write gem_spec.to_yaml + end +end diff --git a/vendor/plugins/flutie/app/controllers/flutie/styleguides_controller.rb b/vendor/plugins/flutie/app/controllers/flutie/styleguides_controller.rb new file mode 100644 index 0000000..a464990 --- /dev/null +++ b/vendor/plugins/flutie/app/controllers/flutie/styleguides_controller.rb @@ -0,0 +1,23 @@ +class Flutie::StyleguidesController < ApplicationController + + unloadable + + def show + @styleguides = styleguides + render :layout => "flutie" if params[:flutie] == "true" + end + + private + + def styleguides + all_styleguide_partials = ActionController::Base.view_paths.map do |view_path| + styleguide_path = File.join(view_path, 'styleguides') + if File.exists?(styleguide_path) + Dir.glob(styleguide_path + '/_*.*') + else + nil + end + end + all_styleguide_partials.flatten.compact + end +end diff --git a/vendor/plugins/flutie/app/views/flutie/styleguides/show.erb b/vendor/plugins/flutie/app/views/flutie/styleguides/show.erb new file mode 100644 index 0000000..1f9f0d2 --- /dev/null +++ b/vendor/plugins/flutie/app/views/flutie/styleguides/show.erb @@ -0,0 +1,742 @@ +
+
+ <% if params[:flutie] -%> + <%= link_to "Application Styles", :flutie => false %> + <% else -%> + <%= link_to "Default Styles", :flutie => true %> + <% end -%> +
+ +

This is an example page of our basic styles

+

This is an h2 level heading

+ +

Wolbachia pipientis is a maternally transmitted obligate intracellular bacterium that chronically infects thousands of insect species, as well as a range of other arthropods and filarial nematodes. Wolbachia bacteria can induce various reproductive abnormalities in hosts that promote the bacteria's vertical transmission and spread. The discordance of host and Wolbachia phylogenies indicates that these bacteria have moved between host lineages on multiple occasions during their evolutionary history, although the mechanisms that facilitate the transfer of Wolbachia are not well understood. The success of such host shifts is inherently reliant on the ability of the bacteria to adapt to new intracellular environments.

+ +

The experimental transfer of Wolbachia between host species (transinfection) has proved technically challenging, and the success of such experiments is difficult to predict. Despite an increasing number of reports that document Wolbachia transinfection, many attempts to experimentally infect host species are unsuccessful due to poor maternal transmission rates in the novel host (40). In some cases, transferred strains are extremely stable and maternally inherited at very high rates. This situation occurs primarily when Wolbachia is transferred within or between closely related species in a family or genus. In other cases, the infecting strain appears to be poorly adapted to its new host, showing fluctuating infection densities and various degrees of transovarial transmission. The result is often the loss of infection within a few host generations. Not surprisingly, Wolbachia infections tend to be more susceptible to loss when they have been transferred between phylogenetically distant hosts (17, 35). Similarly, those species that do not naturally harbor Wolbachia can be especially challenging to successfully transinfect.

+ +
+

Blockquoted text. Not too long ago, two friends of mine were talking to a Cuban refugee, a businessman who had escaped from Castro, and in the midst of his story one of my friends turned to the other and said, "We don't know how lucky we are." And the Cuban stopped and said, "How lucky you are? I had someplace to escape to." And in that sentence he told us the entire story. If we lose freedom here, there's no place to escape to. This is the last stand on earth.

+
+ +

This is an h3 level heading

+

Senator Humphrey last week charged that Barry Goldwater, as President, would seek to eliminate farmers. He should do his homework a little better, because he'll find out that we've had a decline of 5 million in the farm population under these government programs. He'll also find that the Democratic administration has sought to get from Congress [an] extension of the farm program to include that three-fourths that is now free. He'll find that they've also asked for the right to imprison farmers who wouldn't keep books as prescribed by the federal government. The Secretary of Agriculture asked for the right to seize farms through condemnation and resell them to other individuals. And contained in that same program was a provision that would have allowed the federal government to remove 2 million farmers from the soil.

+ +
+
+
+ +

This is an h1 heading

+

This is an h2 heading

+

This is an h3 heading

+

This is an h4 heading

+
This is an h5 heading
+
This is an h6 heading
+ +
+
+
+ +

This is an h1 heading. It's extremely long and will undoubtedly wrap on a line or two by the time it's completely and utterly finished in ultimate perpetuity.

+

And this is some text in a paragraph below it. Looks good. To understand what is really going on in a colony of ants or bees, Dr. Dornhaus, an assistant professor of ecology and evolutionary biology at the University of Arizona, tracks the little creatures individually — hence the paint and the numbers. Individual ants, she said, have “their own brains and legs, as well as complex and flexible behaviors.” She continues, “Each ant’s behavior and the rules under which it operates generate a pattern for the colony, so it’s crucial to discover its individual cognitive skill.”

+

This is an h2 heading. It's also far too long for a typical headline but we need to know what it will look like when it wraps. I'm sure you understand. Don't read too far in to it, if at all possible.

+

And this is some text in a paragraph below it. The study identifies that there are two scenarios in which a group can act as a unit. The first is when all the members are very closely related, and carry the same genes, so ensuring their genes are passed on to the next generation. The second is when the group's behaviour is controlled by a form of policing -in honey bee hives, for example, any egg not laid by the queen is destroyed by worker bees, to ensure only the queen's offspring survive. Both methods ensure that all the individuals involved are united in a common purpose.

+

This is an h3 heading that, as you can probably imagine, is going to be much too long than is typically desired but you have to understand there is a perfectly good reason.

+

And this is some text in a paragraph below it. Dr Andy Gardner, from the School of Biological Sciences at the University of Edinburgh, said: "We often see animals appearing to move in unison, such as bison or fish. However, what looks like a team effort is in fact each animal jostling to get to the middle of the group to evade predators.

+

This is an h4 heading

+

And this is some text in a paragraph below it. Looks good.Dr. Dornhaus is breaking new ground in her studies of whether the efficiency of ant society, based on a division of labor among ant specialists, is important to their success. To do that, she said, I briefly anesthetized 1,200 ants, one by one, and painted them using a single wire-size brush, with model airplane paint — Rally Green, Racing Red, Daytona Yellow.

+ +

After recording their behavior with two video cameras aiming down on an insect-size stage, she analyzed 300 hours of videotape of the ants in action. She discovered behavior more worthy of Aesop’s grasshopper than the proverbial industrious ants.

+ + +

List styles

+ +
    +
  • Unordered list test
  • +
  • Another list element. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
  • +
  • Yet another element in the list
  • +
  • Some long text. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
  • +
+
    +
  1. Ordered list test
  2. +
  3. Another list element
  4. +
  5. Yet another element in the list
  6. +
  7. How many things do you really need in a list
  8. +
+ +
    +
  1. Outer Ordered list item
  2. +
  3. Outer Ordered list item +
      +
    • Nested Unordered list item
    • +
    • Nested Unordered list item +
        +
      1. Inner Nested Ordered list item
      2. +
      3. Inner Nested Ordered list item
      4. +
      +
    • +
    +
  4. +
  5. Outer Ordered list item
  6. +
  7. Outer Ordered list item +
      +
    1. Nested Ordered list item
    2. +
    3. Nested Ordered list item +
        +
      • Inner Nested Unordered list item
      • +
      • Inner Nested Unordered list item
      • +
      +
    4. +
    +
  8. +
+ +
+
definition list dt
+
definition list dd
+
definition list dt
+
definition list dd
+
definition list dt
+
definition list dd one
+
definition list dd two
+
+ + + + +

Basic form styles

+ +
+
+
Simple sample form
+ +
    +
  1. + + +

    this is some hint text

    +
  2. +
  3. + + +

    You need to be an admin to edit this

    +
  4. +
  5. + + +
  6. + +
  7. + + +

    can't be blank

    +
  8. + +
  9. + + +
  10. + +
  11. + + +
  12. + +
  13. + + +
  14. +
+ +
+ +
+
Select, checkboxes, lists
+ +
    +
  1. + + +

    this is some hint text

    +
  2. + +
  3. + + +
  4. + +
  5. + + +

    can't be blank

    +
  6. + +
  7. +
    +
    + Radio Buttons +
    +
      +
    1. + +
    2. +
    3. + +
    4. +
    5. + +
    6. +
    7. + +
    8. +
    +
    +

    this is some hint text

    +
  8. + +
  9. +
    +
    Checkboxes
    +
      +
    1. + +
    2. +
    3. + +
    4. +
    5. + +
    6. +
    7. + +
    8. +
    +
    +
  10. + +
  11. +
    +
    Date and Time Selector
    +
      +
    1. + + +
    2. +
    3. + + +
    4. +
    5. + + +
    6. +
    7. + + +
    8. +
    9. + + +
    10. +
    +
    +
  12. + +
  13. +
    +
    Date Selector
    +
      +
    1. + + +
    2. +
    3. + + +
    4. +
    5. + + +
    6. +
    +
    +
  14. + +
  15. +
    +
    Time Selector
    +
      +
    1. + + +
    2. +
    3. + : +
    4. +
    5. + + +
    6. +
    +
    +
  16. + +
+
+ +
+
    +
  1. + +
  2. +
  3. + Cancel +
  4. +
+
+ +
+ +

Miscellaneous Styles

+ +
+ This is a <div> with the class .error. +
+
+ This is a <div> with the class .notice. +
+
+ This is a <div> with the class .success. +
+ +

+ <strong>
+ <ins> inserted
+ <del> deleted
+ <dfn> dfn
+ <em> emphasis
+

+

+ <a> anchor
+ <a> a + href
+

+

+ <abbr> abbr - extended text when mouseover.
+ <acronym> acronym - extended text when mouseover.
+

+
+ <address>
+ Donald Duck
+ Box 555
+ Disneyland +
+ +

Table Styles

+ + + + + + + + + + + + + +
Table Header OneTable Header Two
TD OneTD Two
TD colspan 2
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table Header OneTable Header TwoTable Header OneTable Header Two
tfoot footer
TD OneTD TwoTD OneTD Two
TD OneTD TwoTD OneTD Two
TD OneTD TwoTD OneTD Two
TD OneTD TwoTD OneTD Two
+ +

Code Styles

+ +
<pre>
+What light
+    through yonder window breaks
+ +<code> +User.new + +
<pre class="code"><code>
+class User < ActiveRecord::Base
+  has_many :groups
+  belongs_to :account
+
+  def name
+    [first_name, last_name].join(' ')
+  end
+end
+ + <tt> + This tt text should be monospaced + and + wrap as if + one line of text + even though the code has newlines, spaces, and tabs. + It should be the same size as <p> text. + + +
+

Additional Styleguides

+
+ +<% @styleguides.each do |styleguide| %> + <%= render :file => styleguide %> +<% end %> + +
diff --git a/vendor/plugins/flutie/app/views/layouts/flutie.erb b/vendor/plugins/flutie/app/views/layouts/flutie.erb new file mode 100644 index 0000000..05f2e91 --- /dev/null +++ b/vendor/plugins/flutie/app/views/layouts/flutie.erb @@ -0,0 +1,30 @@ + + + + + <%= stylesheet_link_tag :flutie %> + Flutie v1 + + + + + + +
+ <%= yield %> +
+ + diff --git a/vendor/plugins/flutie/config/flutie_expansion.rb b/vendor/plugins/flutie/config/flutie_expansion.rb new file mode 100644 index 0000000..f8a2e9a --- /dev/null +++ b/vendor/plugins/flutie/config/flutie_expansion.rb @@ -0,0 +1,9 @@ +ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :flutie => [ + '/flutie/stylesheets/reset', + '/flutie/stylesheets/defaults', + '/flutie/stylesheets/type', + '/flutie/stylesheets/forms', + '/flutie/stylesheets/tables', + '/flutie/stylesheets/lists', + '/flutie/stylesheets/screen' +] diff --git a/vendor/plugins/flutie/config/flutie_routes.rb b/vendor/plugins/flutie/config/flutie_routes.rb new file mode 100644 index 0000000..d8e89c0 --- /dev/null +++ b/vendor/plugins/flutie/config/flutie_routes.rb @@ -0,0 +1,7 @@ +ActionController::Routing::Routes.draw do |map| + + map.resource :styleguide, + :controller => 'flutie/styleguides', + :only => [:show] + +end diff --git a/vendor/plugins/flutie/flutie.gemspec b/vendor/plugins/flutie/flutie.gemspec new file mode 100644 index 0000000..b784507 --- /dev/null +++ b/vendor/plugins/flutie/flutie.gemspec @@ -0,0 +1,69 @@ +--- !ruby/object:Gem::Specification +name: flutie +version: !ruby/object:Gem::Version + version: 0.6.9 +platform: ruby +authors: +- thoughtbot +autorequire: +bindir: bin +cert_chain: [] + +date: 2009-07-24 00:00:00 -04:00 +default_executable: +dependencies: [] + +description: Default application styles +email: support@thoughtbot.com +executables: [] + +extensions: [] + +extra_rdoc_files: [] + +files: +- LICENSE +- Rakefile +- README.textile +- app/controllers +- app/controllers/flutie +- app/controllers/flutie/styleguides_controller.rb +- app/views +- app/views/styleguides +- app/views/styleguides/show.html.erb +- config/flutie_routes.rb +- lib/flutie +- lib/flutie/extensions +- lib/flutie/extensions/routes.rb +- lib/flutier.rb +- rails/init.rb +has_rdoc: true +homepage: http://github.com/thoughtbot/flutie +licenses: [] + +post_install_message: +rdoc_options: [] + +require_paths: +- lib +required_ruby_version: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: "0" + version: +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: "0" + version: +requirements: [] + +rubyforge_project: +rubygems_version: 1.3.4 +signing_key: +specification_version: 3 +summary: Default application styles +test_files: [] + diff --git a/vendor/plugins/flutie/init.rb b/vendor/plugins/flutie/init.rb new file mode 100644 index 0000000..dff8ccd --- /dev/null +++ b/vendor/plugins/flutie/init.rb @@ -0,0 +1 @@ +require 'flutie' diff --git a/vendor/plugins/flutie/install.rb b/vendor/plugins/flutie/install.rb new file mode 100644 index 0000000..4c59cb4 --- /dev/null +++ b/vendor/plugins/flutie/install.rb @@ -0,0 +1,19 @@ +## +## Copy over asset files (javascript/css/images) from the plugin directory to public/ +## + +require 'fileutils' + +def copy_files(source_path, destination_path, directory) + source, destination = File.join(directory, source_path), File.join(RAILS_ROOT, destination_path) + FileUtils.mkdir_p(destination, :verbose => true) unless File.exist?(destination) + FileUtils.cp_r(source, destination, :verbose => true) +end + +directory = File.dirname(__FILE__) + +# Copy the flutie stylesheets into rails_root/public/flutie +copy_files("/public/stylesheets", "/public/flutie", directory) + +# Copy the stylesheet expansion into rails_root/config/initializers +copy_files("/config/flutie_expansion.rb", "/config/initializers", directory) diff --git a/vendor/plugins/flutie/lib/flutie.rb b/vendor/plugins/flutie/lib/flutie.rb new file mode 100644 index 0000000..6860d90 --- /dev/null +++ b/vendor/plugins/flutie/lib/flutie.rb @@ -0,0 +1,4 @@ +module Flutie +end + +require 'flutie/extensions/routes' diff --git a/vendor/plugins/flutie/lib/flutie/extensions/routes.rb b/vendor/plugins/flutie/lib/flutie/extensions/routes.rb new file mode 100644 index 0000000..97e0b71 --- /dev/null +++ b/vendor/plugins/flutie/lib/flutie/extensions/routes.rb @@ -0,0 +1,14 @@ +if defined?(ActionController::Routing::RouteSet) && defined?(Rails) && !Rails.env.production? + class ActionController::Routing::RouteSet + def load_routes_with_flutie! + lib_path = File.dirname(__FILE__) + flutie_routes = File.join(lib_path, *%w[.. .. .. config flutie_routes.rb]) + unless configuration_files.include?(flutie_routes) + add_configuration_file(flutie_routes) + end + load_routes_without_flutie! + end + + alias_method_chain :load_routes!, :flutie + end +end diff --git a/vendor/plugins/flutie/public/stylesheets/defaults.css b/vendor/plugins/flutie/public/stylesheets/defaults.css new file mode 100644 index 0000000..440e645 --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/defaults.css @@ -0,0 +1,78 @@ +body { + color: #222; + font-size: 13px; + font-family: arial, "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; +} + +h1, h2, h3, h4, h5, h6 { + color: #111; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +/* Success, error & notice boxes for messages and errors. */ +div.error, div.notice, div.success { + padding: .8em; + margin-bottom: 1em; + border: 1px solid #ddd; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +div.error { + background: #FBE3E4; + color: #D12F19; + border-color: #FBC2C4; +} +div.error a { color: #D12F19; } + +div.notice { + background: #FFF6BF; + color: #817134; + border-color: #FFD324; +} +div.notice a { color: #817134; } + +div.success { + background: #E6EFC2; + color: #529214; + border-color: #C6D880; +} +div.success a { color: #529214; } + +/* Misc classes and elements */ + +/* Use a .box to create a padded box inside a column. */ +.box { + padding: 1.5em; + margin-bottom: 1.5em; + background: #eee; +} + +/* Use this to create a horizontal ruler across a column. */ +hr { + background: #ddd; + color: #ddd; + clear: both; + float: none; + width: 100%; + height: 1px; + margin: 0 0 1.4em; + border: none; +} +hr.space { + background: #fff; + color: #fff; +} + +/* Clearfix hack I love you */ +.clearfix:after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + +.clearfix {display:inline-block;} +/* Hide from IE Mac \*/ +.clearfix {display:block;} +/* End hide from IE Mac */ diff --git a/vendor/plugins/flutie/public/stylesheets/forms.css b/vendor/plugins/flutie/public/stylesheets/forms.css new file mode 100644 index 0000000..863f6f9 --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/forms.css @@ -0,0 +1,113 @@ +/* Forms */ + +form ol { + list-style: none; + margin: 0 0 1em 0; +} +form ol ol { margin-left: 0; } +form ol li { margin: 0 0 1em 0; } +form ol ol li { margin: 0 0 .25em 0; } + +form ol li.error input { background: #FBE3E4; } +p.inline-errors { color: #D12F19; } +form ol li.file { + background: #e1e1e1; + border: 1px solid #c8c8c8; + padding: 10px; +} + +form abbr { border-bottom: 0; } + +label { display: block; } +.required label { font-weight: bold; } +.checkbox_field label, .radio_field label { font-weight: normal; } + +a.cancel { color: #7d0d0d; } +.inline-hints { + font-size: .8em; + color: #666; + margin-bottom: .25em; +} + +/* Fieldsets */ +fieldset { + margin: 0 0 1.5em 0; + background: #f1f1f1; + padding: 1.5em 1.5em 1em 1.5em; + border: 1px solid #e3e3e3; +} +fieldset fieldset, fieldset fieldset fieldset { + padding: 0; + border: 0; +} +legend { font-weight: bold; } +fieldset.buttons { + background: inherit; + border: 0; + padding: 0; +} +fieldset.buttons li { display: inline; } +.radio fieldset { + padding: 0; + margin: 0; +} + +/* Text fields */ +input[type="text"], input[type="password"] { + width: 300px; + padding: 3px 2px; + font-size: inherit; +} +input[disabled='disabled'] { + background-color: #fcfcfc; + cursor:default; +} +input[type="checkbox"] { + margin: 0 3px 0 0; + vertical-align: middle; + position: relative; + top: -2px; +} +input[type="radio"] { + margin: 0 3px 0 0; + vertical-align: middle; + position: relative; + top: -2px; +} +.check_boxes label { + vertical-align: middle; + padding: 0; + display: inline; +} +.radio label { padding: 0; } + +/* Textareas */ +textarea { + width: 440px; + height: 200px; + margin: 0 0.5em 0.5em 0; + padding: 5px; + font-size: inherit; +} + +/* Select fields */ +fieldset .select select { + width:200px; + font-size: .9em; +} +optgroup { margin: 0 0 .5em 0; } + +/* Date & Time */ +form ol li.date ol li, form ol li.time ol li { + display: inline; +} +form ol li.datetime ol li { + display: inline-block; +} +form ol li.datetime select, form ol li.date select, form ol li.time select { + display: inline; + width: auto; +} +form ol li.date label, form ol li.time label { + display: none; +} diff --git a/vendor/plugins/flutie/public/stylesheets/lists.css b/vendor/plugins/flutie/public/stylesheets/lists.css new file mode 100644 index 0000000..3b5e4ff --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/lists.css @@ -0,0 +1,25 @@ +/* Lists */ + +ul, ol { + margin-bottom: 1.5em; + list-style-position: inside; +} +ul { list-style-type: disc; } +ol { list-style-type: decimal; } + +dl { + margin-bottom: 1.5em; + line-height: 1.4; +} +dl dt { + font-weight: bold; + margin-top: .5em; +} +dl dd { margin-bottom: 0em;} +dd { margin-left: .5em; } + +li { line-height: 1.4; } + +ol ol, ol ul, ul ul, ul ol { + margin-left: 1em; +} diff --git a/vendor/plugins/flutie/public/stylesheets/reset.css b/vendor/plugins/flutie/public/stylesheets/reset.css new file mode 100644 index 0000000..25f9fb9 --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/reset.css @@ -0,0 +1,49 @@ +/* http://meyerweb.com/eric/tools/css/reset/ */ +/* v1.0 | 20080212 */ + +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; +} + +/* remember to define focus styles! */ +:focus { + outline: 0; +} + +/* remember to highlight inserts somehow! */ +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/vendor/plugins/flutie/public/stylesheets/screen.css b/vendor/plugins/flutie/public/stylesheets/screen.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/screen.css diff --git a/vendor/plugins/flutie/public/stylesheets/tables.css b/vendor/plugins/flutie/public/stylesheets/tables.css new file mode 100644 index 0000000..e80e275 --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/tables.css @@ -0,0 +1,23 @@ +/* Tables */ + +table { + margin-bottom: 2em; + width: 100%; +} +th { + border-bottom: 2px solid #ccc; + font-weight: bold; + text-align: left; +} +td { border-bottom: 1px solid #ddd; } +caption, th, td { + padding: 4px 10px 4px 0; +} +caption { + background: #f1f1f1; + padding: 10px 0; + margin-bottom: 1em; +} + +/* Use this if you use span-x classes on th/td. */ +table .last { padding-right: 0; } diff --git a/vendor/plugins/flutie/public/stylesheets/type.css b/vendor/plugins/flutie/public/stylesheets/type.css new file mode 100644 index 0000000..5745e01 --- /dev/null +++ b/vendor/plugins/flutie/public/stylesheets/type.css @@ -0,0 +1,90 @@ +/* Headings */ + +h1, h2, h3, h4, h5, h6 { font-weight: bold; } + +h1 { + font-size: 2.2em; + line-height: 1; + margin-bottom: 0.25em; +} +h2 { + font-size: 1.6em; + margin-bottom: 0.25em; + line-height: 1.1; +} +h3 { + font-size: 1.3em; + line-height: 1; + margin-bottom: .25em; +} +h4 { + font-size: 1.1em; + line-height: 1.25; + margin-bottom: .25em; +} +h5 { + font-size: 1em; + margin-bottom: .25em; +} +h6 { + font-size: 1em; + margin-bottom: .25em; +} + +/* Text elements */ + +p.last { margin-bottom: 0; } +p img { + float: left; + margin: 1.5em 1.5em 1.5em 0; + padding: 0; +} +p img.top { margin-top: 0; } /* Use this if the image is at the top of the

. */ +img { margin: 0 0 1.5em; } + +abbr, acronym { + border-bottom: 1px dotted #666; + cursor: help; +} +address { + margin-top: 1.5em; + font-style: italic; +} +del { color:#666; } + +a, a:link { + color: #1a4882; + text-decoration: underline; +} +a:visited { color: #1a4882; } +a:hover { color: #052246; } +a:active, a:focus { color: #1a4882; } + +blockquote { + margin: 1.5em 0; + color: #666; + font-style: italic; + padding-left: 1em; + border-left: 4px solid #d1d1d1; +} +strong { font-weight: bold; } +em, dfn { font-style: italic; } +dfn { font-weight: bold; } +pre, code { + margin: 1.5em 0; + white-space: pre; +} +pre, code, tt { + font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace; + line-height: 1.5; +} +pre.code { + background: #000; + color: #fff; + padding: 20px; +} +tt { + display: block; + margin: 1.5em 0; + line-height: 1.5; +} diff --git a/vendor/plugins/flutie/rails/init.rb b/vendor/plugins/flutie/rails/init.rb new file mode 100644 index 0000000..dff8ccd --- /dev/null +++ b/vendor/plugins/flutie/rails/init.rb @@ -0,0 +1 @@ +require 'flutie' diff --git a/vendor/plugins/flutie/test/fixtures/app/views/styleguides/_one.erb b/vendor/plugins/flutie/test/fixtures/app/views/styleguides/_one.erb new file mode 100644 index 0000000..578fb0c --- /dev/null +++ b/vendor/plugins/flutie/test/fixtures/app/views/styleguides/_one.erb @@ -0,0 +1 @@ +fixture partial 1 diff --git a/vendor/plugins/flutie/test/fixtures/app/views/styleguides/_two.erb b/vendor/plugins/flutie/test/fixtures/app/views/styleguides/_two.erb new file mode 100644 index 0000000..7bfd579 --- /dev/null +++ b/vendor/plugins/flutie/test/fixtures/app/views/styleguides/_two.erb @@ -0,0 +1 @@ +fixture partial 2 diff --git a/vendor/plugins/flutie/test/functional/styleguides_controller_test.rb b/vendor/plugins/flutie/test/functional/styleguides_controller_test.rb new file mode 100644 index 0000000..5186d6d --- /dev/null +++ b/vendor/plugins/flutie/test/functional/styleguides_controller_test.rb @@ -0,0 +1,56 @@ +require 'test_helper' + +class ApplicationController < ActionController::Base +end + +ActionController::Base.prepend_view_path File.join(File.dirname(__FILE__), '..', '..', 'app', 'views') +ActionController::Base.prepend_view_path File.join(File.dirname(__FILE__), '..', 'fixtures', 'app', 'views') +require "flutie/styleguides_controller" +require File.join(File.dirname(__FILE__), '..', '..', 'config', 'flutie_routes') + +class Flutie::StyleguidesControllerTest < ActionController::TestCase + def self.should_render_well_formed_xml + should "render well-formed XML" do + assert_nothing_raised("expected a well-formed XML document") do + REXML::Document.new(@response.body) + end + end + end + + def self.should_render_all_styleguide_partials + should "render the partials in the fixtures directory" do + assert_match %r{fixture partial 1}, @response.body + assert_match %r{fixture partial 2}, @response.body + end + end + + context "on GET to /styleguides/show" do + setup { get :show } + + should_respond_with :success + should_render_template :show + should_render_without_layout + should_render_well_formed_xml + should_render_all_styleguide_partials + end + + context "on GET to /styleguides/show with flutie=false" do + setup { get :show, :flutie => "false" } + + should_respond_with :success + should_render_template :show + should_render_without_layout + should_render_well_formed_xml + should_render_all_styleguide_partials + end + + context "on GET to /styleguides/show with flutie=true" do + setup { get :show, :flutie => "true" } + + should_respond_with :success + should_render_template :show + should_render_with_layout :flutie + should_render_well_formed_xml + should_render_all_styleguide_partials + end +end diff --git a/vendor/plugins/flutie/test/test_helper.rb b/vendor/plugins/flutie/test/test_helper.rb new file mode 100644 index 0000000..418f243 --- /dev/null +++ b/vendor/plugins/flutie/test/test_helper.rb @@ -0,0 +1,16 @@ +ENV['RAILS_ENV'] = 'test' + +require 'rubygems' +require 'active_support' +require 'active_support/test_case' +require 'action_controller' +require 'test_help' +require 'flutie' +require 'config/flutie_expansion' +require 'rexml/document' + +$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'app', 'controllers') + +require 'shoulda' +require 'shoulda/rails' +begin require 'redgreen'; rescue LoadError; end diff --git a/vendor/plugins/flutie/test/unit/initialization_test.rb b/vendor/plugins/flutie/test/unit/initialization_test.rb new file mode 100644 index 0000000..42e8a8e --- /dev/null +++ b/vendor/plugins/flutie/test/unit/initialization_test.rb @@ -0,0 +1,18 @@ +require 'test_helper' + +class InitializationTest < ActiveSupport::TestCase + + should "register stylesheet expansions with rails" do + expected = {:flutie => [ + '/flutie/stylesheets/reset', + '/flutie/stylesheets/defaults', + '/flutie/stylesheets/type', + '/flutie/stylesheets/forms', + '/flutie/stylesheets/tables', + '/flutie/stylesheets/lists', + '/flutie/stylesheets/screen'] + } + assert_equal expected, ActionView::Helpers::AssetTagHelper.send(:class_variable_get, :@@stylesheet_expansions) + end + +end -- libgit2 0.21.2