prologue 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prologue (0.4.0)
4
+ prologue (0.5.0)
5
5
  rails (~> 3.0.0)
6
6
  thor
7
7
 
@@ -1,3 +1,3 @@
1
1
  module Prologue
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -14,7 +14,7 @@ create_file 'app/views/admin/shared/_header.html.haml' do
14
14
  = render 'admin/shared/messages'
15
15
  %nav#main_admin_nav
16
16
  %ul
17
- %li= link_to 'Home', root_path
17
+ %li= link_to 'Home', root_path
18
18
  %ul#user_admin_nav
19
19
  = render 'devise/menu/login_items'
20
20
  FILE
@@ -46,31 +46,33 @@ end
46
46
  create_file 'app/views/layouts/admin.html.haml' do
47
47
  <<-FILE
48
48
  !!! 5
49
- %html
49
+ -# paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
50
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
51
+ <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
52
+ <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
53
+ <!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
54
+ <!--[if (gte IE 9)|!(IE)]><!-->
55
+ %html.no-js{ :lang => "en" }
56
+ <!--<![endif]-->
50
57
  %head
51
58
  %meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
52
59
  %meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
53
- %title
60
+ %title<
54
61
  #{app_name.humanize}
55
62
  = yield(:title)
56
63
  %meta{:name => 'viewport', :content => 'width=device-width initial-scale=1.0 maximum-scale=1.0'}
57
64
  %meta{:name => 'apple-mobile-web-app-capable', :content => 'yes'}
58
65
  = csrf_meta_tag
59
- %link{:rel => "shortcut icon", :href => "/images/favicon.ico", :type => "image/x-icon"}
66
+ %link{:rel => "shortcut icon", :href => "/favicon.ico", :type => "image/x-icon"}
60
67
  /[if lt IE 9]
61
68
  %script{:type => "text/javascript", :src => "/javascripts/shiv.js"}
62
69
  = include_stylesheets :admin, :media => 'all'
63
70
  = yield(:head)
64
- /[if IE 7]
65
- = stylesheet_link_tag 'ie7', :media => 'all'
66
- /[if IE 8]
67
- = stylesheet_link_tag 'ie8', :media => 'all'
68
71
  %body
69
72
  #container
70
73
  = render :partial => "admin/shared/header"
71
74
  %section#content
72
75
  = yield
73
- #pusher
74
76
  = render :partial => "admin/shared/footer"
75
77
  = render :partial => "admin/shared/end_scripts"
76
78
  FILE
@@ -1,80 +1,43 @@
1
1
  create_file 'public/stylesheets/sass/admin.scss' do
2
2
  <<-FILE
3
- @import "reset";
4
- @import "common";
5
- @mixin layout_base {
6
- @include reset;
7
- @include container;
8
- @include user_admin_nav;
9
- @include main_admin_nav;
10
- //uncomment for a handy layout guide
11
- @include layout_guide;
12
- }
3
+ @import "partials/admin_variables";
4
+ @import "partials/fonts";
5
+ @import "partials/defaults";
6
+ @import "partials/media";
13
7
 
14
- @mixin container($container_size: 950px) {
15
- #container {
16
- width: $container_size;
17
- clear:both;
18
- padding: 0 20px;
19
- min-height: 100%;
20
- height: auto !important;
21
- height: 100%;
22
- margin: 0 auto -80px;
23
- }
24
- #main_admin_header {
25
- width: $container_size;
26
- height: 60px;
27
- @include clear_left;
28
- h1 {
29
- float: left;
30
- padding: 20px 0 0 0;
31
- font-size: 24px;
32
- font-weight: bold;
33
- }
34
- }
35
- #content {
36
- width: $container_size;
37
- @include clear_left;
38
- padding: 10px 0 20px 0;
39
- }
40
- #main_admin_footer, #pusher {
41
- height: 80px;
42
- clear:both;
43
- }
8
+ @mixin admin {
9
+ @include fonts;
10
+ @include defaults;
11
+ @include media;
44
12
  }
13
+ @include admin;
14
+ FILE
15
+ end
45
16
 
