startups 0.0.3.3 → 0.0.3.4
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.
- data/rails_generators/startup/USAGE +11 -0
- data/rails_generators/startup/startup_generator.rb +23 -0
- data/rails_generators/startup_content/USAGE +11 -0
- data/rails_generators/startup_content/startup_content_generator.rb +41 -0
- data/rails_generators/startup_content/templates/content_controller.rb +7 -0
- data/rails_generators/startup_content/templates/content_controller_test.rb +14 -0
- data/rails_generators/startup_content/templates/content_helper.rb +3 -0
- data/rails_generators/startup_content/templates/example.html.erb +3 -0
- data/rails_generators/startup_content/templates/help.html.erb +3 -0
- data/rails_generators/startup_content/templates/home.html.erb +4 -0
- data/rails_generators/startup_layout/USAGE +11 -0
- data/rails_generators/startup_layout/startup_layout_generator.rb +48 -0
- data/rails_generators/startup_layout/templates/app/helpers/layout_helper.rb +71 -0
- data/rails_generators/startup_layout/templates/app/views/layouts/_startup_layout_footer.html.erb +6 -0
- data/rails_generators/startup_layout/templates/app/views/layouts/_startup_layout_header.html.erb +4 -0
- data/rails_generators/startup_layout/templates/app/views/layouts/startup_layout.html.erb +54 -0
- data/rails_generators/startup_layout/templates/public/images/blank.gif +0 -0
- data/rails_generators/startup_layout/templates/public/javascripts/startup_application.js +42 -0
- data/rails_generators/startup_layout/templates/public/javascripts/startup_iepngfix.js +173 -0
- data/rails_generators/startup_layout/templates/public/javascripts/startup_imgSizer.js +61 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_layout.css +21 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_layout_ie6.css +13 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_layout_ie7.css +5 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_layout_iepngfix.htc +198 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_layout_master.css +293 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_layout_reset.css +47 -0
- data/rails_generators/startup_layout/templates/public/stylesheets/startup_white.css +23 -0
- data/rails_generators/startup_nav/USAGE +12 -0
- data/rails_generators/startup_nav/startup_nav_generator.rb +35 -0
- data/rails_generators/startup_nav/templates/_nav.html.erb +7 -0
- data/rails_generators/startup_nav/templates/nav.css +36 -0
- data/rails_generators/startup_nav/templates/nav_helper.rb +76 -0
- data/startups.gemspec +2 -2
- metadata +35 -3
@@ -0,0 +1,198 @@
|
|
1
|
+
<public:component>
|
2
|
+
<script type="text/javascript">
|
3
|
+
|
4
|
+
// IE5.5+ PNG Alpha Fix v2.0 Alpha
|
5
|
+
// (c) 2004-2009 Angus Turnbull http://www.twinhelix.com
|
6
|
+
|
7
|
+
// This is licensed under the GNU LGPL, version 2.1 or later.
|
8
|
+
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
9
|
+
|
10
|
+
var IEPNGFix = window.IEPNGFix || {};
|
11
|
+
IEPNGFix.data = IEPNGFix.data || {};
|
12
|
+
|
13
|
+
|
14
|
+
// CONFIG: blankImg is the path to blank.gif, *relative to the HTML document*.
|
15
|
+
// Try either:
|
16
|
+
// * An absolute path like: '/images/blank.gif'
|
17
|
+
// * A path relative to this HTC file like: thisFolder + 'blank.gif'
|
18
|
+
var thisFolder = document.URL.replace(/(\\|\/)[^\\\/]*$/, '/');
|
19
|
+
IEPNGFix.blankImg = '/images/blank.gif';
|
20
|
+
|
21
|
+
|
22
|
+
IEPNGFix.fix = function(elm, src, t) {
|
23
|
+
// Applies an image 'src' to an element 'elm' using the DirectX filter.
|
24
|
+
// If 'src' is null, filter is disabled.
|
25
|
+
// Disables the 'hook' to prevent infinite recursion on setting BG/src.
|
26
|
+
// 't' = type, where background tile = 0, background = 1, IMG SRC = 2.
|
27
|
+
|
28
|
+
var h = this.hook.enabled;
|
29
|
+
this.hook.enabled = 0;
|
30
|
+
|
31
|
+
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
32
|
+
src = (src || '').replace(/\(/g, '%28').replace(/\)/g, '%29');
|
33
|
+
|
34
|
+
if (
|
35
|
+
src && !(/IMG|INPUT/.test(elm.nodeName) && (t != 2)) &&
|
36
|
+
elm.currentStyle.width == 'auto' && elm.currentStyle.height == 'auto'
|
37
|
+
) {
|
38
|
+
if (elm.offsetWidth) {
|
39
|
+
elm.style.width = elm.offsetWidth + 'px';
|
40
|
+
}
|
41
|
+
if (elm.clientHeight) {
|
42
|
+
elm.style.height = elm.clientHeight + 'px';
|
43
|
+
}
|
44
|
+
if (elm.currentStyle.display == 'inline') {
|
45
|
+
elm.style.display = 'inline-block';
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
if (t == 1) {
|
50
|
+
elm.style.backgroundImage = 'url("' + this.blankImg + '")';
|
51
|
+
}
|
52
|
+
if (t == 2) {
|
53
|
+
elm.src = this.blankImg;
|
54
|
+
}
|
55
|
+
|
56
|
+
if (elm.filters[f]) {
|
57
|
+
elm.filters[f].enabled = src ? true : false;
|
58
|
+
if (src) {
|
59
|
+
elm.filters[f].src = src;
|
60
|
+
}
|
61
|
+
} else if (src) {
|
62
|
+
elm.style.filter = 'progid:' + f + '(src="' + src +
|
63
|
+
'",sizingMethod="' + (t == 2 ? 'scale' : 'crop') + '")';
|
64
|
+
}
|
65
|
+
|
66
|
+
this.hook.enabled = h;
|
67
|
+
};
|
68
|
+
|
69
|
+
|
70
|
+
IEPNGFix.process = function(elm, init) {
|
71
|
+
// Checks the onpropertychange event (on first 'init' run, a fake event)
|
72
|
+
// and calls the filter-applying-functions.
|
73
|
+
|
74
|
+
if (
|
75
|
+
!/MSIE (5\.5|6)/.test(navigator.userAgent) ||
|
76
|
+
typeof elm.filters == 'unknown'
|
77
|
+
) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
if (!this.data[elm.uniqueID]) {
|
81
|
+
this.data[elm.uniqueID] = {
|
82
|
+
className: ''
|
83
|
+
};
|
84
|
+
}
|
85
|
+
var data = this.data[elm.uniqueID],
|
86
|
+
evt = init ? { propertyName: 'src,backgroundImage' } : event,
|
87
|
+
isSrc = /src/.test(evt.propertyName),
|
88
|
+
isBg = /backgroundImage/.test(evt.propertyName),
|
89
|
+
isPos = /width|height|background(Pos|Rep)/.test(evt.propertyName),
|
90
|
+
isClass = !init && ((elm.className != data.className) &&
|
91
|
+
(elm.className || data.className));
|
92
|
+
if (!(isSrc || isBg || isPos || isClass)) {
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
data.className = elm.className;
|
96
|
+
var blank = this.blankImg.match(/([^\/]+)$/)[1],
|
97
|
+
eS = elm.style,
|
98
|
+
eCS = elm.currentStyle;
|
99
|
+
|
100
|
+
// Required for Whatever:hover - erase set BG if className changes.
|
101
|
+
if (
|
102
|
+
isClass && (eS.backgroundImage.indexOf('url(') == -1 ||
|
103
|
+
eS.backgroundImage.indexOf(blank) > -1)
|
104
|
+
) {
|
105
|
+
return setTimeout(function() {
|
106
|
+
eS.backgroundImage = '';
|
107
|
+
}, 0);
|
108
|
+
}
|
109
|
+
|
110
|
+
// Foregrounds.
|
111
|
+
if (isSrc && elm.src && { IMG: 1, INPUT: 1 }[elm.nodeName]) {
|
112
|
+
if ((/\.png/i).test(elm.src)) {
|
113
|
+
if (!elm.oSrc) {
|
114
|
+
// MM rollover compat
|
115
|
+
elm.oSrc = elm.src;
|
116
|
+
}
|
117
|
+
this.fix(elm, elm.src, 2);
|
118
|
+
} else if (elm.src.indexOf(blank) == -1) {
|
119
|
+
this.fix(elm, '');
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
// Backgrounds.
|
124
|
+
var bgSrc = eCS.backgroundImage || eS.backgroundImage;
|
125
|
+
if ((bgSrc + elm.src).indexOf(blank) == -1) {
|
126
|
+
var bgPNG = bgSrc.match(/url[("']+(.*\.png[^\)"']*)[\)"']/i);
|
127
|
+
if (bgPNG) {
|
128
|
+
if (this.tileBG && !{ IMG: 1, INPUT: 1 }[elm.nodeName]) {
|
129
|
+
this.tileBG(elm, bgPNG[1]);
|
130
|
+
this.fix(elm, '', 1);
|
131
|
+
} else {
|
132
|
+
if (data.tiles && data.tiles.src) {
|
133
|
+
this.tileBG(elm, '');
|
134
|
+
}
|
135
|
+
this.fix(elm, bgPNG[1], 1);
|
136
|
+
this.childFix(elm);
|
137
|
+
}
|
138
|
+
} else {
|
139
|
+
if (data.tiles && data.tiles.src) {
|
140
|
+
this.tileBG(elm, '');
|
141
|
+
}
|
142
|
+
this.fix(elm, '');
|
143
|
+
}
|
144
|
+
} else if ((isPos || isClass) && data.tiles && data.tiles.src) {
|
145
|
+
this.tileBG(elm, data.tiles.src);
|
146
|
+
}
|
147
|
+
|
148
|
+
if (init) {
|
149
|
+
this.hook.enabled = 1;
|
150
|
+
elm.attachEvent('onpropertychange', this.hook);
|
151
|
+
}
|
152
|
+
};
|
153
|
+
|
154
|
+
|
155
|
+
IEPNGFix.childFix = function(elm) {
|
156
|
+
// "hasLayout" fix for unclickable children inside PNG backgrounds.
|
157
|
+
var tags = [
|
158
|
+
'a',
|
159
|
+
'input',
|
160
|
+
'select',
|
161
|
+
'textarea',
|
162
|
+
'button',
|
163
|
+
'iframe',
|
164
|
+
'object'
|
165
|
+
],
|
166
|
+
t = tags.length,
|
167
|
+
tFix = [];
|
168
|
+
while (t--) {
|
169
|
+
var pFix = elm.all.tags(tags[t]),
|
170
|
+
e = pFix.length;
|
171
|
+
while (e--) {
|
172
|
+
tFix.push(pFix[e]);
|
173
|
+
}
|
174
|
+
}
|
175
|
+
t = tFix.length;
|
176
|
+
if (t && (/relative|absolute/i).test(elm.currentStyle.position)) {
|
177
|
+
alert('IEPNGFix: Unclickable children of element:' +
|
178
|
+
'\n\n<' + elm.nodeName + (elm.id && ' id=' + elm.id) + '>');
|
179
|
+
}
|
180
|
+
while (t--) {
|
181
|
+
if (!(/relative|absolute/i).test(tFix[t].currentStyle.position)) {
|
182
|
+
tFix[t].style.position = 'relative';
|
183
|
+
}
|
184
|
+
}
|
185
|
+
};
|
186
|
+
|
187
|
+
|
188
|
+
IEPNGFix.hook = function() {
|
189
|
+
if (IEPNGFix.hook.enabled) {
|
190
|
+
IEPNGFix.process(element, 0);
|
191
|
+
}
|
192
|
+
};
|
193
|
+
|
194
|
+
|
195
|
+
IEPNGFix.process(element, 1);
|
196
|
+
|
197
|
+
</script>
|
198
|
+
</public:component>
|
@@ -0,0 +1,293 @@
|
|
1
|
+
/*
|
2
|
+
###############################################################################
|
3
|
+
|
4
|
+
Application styles defaults
|
5
|
+
Build by InfoEther www.infoether.com
|
6
|
+
Summer 2010
|
7
|
+
|
8
|
+
###############################################################################
|
9
|
+
*/
|
10
|
+
|
11
|
+
body {
|
12
|
+
background-color: white;
|
13
|
+
color: #333;
|
14
|
+
font-family: Verdana, Helvetica, Arial, sans-serif;
|
15
|
+
font-size: 11px;
|
16
|
+
line-height: 1.636em; /* ~18px @ 11px font-size */
|
17
|
+
margin: 0;
|
18
|
+
padding: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
/*
|
22
|
+
###############################################################################
|
23
|
+
# GLOBAL ELEMENTS
|
24
|
+
###############################################################################
|
25
|
+
*/
|
26
|
+
|
27
|
+
/* Fonts */
|
28
|
+
/*
|
29
|
+
Uses Bulletproof Font Declaration:
|
30
|
+
http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/#smiley
|
31
|
+
*/
|
32
|
+
|
33
|
+
@font-face { font-family: Whitney;
|
34
|
+
/*src: url('../fonts/Whitney-Book.eot');*/
|
35
|
+
src: local('☺'),
|
36
|
+
url('../fonts/Whitney-Book.otf') format('opentype'); }
|
37
|
+
|
38
|
+
|
39
|
+
/* Headlines */
|
40
|
+
|
41
|
+
h1 {
|
42
|
+
font-family: Georgia, Times, serif;
|
43
|
+
font-size: 2.0em; /* ~22px @ 11px font-size */
|
44
|
+
margin-bottom: 0.5em;
|
45
|
+
}
|
46
|
+
|
47
|
+
h2 {
|
48
|
+
font-family: Georgia, Times, serif;
|
49
|
+
font-size: 1.636em; /* ~18px @ 11px font-size */
|
50
|
+
}
|
51
|
+
|
52
|
+
h3 {
|
53
|
+
font-size: 1.3em; /* ~14px @ 11px font-size */
|
54
|
+
}
|
55
|
+
|
56
|
+
p {
|
57
|
+
margin-bottom: 1em; /* 11px */
|
58
|
+
}
|
59
|
+
|
60
|
+
/* Rule lines */
|
61
|
+
|
62
|
+
hr {
|
63
|
+
border: 0;
|
64
|
+
border-top: 1px solid #d7d3ce;
|
65
|
+
margin-top: 10px;
|
66
|
+
}
|
67
|
+
|
68
|
+
hr.harvardrule {
|
69
|
+
background-color: #fff;
|
70
|
+
border: 0;
|
71
|
+
border-bottom: 1px solid #aaa;
|
72
|
+
border-top: 4px solid #aaa;
|
73
|
+
color: #fff;
|
74
|
+
height: 2px;
|
75
|
+
margin: 2px 0 7px 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
hr.solidthickrule {
|
79
|
+
background-color: #d7d3ce;
|
80
|
+
border-top: none;
|
81
|
+
height: 8px;
|
82
|
+
margin-bottom: 3px;
|
83
|
+
}
|
84
|
+
|
85
|
+
hr.doublerule {
|
86
|
+
background-color: #f0efe9;
|
87
|
+
border: 0;
|
88
|
+
border-bottom: 1px solid #aaa;
|
89
|
+
border-top: 1px solid #aaa;
|
90
|
+
color: #f0efe9;
|
91
|
+
height: 2px;
|
92
|
+
margin: 7px 0;
|
93
|
+
}
|
94
|
+
|
95
|
+
/* Links */
|
96
|
+
|
97
|
+
a,
|
98
|
+
a:link,
|
99
|
+
a:visited {
|
100
|
+
color: blue;
|
101
|
+
font-weight: bold;
|
102
|
+
outline: none;
|
103
|
+
text-decoration: none;
|
104
|
+
-webkit-transition: color .2s linear; /* This will cause the hover state to fade in */
|
105
|
+
}
|
106
|
+
|
107
|
+
a:hover,
|
108
|
+
a:active {
|
109
|
+
color: rgba(x,x,x,.65); /* CSS3 rule */
|
110
|
+
text-decoration: underline;
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
/*
|
115
|
+
###############################################################################
|
116
|
+
# PAGE STRUCTURE
|
117
|
+
###############################################################################
|
118
|
+
*/
|
119
|
+
|
120
|
+
|
121
|
+
/*
|
122
|
+
###############################################################################
|
123
|
+
# HEADER
|
124
|
+
###############################################################################
|
125
|
+
*/
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
/*
|
130
|
+
###############################################################################
|
131
|
+
# NAVIGATION
|
132
|
+
###############################################################################
|
133
|
+
*/
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
/*
|
138
|
+
###############################################################################
|
139
|
+
# FOOTER
|
140
|
+
###############################################################################
|
141
|
+
*/
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
/*
|
147
|
+
###############################################################################
|
148
|
+
# FORMS
|
149
|
+
###############################################################################
|
150
|
+
*/
|
151
|
+
|
152
|
+
form {
|
153
|
+
border: 0;
|
154
|
+
margin: 0;
|
155
|
+
padding: 0;
|
156
|
+
}
|
157
|
+
|
158
|
+
form p {
|
159
|
+
margin: 0 0 1.2em 0;
|
160
|
+
}
|
161
|
+
|
162
|
+
form label {
|
163
|
+
color: #666;
|
164
|
+
display: block;
|
165
|
+
font-weight: bold;
|
166
|
+
}
|
167
|
+
|
168
|
+
form em {
|
169
|
+
display: block;
|
170
|
+
font-style: italic;
|
171
|
+
}
|
172
|
+
|
173
|
+
form input{
|
174
|
+
border: 1px solid #e0e1e2;
|
175
|
+
color: #333;
|
176
|
+
display: block;
|
177
|
+
font-size: 14px;
|
178
|
+
margin-bottom: 10px;
|
179
|
+
padding: 5px;
|
180
|
+
}
|
181
|
+
|
182
|
+
input[type="text"],
|
183
|
+
input[type="password"] { }
|
184
|
+
|
185
|
+
form input[type="file"] {
|
186
|
+
border: none;
|
187
|
+
width: auto;
|
188
|
+
}
|
189
|
+
|
190
|
+
form input[type="hidden"] {
|
191
|
+
border: 0;
|
192
|
+
height: 0;
|
193
|
+
margin: 0;
|
194
|
+
padding: 0;
|
195
|
+
width: 0;
|
196
|
+
}
|
197
|
+
|
198
|
+
form input[type="image"] {
|
199
|
+
border: none;
|
200
|
+
margin: 0 0 0 10px;
|
201
|
+
padding: 0;
|
202
|
+
width: auto;
|
203
|
+
}
|
204
|
+
|
205
|
+
form input[type="checkbox"] {
|
206
|
+
display: inline;
|
207
|
+
}
|
208
|
+
|
209
|
+
label.inline {display: inline;}
|
210
|
+
|
211
|
+
/*
|
212
|
+
###############################################################################
|
213
|
+
# MAIN STYLES
|
214
|
+
###############################################################################
|
215
|
+
*/
|
216
|
+
|
217
|
+
p.rightfunction {
|
218
|
+
float: right;
|
219
|
+
}
|
220
|
+
|
221
|
+
p.submitrow {vertical-align: middle;}
|
222
|
+
p.submitrow input {vertical-align: middle;}
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
/*
|
227
|
+
###############################################################################
|
228
|
+
# FLASH NOTICES
|
229
|
+
###############################################################################
|
230
|
+
*/
|
231
|
+
|
232
|
+
/* The icons here are from SimpleBits Stockholm set */
|
233
|
+
|
234
|
+
#flash p {
|
235
|
+
background-position: 10px 3px;
|
236
|
+
background-repeat: no-repeat;
|
237
|
+
line-height: 20px;
|
238
|
+
margin: 0 auto 20px;
|
239
|
+
padding: 5px 5px 5px 40px;
|
240
|
+
}
|
241
|
+
|
242
|
+
#flash p.news {
|
243
|
+
background-color: #fff6bf;
|
244
|
+
background-image: url("/images/icon_alert_24.png");
|
245
|
+
border: 1px solid #ffd324;
|
246
|
+
color: #666;
|
247
|
+
}
|
248
|
+
|
249
|
+
#flash p.error {
|
250
|
+
background-color: #fcc;
|
251
|
+
background-image: url("/images/icon_close_24.png");
|
252
|
+
border: 1px solid #900;
|
253
|
+
color: #900;
|
254
|
+
}
|
255
|
+
|
256
|
+
#flash p.notice {
|
257
|
+
background-color: #cfc;
|
258
|
+
background-image: url("/images/icon_check_24.png");
|
259
|
+
border: 1px solid #090;
|
260
|
+
color: #090;
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
/*
|
265
|
+
###############################################################################
|
266
|
+
# MISC
|
267
|
+
###############################################################################
|
268
|
+
*/
|
269
|
+
|
270
|
+
a img {
|
271
|
+
border: none;
|
272
|
+
}
|
273
|
+
|
274
|
+
.hide {
|
275
|
+
display: none;
|
276
|
+
}
|
277
|
+
|
278
|
+
strong {
|
279
|
+
font-weight: bold important!;
|
280
|
+
}
|
281
|
+
|
282
|
+
/* Clearfix*/
|
283
|
+
|
284
|
+
.group:after {
|
285
|
+
content: ".";
|
286
|
+
display: block;
|
287
|
+
height: 0;
|
288
|
+
clear: both;
|
289
|
+
visibility: hidden;
|
290
|
+
}
|
291
|
+
|
292
|
+
/* MSIE PNG Fix Global */
|
293
|
+
img, div, a, input { behavior: url(/stylesheets/iepngfix.htc) }
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/* reset reload by Eric Meyer: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */
|
2
|
+
html, body, div, span, applet, object, iframe,
|
3
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
4
|
+
a, abbr, acronym, address, big, cite, code,
|
5
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
6
|
+
small, strike, strong, sub, sup, tt, var,
|
7
|
+
dl, dt, dd, ol, ul, li,
|
8
|
+
fieldset, form, label, legend,
|
9
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
10
|
+
margin: 0;
|
11
|
+
padding: 0;
|
12
|
+
border: 0;
|
13
|
+
outline: 0;
|
14
|
+
font-weight: inherit;
|
15
|
+
font-style: inherit;
|
16
|
+
font-size: 100%;
|
17
|
+
font-family: inherit;
|
18
|
+
vertical-align: baseline;
|
19
|
+
}
|
20
|
+
/* remember to define focus styles! */
|
21
|
+
:focus {
|
22
|
+
outline: 0;
|
23
|
+
}
|
24
|
+
body {
|
25
|
+
line-height: 1;
|
26
|
+
color: black;
|
27
|
+
background: white;
|
28
|
+
}
|
29
|
+
ol, ul {
|
30
|
+
list-style: none;
|
31
|
+
}
|
32
|
+
/* tables still need 'cellspacing="0"' in the markup */
|
33
|
+
table {
|
34
|
+
border-collapse: separate;
|
35
|
+
border-spacing: 0;
|
36
|
+
}
|
37
|
+
caption, th, td {
|
38
|
+
text-align: left;
|
39
|
+
font-weight: normal;
|
40
|
+
}
|
41
|
+
blockquote:before, blockquote:after,
|
42
|
+
q:before, q:after {
|
43
|
+
content: "";
|
44
|
+
}
|
45
|
+
blockquote, q {
|
46
|
+
quotes: "" "";
|
47
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
html,body {background-color:white;font-family:Helvetica, Verdana, Arial, sans-serif;font-size:12px;height:100%;line-height:18px;margin:0px;padding:0px;}
|
2
|
+
|
3
|
+
h1 {font-size: 18px; margin: 10px 0;}
|
4
|
+
h2 {font-size: 14px; font-weight: bold;}
|
5
|
+
h3 {font-size: 12px; font-weight: bold;}
|
6
|
+
|
7
|
+
a {color:#5d5e5e;text-decoration: none;}
|
8
|
+
a:hover, a:active {color:#5d5e5e; text-decoration: underline;}
|
9
|
+
|
10
|
+
#all {background-color:white;color:#5d5e5e;min-height:100%;position:relative;}
|
11
|
+
|
12
|
+
.crumbs {font-size:10px;font-weight:normal;font-style:italic;text-transform:none;height:10px;padding:0;margin:0;}
|
13
|
+
.crumbs a {padding:0;margin:0;}
|
14
|
+
.crumbs span {font-size:12px;margin-left:5px;margin-right:5px;}
|
15
|
+
|
16
|
+
#content {overflow:auto;padding:10px 20px 0px 55px;padding-bottom:30px;width:950px;} /* bottom padding needs to match footer height */
|
17
|
+
|
18
|
+
#masthead {color:#a0a1a2;height:40px;padding-top:15px;width:100%;border-bottom:1px solid #e0e1e2;}
|
19
|
+
#masthead a:active, #masthead a:hover {color:#5d5e5e;text-decoration:underline;}
|
20
|
+
#masthead a:link, #masthead a:visited {color:#a0a1a2;text-decoration:none;}
|
21
|
+
|
22
|
+
#footer {bottom:0px;color:#a0a1a2;height:30px;position:absolute;width:100%;border-top:1px solid #e0e1e2;font-size:10px;}
|
23
|
+
#footer_content {padding:5px 20px;padding-bottom:0px;width:950px;overflow:auto;}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Description:
|
2
|
+
The startup_nav generator creates generic navigation with a customizable helper and stylesheet.
|
3
|
+
|
4
|
+
With no arguments, a top_nav partial and helper_method will be generated.
|
5
|
+
All arguments given to the generator will add additional nav partial and helper method.
|
6
|
+
|
7
|
+
Examples:
|
8
|
+
script/generate startup_nav
|
9
|
+
|
10
|
+
Template: app/views/layouts/_top_nav.html.erb
|
11
|
+
Stylesheet: public/stylesheets/nav.css
|
12
|
+
Helper: app/helpers/nav_helper.rb
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'startups'
|
2
|
+
|
3
|
+
class StartupNavGenerator < Rails::Generator::Base
|
4
|
+
|
5
|
+
def manifest
|
6
|
+
record do |m|
|
7
|
+
m.directory 'app/views/layouts'
|
8
|
+
m.directory 'public/stylesheets'
|
9
|
+
m.directory 'app/helpers'
|
10
|
+
|
11
|
+
#add top and footer by default
|
12
|
+
unless @args.include? "top"
|
13
|
+
@args << "top"
|
14
|
+
@args << "footer"
|
15
|
+
end
|
16
|
+
|
17
|
+
m.template "nav.css", "public/stylesheets/nav.css", :assigns => { :names => @args }
|
18
|
+
m.template "nav_helper.rb", "app/helpers/nav_helper.rb", :assigns => { :names => @args }
|
19
|
+
@args.each do |name|
|
20
|
+
m.template "_nav.html.erb", "app/views/layouts/_#{name}_nav.html.erb", :assigns => { :name => name }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def banner
|
28
|
+
<<-EOS
|
29
|
+
Creates generic navigation with a customizable helper and stylesheet.
|
30
|
+
|
31
|
+
USAGE: #{$0} #{spec.name}
|
32
|
+
EOS
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<% names.each do |name|
|
2
|
+
css_id = (name.to_s == 'top') ? 'nav' : "#{name}_nav"
|
3
|
+
selected_color = (name.to_s == 'footer') ? '#5d5e5e' : 'black'
|
4
|
+
%>
|
5
|
+
|
6
|
+
/************
|
7
|
+
<%= css_id.upcase %> STYLES
|
8
|
+
************/
|
9
|
+
<% if name.to_s == 'footer' %>
|
10
|
+
#footer_nav {float:right;}
|
11
|
+
#footer_nav ul {list-style-type:none;}
|
12
|
+
#footer_nav li {float:left;margin-right:20px;}
|
13
|
+
#footer_nav a {display:block;position:relative;text-decoration:none;text-transform:uppercase;}
|
14
|
+
#footer_nav a:visited {color:#a0a1a2;text-decoration:none;}
|
15
|
+
#footer_nav a:link {color:#a0a1a2;text-decoration:none;}
|
16
|
+
#footer_nav a:hover {color:#5d5e5e;text-decoration:underline;}
|
17
|
+
#footer_nav a:active {color:#5d5e5e;text-decoration:underline;}
|
18
|
+
<% else %>
|
19
|
+
#<%= css_id %> {margin-left:22px;}
|
20
|
+
#<%= css_id %> ul {list-style-type:none;overflow:auto;}
|
21
|
+
#<%= css_id %> li {float:left;}
|
22
|
+
#<%= css_id %> a {display:block;height:20px;padding:5px 10px;position:relative;text-decoration:none;text-transform:uppercase;}
|
23
|
+
#<%= css_id %> a:visited {color:#a0a1a2;text-decoration:none;}
|
24
|
+
#<%= css_id %> a:link {color:#a0a1a2;text-decoration:none;}
|
25
|
+
#<%= css_id %> a:hover {color:#5d5e5e;text-decoration:none;}
|
26
|
+
#<%= css_id %> a:active {color:#5d5e5e;text-decoration:none;}
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
/* any additional menu items need to be added here for them to be styled correctly when selected. */
|
30
|
+
body#home a#<%= css_id %>_home,
|
31
|
+
body#example a#<%= css_id %>_example,
|
32
|
+
body#help a#<%= css_id %>_help {
|
33
|
+
color:<%= selected_color %>;font-weight:bold;
|
34
|
+
}
|
35
|
+
|
36
|
+
<% end %>
|