46
- @mixin user_admin_nav {
47
- #user_admin_nav {
48
- float: right;
49
- padding: 20px 0 0 0;
50
- }
51
- }
17
+ create_file 'public/stylesheets/sass/partials/_admin_variables.scss' do
18
+ <<-FILE
19
+ $base-font-family: unquote('sans-serif'); // default font-family
52
20
 
53
- @mixin main_admin_nav {
54
- #main_admin_nav {
55
- width: 950px;
56
- @include clear_left;
57
- padding: 10px 0;
58
- ul {
59
- @include clear_left;
60
- li {
61
- float: left;
62
- padding: 0 15px 0 0;
63
- }
64
- }
65
- }
66
- }
21
+ $base-font-size: 13px; // default font-size for YUI fonts
67
22
 
68
- @mixin layout_guide {
69
- #container { background-color: #e8e6e6; }
70
- #main_admin_header { background-color: #f7dddd; }
71
- #main_admin_nav { background-color: #f4ddf7; }
72
- #content { background-color: #f2f7dd; }
73
- #main_admin_footer .inner { background-color: #ddf7e7; }
74
- }
23
+ $base-line-height: 1.231; // default line-height for YUI fonts
24
+
25
+ $font-color: #444;
26
+
27
+ $link-color: #607890;
28
+
29
+ $link-hover-color: #036;
30
+
31
+ $link-active-color: #607890;
32
+
33
+ $link-visited-color: #607890;
34
+
35
+ $selected-font-color: #fff; // color for selected text
36
+
37
+ $selected-background-color: #ff5E99; // bg-color for selected text
75
38
 
76
- @include layout_base;
39
+ $list-left-margin: 1.8em; // left margin for ul an ol
77
40
  FILE
78
41
  end
79
42
 
80
- run 'sass public/stylesheets/sass/admin.scss public/stylesheets/admin.css'
43
+ run 'sass public/stylesheets/sass/admin.scss public/stylesheets/admin.css'
@@ -31,6 +31,17 @@ end
31
31
  create_file 'app/views/shared/_end_scripts.html.haml' do
32
32
  <<-FILE
33
33
  = include_javascripts :common
34
+ = yield(:end_scripts)
35
+ - if Rails.env == 'production'
36
+ :javascript
37
+ var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
38
+ (function(d, t) {
39
+ var g = d.createElement(t),
40
+ s = d.getElementsByTagName(t)[0];
41
+ g.async = true;
42
+ g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
43
+ s.parentNode.insertBefore(g, s);
44
+ })(document, 'script');
34
45
  FILE
35
46
  end
36
47
 
@@ -38,11 +49,18 @@ run 'rm app/views/layouts/application.html.erb'
38
49
  create_file 'app/views/layouts/application.html.haml' do
39
50
  <<-FILE
40
51
  !!! 5
41
- %html
52
+ -# paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
53
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
54
+ <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
55
+ <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
56
+ <!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
57
+ <!--[if (gte IE 9)|!(IE)]><!-->
58
+ %html.no-js{ :lang => "en" }
59
+ <!--<![endif]-->
42
60
  %head
43
61
  %meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
44
62
  %meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
45
- %title
63
+ %title<
46
64
  #{app_name.humanize}
47
65
  = yield(:title)
48
66
  %meta{:name => 'description', :content => ''}
@@ -50,23 +68,51 @@ create_file 'app/views/layouts/application.html.haml' do
50
68
  %meta{:name => 'viewport', :content => 'width=device-width initial-scale=1.0 maximum-scale=1.0'}
51
69
  %meta{:name => 'apple-mobile-web-app-capable', :content => 'yes'}
52
70
  = csrf_meta_tag
53
- %link{:rel => "shortcut icon", :href => "/images/favicon.ico", :type => "image/x-icon"}
71
+ %link{:rel => "shortcut icon", :href => "/favicon.ico", :type => "image/x-icon"}
54
72
  %link{:rel => "apple-touch-icon", :href => "/images/ati.png"}
55
73
  /[if lt IE 9]
56
74
  %script{:type => "text/javascript", :src => "/javascripts/shiv.js"}
57
75
  = include_stylesheets :main, :media => 'all'
58
76
  = yield(:head)
59
- /[if IE 7]
60
- = stylesheet_link_tag 'ie7', :media => 'all'
61
- /[if IE 8]
62
- = stylesheet_link_tag 'ie8', :media => 'all'
63
77
  %body
64
78
  #container
65
79
  = render :partial => "shared/header"
66
80
  %section#content
67
81
  = yield
68
- #pusher
69
82
  = render :partial => "shared/footer"
70
83
  = render :partial => "shared/end_scripts"
71
84
  FILE
72
85
  end
86
+
87
+ create_file 'public/maintenance.html' do
88
+ <<-FILE
89
+ <!DOCTYPE html>
90
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
91
+ <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
92
+ <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
93
+ <!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
94
+ <!--[if (gte IE 9)|!(IE)]><!-->
95
+ <html class='no-js' lang='en'>
96
+ <!--<![endif]-->
97
+ <head>
98
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
99
+ <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
100
+ <title>#{app_name.humanize} is down for maintenance</title>
101
+ <meta content='width=device-width initial-scale=1.0 maximum-scale=1.0' name='viewport'>
102
+ <link href='/favicon.ico' rel='shortcut icon' type='image/x-icon'>
103
+ <!--[if lt IE 9]>
104
+ <script src='/javascripts/shiv.js' type='text/javascript'></script>
105
+ <![endif]-->
106
+ <link href="/stylesheets/reset.css" media="all" rel="stylesheet" type="text/css" />
107
+ <link href="/stylesheets/main.css" media="all" rel="stylesheet" type="text/css" />
108
+ </head>
109
+ <body>
110
+ <div id='container'>
111
+ <section id='content'>
112
+ <h1>#{app_name.humanize} is down for maintenance</h1>
113
+ </section>
114
+ </div>
115
+ </body>
116
+ </html>
117
+ FILE
118
+ end
@@ -16,20 +16,24 @@ def get_remote_https_file(source, destination)
16
16
  File.open(path, "w") { |file| file.write(response.body) }
17
17
  end
18
18
 
19
- append_file '.gitignore' do
20
- '.DS_Store'
21
- 'log/*.log'
22
- 'tmp/**/*'
23
- 'config/database.yml'
24
- 'db/*.sqlite3'
25
- 'public/system/**/**/**/*'
26
- '.idea/*'
27
- '.sass-cache/**/*'
28
- '*.swp'
29
- end
30
-
31
19
  git :init
32
20
 
21
+ run 'rm .gitignore'
22
+ create_file '.gitignore' do
23
+ <<-FILE
24
+ .bundle
25
+ .DS_Store
26
+ log/*.log
27
+ tmp/**/*
28
+ config/database.yml
29
+ db/*.sqlite3
30
+ public/system/**/**/**/*
31
+ .idea/*
32
+ .sass-cache/**/*
33
+ *.swp
34
+ FILE
35
+ end
36
+
33
37
  # Apply Gemfile
34
38
  apply File.expand_path("../gemfile.rb", __FILE__)
35
39
 
@@ -45,6 +49,9 @@ apply File.expand_path("../rails_clean.rb", __FILE__)
45
49
  # Apply js
46
50
  apply File.expand_path("../js.rb", __FILE__)
47
51
 
52
+ # Apply css
53
+ apply File.expand_path("../css.rb", __FILE__)
54
+
48
55
  # Apply evergreen and jasmin
49
56
  apply File.expand_path("../evergreen.rb", __FILE__)
50
57
 
@@ -84,6 +91,9 @@ apply File.expand_path("../initializers.rb", __FILE__)
84
91
  # Clean up generated routes
85
92
  apply File.expand_path("../clean_routes.rb", __FILE__)
86
93
 
94
+ # Setup yard
95
+ apply File.expand_path("../yard.rb", __FILE__)
96
+
87
97
  # Remove RSpec stuff we are not gonna use right away
88
98
  apply File.expand_path("../rspec_clean.rb", __FILE__)
89
99
 
@@ -0,0 +1,59 @@
1
+ create_file 'public/stylesheets/reset.css' do
2
+ <<-FILE
3
+ /*
4
+ html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
5
+ v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
6
+ html5doctor.com/html-5-reset-stylesheet/
7
+ */
8
+
9
+ html, body, div, span, object, iframe,
10
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
11
+ abbr, address, cite, code,
12
+ del, dfn, em, img, ins, kbd, q, samp,
13
+ small, strong, sub, sup, var,
14
+ b, i,
15
+ dl, dt, dd, ol, ul, li,
16
+ fieldset, form, label, legend,
17
+ table, caption, tbody, tfoot, thead, tr, th, td,
18
+ article, aside, canvas, details, figcaption, figure,
19
+ footer, header, hgroup, menu, nav, section, summary,
20
+ time, mark, audio, video {
21
+ margin:0;
22
+ padding:0;
23
+ border:0;
24
+ outline:0;
25
+ font-size:100%;
26
+ vertical-align:baseline;
27
+ background:transparent;
28
+ }
29
+
30
+ article, aside, details, figcaption, figure,
31
+ footer, header, hgroup, menu, nav, section {
32
+ display:block;
33
+ }
34
+
35
+ nav ul { list-style:none; }
36
+
37
+ blockquote, q { quotes:none; }
38
+
39
+ blockquote:before, blockquote:after,
40
+ q:before, q:after { content:''; content:none; }
41
+
42
+ a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
43
+
44
+ ins { background-color:#ff9; color:#000; text-decoration:none; }
45
+
46
+ mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
47
+
48
+ del { text-decoration: line-through; }
49
+
50
+ abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
51
+
52
+ /* tables still need cellspacing="0" in the markup */
53
+ table { border-collapse:collapse; border-spacing:0; }
54
+
55
+ hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
56
+
57
+ input, select { vertical-align:middle; }
58
+ FILE
59
+ end
@@ -14,6 +14,8 @@ gem "friendly_id", "~> 3.1"
14
14
  gem "will_paginate", "~> 3.0.pre2"
15
15
  gem "haml", "~> 3.0.21"
16
16
  gem "haml-rails"
17
+ gem "yard"
18
+ gem "bluecloth"
17
19
  gem "rails3-generators", :group => :development
18
20
  gem "hpricot", :group => :development
19
21
  gem "ruby_parser", :group => :development
@@ -10,8 +10,10 @@ javascripts:
10
10
 
11
11
  stylesheets:
12
12
  main:
13
+ - public/stylesheets/reset.css
13
14
  - public/stylesheets/main.css
14
15
  admin:
16
+ - public/stylesheets/reset.css
15
17
  - public/stylesheets/admin.css
16
18
  FILE
17
- end
19
+ end
@@ -1,5 +1,5 @@
1
1
 
2
- get "http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js", "public/javascripts/jquery.js"
2
+ get "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js", "public/javascripts/jquery.js"
3
3
  get_remote_https_file "https://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js"
4
4
  get "http://html5shiv.googlecode.com/svn/trunk/html5.js", "public/javascripts/shiv.js"
5
5
  run 'rm public/javascripts/application.js'
@@ -1,7 +1,12 @@
1
1
  run 'rm public/index.html'
2
2
  run 'rm public/images/rails.png'
3
3
  run 'rm README'
4
- run 'touch README'
5
4
  run 'rm public/favicon.ico'
6
- get "http://www.quickleft.com/favicon.ico", "public/images/favicon.ico"
7
- # get "http://www.quickleft.com/ati.png", "public/images/ati.png"
5
+ get "http://www.quickleft.com/favicon.ico", "public/favicon.ico"
6
+ # get "http://www.quickleft.com/ati.png", "public/images/ati.png"
7
+ create_file 'README.md' do
8
+ <<-FILE
9
+ #{app_name.humanize}
10
+ ===========
11
+ FILE
12
+ end
@@ -1,152 +1,301 @@
1
- run 'mkdir public/stylesheets/sass'
1
+ empty_directory "public/stylesheets/sass"
2
+ empty_directory "public/stylesheets/sass/partials"
2
3
 
3
4
  create_file 'public/stylesheets/sass/main.scss' do
4
5
  <<-FILE
5
- @import "reset";
6
- @import "common";
7
- @mixin layout_base {
8
- @include reset;
9
- @include container;
10
- @include user_nav;
11
- @include main_nav;
12
- //uncomment for a handy layout guide
13
- @include layout_guide;
14
- }
15
-
16
- @mixin container($container_size: 950px) {
17
- #container {
18
- width: $container_size;
19
- clear:both;
20
- padding: 0 20px;
21
- min-height: 100%;
22
- height: auto !important;
23
- height: 100%;
24
- margin: 0 auto -80px;
6
+ @import "partials/main_variables";
7
+ @import "partials/fonts";
8
+ @import "partials/defaults";
9
+ @import "partials/media";
10
+
11
+ @mixin main {
12
+ @include fonts;
13
+ @include defaults;
14
+ @include media;
15
+ }
16
+ @include main;
17
+ FILE
18
+ end
19
+
20
+ create_file 'public/stylesheets/sass/partials/_main_variables.scss' do
21
+ <<-FILE
22
+ $base-font-family: unquote('sans-serif'); // default font-family
23
+
24
+ $base-font-size: 13px; // default font-size for YUI fonts
25
+
26
+ $base-line-height: 1.231; // default line-height for YUI fonts
27
+
28
+ $font-color: #444;
29
+
30
+ $link-color: #607890;
31
+
32
+ $link-hover-color: #036;
33
+
34
+ $link-active-color: #607890;
35
+
36
+ $link-visited-color: #607890;
37
+
38
+ $selected-font-color: #fff; // color for selected text
39
+
40
+ $selected-background-color: #ff5E99; // bg-color for selected text
41
+
42
+ $list-left-margin: 1.8em; // left margin for ul an ol
43
+ FILE
44
+ end
45
+
46
+ create_file 'public/stylesheets/sass/partials/_fonts.scss' do
47
+ <<-FILE
48
+ $base-font-family: unquote("sans-serif") !default;
49
+ $base-font-size: 13px !default;
50
+ $base-line-height: 1.231 !default;
51
+
52
+ //
53
+ // fonts.css from the YUI Library: developer.yahoo.com/yui/
54
+ //
55
+ // There are three custom edits:
56
+ // * remove arial, helvetica from explicit font stack
57
+ // * we normalize monospace styles ourselves
58
+ // * table font-size is reset in the HTML5 reset above so there is no need to repeat
59
+ //
60
+ // Whatever parts of this port of YUI to Sass that are copyrightable, are Copyright (c) 2008, Christopher Eppstein. All Rights Reserved.
61
+ //
62
+
63
+ @mixin fonts($family: $base-font-family, $size: $base-font-size, $line-height: $base-line-height) {
64
+ body {
65
+ font-size: $size;
66
+ font-family: $family;
67
+ line-height: $line-height; // hack retained to preserve specificity
68
+ *font-size: small;
25
69
  }
26
- #main_header {
27
- width: $container_size;
28
- height: 60px;
29
- @include clear_left;
30
- h1 {
31
- float: left;
32
- padding: 20px 0 0 0;
33
- font-size: 24px;
34
- font-weight: bold;
35
- }
70
+
71
+ select, input, textarea, button { font: 99% $family; }
72
+
73
+ // normalize monospace sizing
74
+ // meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/
75
+ // en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
76
+ pre, code, kbd, samp { font-family: monospace, sans-serif; }
77
+ }
78
+
79
+ // maxvoltar.com/archive/-webkit-font-smoothing
80
+ @mixin font-smoothing {
81
+ -webkit-font-smoothing: antialiased;
82
+ }
83
+
84
+ // Sets the font size specified in pixels using percents so that the base
85
+ // font size changes and 1em has the correct value. When nesting font size
86
+ // declarations, within the DOM tree, the base_font_size must be the parent's
87
+ // effective font-size in pixels.
88
+ // Usage Examples:
89
+ // .big
90
+ // +font-size(16px)
91
+ // .bigger
92
+ // +font-size(18px)
93
+ // .big .bigger
94
+ // +font-size(18px, 16px)
95
+ //
96
+ // For more information see the table found at http://developer.yahoo.com/yui/3/cssfonts/#fontsize
97
+ @mixin font-size($size, $base-font-size: $base-font-size) {
98
+ font-size: ceil(percentage($size / $base-font-size));
99
+ }
100
+ FILE
101
+ end
102
+
103
+ create_file 'public/stylesheets/sass/partials/_media.scss' do
104
+ <<-FILE
105
+ @mixin media {
106
+ @media print {
107
+ @include media-print;
36
108
  }
37
- #content {
38
- width: $container_size;
39
- @include clear_left;
40
- padding: 10px 0 20px 0;
109
+
110
+ @media all and (orientation:portrait) {
111
+ @include media-orientation-portrait;
41
112
  }
42
- #main_footer, #pusher {
43
- height: 80px;
44
- clear:both;
113
+
114
+ @media all and (orientation:landscape) {
115
+ @include media-orientation-landscape;
45
116
  }
46
- }
47
117
 
48
- @mixin user_nav {
49
- #user_nav {
50
- float: right;
51
- padding: 20px 0 0 0;
118
+ @media screen and (max-device-width: 480px) {
119
+ @include media-mobile;
52
120
  }
53
121
  }
54
122
 
55
- @mixin main_nav {
56
- #main_nav {
57
- width: 950px;
58
- @include clear_left;
59
- padding: 10px 0;
60
- ul {
61
- @include clear_left;
62
- li {
63
- float: left;
64
- padding: 0 15px 0 0;
65
- }
66
- }
67
- }
123
+ //
124
+ // print styles
125
+ // inlined to avoid required HTTP connection www.phpied.com/delay-loading-your-print-css/
126
+
127
+ @mixin media-print {
128
+ * { background: transparent !important; color: black !important; text-shadow: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
129
+ a, a:visited { color: #444 !important; text-decoration: underline; }
130
+ a[href]:after { content: " (" attr(href) ")"; }
131
+ abbr[title]:after { content: " (" attr(title) ")"; }
132
+ .ir a:after { content: ""; } /* Don't show links for images */
133
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
134
+ thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
135
+ tr, img { page-break-inside: avoid; }
136
+ @page { margin: 0.5cm; }
137
+ p, h2, h3 { orphans: 3; widows: 3; }
138
+ h2, h3{ page-break-after: avoid; }
68
139
  }
69
140
 
70
- @mixin layout_guide {
71
- #container { background-color: #e8e6e6; }
72
- #main_header { background-color: #f7dddd; }
73
- #main_nav { background-color: #f4ddf7; }
74
- #content { background-color: #f2f7dd; }
75
- #main_footer .inner { background-color: #ddf7e7; }
141
+
142
+ //
143
+ // Media queries for responsive design
144
+ // These follow after primary styles so they will successfully override.
145
+ //
146
+
147
+ @mixin media-orientation-portrait {
148
+ // Style adjustments for portrait mode goes here
76
149
  }
77
150
 
78
- @include layout_base;
151
+ @mixin media-orientation-landscape {
152
+ // Style adjustments for landscape mode goes here
153
+ }
154
+
155
+ // Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
156
+ // Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/
157
+ @mixin media-mobile($optimize: true) {
158
+ // j.mp/textsizeadjust
159
+ @if not $optimize {
160
+ // don't allow iOS and WinMobile to mobile-optimize text
161
+ html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
162
+ }
163
+ }
79
164
  FILE
80
165
  end
81
166
 
82
- create_file 'public/stylesheets/sass/reset.scss' do
167
+ create_file 'public/stylesheets/sass/partials/_defaults.scss' do
83
168
  <<-FILE
84
- @mixin reset {
85
- /*
86
- html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
87
- v1.4 2009-07-27 | Authors: Eric Meyer & Richard Clark
88
- html5doctor.com/html-5-reset-stylesheet/
89
- */
90
-
91
- html, body, div, span, object, iframe,
92
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
93
- abbr, address, cite, code,
94
- del, dfn, em, img, ins, kbd, q, samp,
95
- small, strong, sub, sup, var,
96
- b, i,
97
- dl, dt, dd, ol, ul, li,
98
- fieldset, form, label, legend,
99
- table, caption, tbody, tfoot, thead, tr, th, td,
100
- article, aside, canvas, details, figcaption, figure,
101
- footer, header, hgroup, menu, nav, section, summary,
102
- time, mark, audio, video {
103
- margin:0;
104
- padding:0;
105
- border:0;
106
- outline:0;
107
- font-size:100%;
108
- vertical-align:baseline;
109
- background:transparent;
110
- }
169
+ $font-color: #444 !default; //looks better than black: twitter.com/H_FJ/statuses/11800719859
170
+ $link-color: #607890 !default;
171
+ $link-hover-color: #036 !default;
172
+ $link-active-color: #607890 !default;
173
+ $link-visited-color: #607890 !default;
174
+ $selected-font-color: #fff !default;
175
+ $selected-background-color: #ff5e99 !default;
176
+ $list-left-margin: 1.8em !default;
177
+ //
178
+ // Based on Paul Irish's boilerplate sass'd up by sporked.
179
+ //
180
+ // Minimal base styles
181
+ //
111
182
 
112
- article, aside, details, figcaption, figure,
113
- footer, header, hgroup, menu, nav, section {
114
- display:block;
115
- }
183
+ @mixin defaults {
184
+ body, select, input, textarea { color: $font-color; }
185
+
186
+ html { @include force-scrollbar; }
187
+
188
+ a, a:active, a:visited { color: $link-color; }
189
+ a:hover { color: $link-hover-color; }
190
+
191
+ ul, ol { margin-left: $list-left-margin; }
192
+ ol { list-style-type: decimal; }
193
+
194
+ td, td img { vertical-align: top; }
116
195
 
117
- nav ul { list-style:none; }
196
+ sub { @include sub; }
118
197
 
119
- blockquote, q { quotes:none; }
198
+ sup { @include sup; }
120
199
 
121
- blockquote:before, blockquote:after,
122
- q:before, q:after { content:''; content:none; }
200
+ textarea { overflow: auto; } // thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars
123
201
 
124
- a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
202
+ @include accessible-focus;
125
203
 
126
- ins { background-color:#ff9; color:#000; text-decoration:none; }
204
+ @include quoted-pre;
127
205
 
128
- mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
206
+ @include align-input-labels;
129
207
 
130
- del { text-decoration: line-through; }
208
+ @include hand-cursor-inputs;
131
209
 
132
- abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
210
+ @include webkit-reset-form-elements;
133
211
 
134
- /* tables still need cellspacing="0" in the markup */
135
- table { border-collapse:collapse; border-spacing:0; }
212
+ @include selected-text;
136
213
 
137
- hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
214
+ @include webkit-tap-highlight;
138
215
 
139
- input, select { vertical-align:middle; }
216
+ @include ie-hacks;
217
+
218
+ @include no-nav-margins;
140
219
  }
141
- FILE
142
- end
143
220
 
144
- create_file 'public/stylesheets/sass/common.scss' do
145
- <<-FILE
146
- @mixin clear_left {
147
- float: left; clear: both;
221
+ @mixin sub{
222
+ vertical-align: sub; font-size: smaller;
223
+ }
224
+
225
+ @mixin sup{
226
+ vertical-align: super; font-size: smaller;
227
+ }
228
+
229
+ // Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test
230
+ @mixin accessible-focus {
231
+ a:hover, a:active { outline: none; }
232
+ }
233
+
234
+ // www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/
235
+ @mixin quoted-pre {
236
+ pre {
237
+ padding: 15px;
238
+ white-space: pre; // CSS2
239
+ white-space: pre-wrap; // CSS 2.1
240
+ white-space: pre-line; // CSS 3 (and 2.1 as well, actually)
241
+ word-wrap: break-word; // IE
242
+ }
243
+ }
244
+
245
+ // align checkboxes, radios, text inputs with their label
246
+ // by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css
247
+ @mixin align-input-labels {
248
+ input[type="radio"] { vertical-align: text-bottom; }
249
+ input[type="checkbox"] { vertical-align: bottom; }
250
+ .ie7 input[type="checkbox"] { vertical-align: baseline; }
251
+ .ie6 input { vertical-align: text-bottom; }
252
+ }
253
+
254
+ // hand cursor on clickable input elements
255
+ @mixin hand-cursor-inputs {
256
+ label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
257
+ }
258
+
259
+ // webkit browsers add a 2px margin outside the chrome of form elements
260
+ @mixin webkit-reset-form-elements {
261
+ button, input, select, textarea { margin: 0; }
262
+ }
263
+
264
+ // These selection declarations have to be separate.
265
+ // No text-shadow: twitter.com/miketaylr/status/12228805301
266
+ // Also: hot pink.
267
+ @mixin selected-text {
268
+ ::-moz-selection{ background:$selected-background-color; color: $selected-font-color; text-shadow: none; }
269
+ ::selection { background: $selected-background-color; color: $selected-font-color; text-shadow: none; }
270
+ }
271
+
272
+ // j.mp/webkit-tap-highlight-color
273
+ @mixin webkit-tap-highlight {
274
+ a:link { -webkit-tap-highlight-color: $selected-background-color; }
275
+ }
276
+
277
+ // always force a scrollbar in non-IE
278
+ @mixin force-scrollbar {
279
+ overflow-y: scroll;
280
+ }
281
+
282
+ @mixin ie-hacks {
283
+ // make buttons play nice in IE:
284
+ // www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
285
+ button { width: auto; overflow: visible; }
286
+
287
+ // bicubic resizing for non-native sized IMG:
288
+ // code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
289
+ .ie7 img { -ms-interpolation-mode: bicubic; }
290
+
291
+ .ie6 legend, .ie7 legend { margin-left: -7px; } // thnx ivannikolic!
292
+ }
293
+
294
+ @mixin no-nav-margins {
295
+ // Remove margins for navigation lists
296
+ nav ul, nav li { margin: 0; }
148
297
  }
149
298
  FILE
150
299
  end
151
300
 
152
- run 'sass public/stylesheets/sass/main.scss public/stylesheets/main.css'
301
+ run 'sass public/stylesheets/sass/main.scss public/stylesheets/main.css'
@@ -0,0 +1,8 @@
1
+ create_file 'lib/tasks/yard.rake' do
2
+ <<-FILE
3
+ YARD::Rake::YardocTask.new do |t|
4
+ t.files = ['lib/**/*.rb', 'app/**/*.rb', '-', 'README.md']
5
+ t.options = %w(--title #{app_name.humanize})
6
+ end
7
+ FILE
8
+ end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 4
7
+ - 5
8
8
  - 0
9
- version: 0.4.0
9
+ version: 0.5.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Quick Left
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-17 00:00:00 -07:00
17
+ date: 2010-12-22 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -135,6 +135,7 @@ files:
135
135
  - templates/bootstrap.rb
136
136
  - templates/cancan.rb
137
137
  - templates/clean_routes.rb
138
+ - templates/css.rb
138
139
  - templates/db.rb
139
140
  - templates/db_seed.rb
140
141
  - templates/devise.rb
@@ -152,6 +153,7 @@ files:
152
153
  - templates/rspec_clean.rb
153
154
  - templates/sass.rb
154
155
  - templates/test_suite.rb
156
+ - templates/yard.rb
155
157
  has_rdoc: true
156
158
  homepage: http://github.com/quickleft/prologue
157
159
  licenses: []
@@ -185,6 +187,6 @@ rubyforge_project: prologue
185
187
  rubygems_version: 1.3.7
186
188
  signing_key:
187
189
  specification_version: 3
188
- summary: prologue-0.4.0
190
+ summary: prologue-0.5.0
189
191
  test_files: []
190
192