flutie 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile ADDED
@@ -0,0 +1,54 @@
1
+ h1. Flutie
2
+
3
+ Basic, default styles for rails applications
4
+
5
+ h2. Installation
6
+
7
+ Flutie is a Rails engine. It works with versions of Rails greater than 3.0.
8
+
9
+ Flutie is recommended to be run as a gem and included in your Gemfile.
10
+
11
+ $ rake flutie:install
12
+
13
+ The installer will copy the Flutie stylesheets into public/flutie/stylesheets
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ h2. Usage
20
+
21
+ Flutie registers a :flutie shortcut for stylesheets, so in your layout you can do...
22
+
23
+ <%= stylesheet_link_tag :flutie, 'admin', :cache => true %>
24
+
25
+ ...this will include all the flutie stylesheets, then the 'admin' stylesheet, and it will cache them all into one file.
26
+
27
+ To add custom styles to the styleguide add partials to the app/views/styleguides directory. For example:
28
+
29
+ bc. app/views/styleguides/_todo_item.erb:
30
+
31
+ bc.. <ol>
32
+ <li class="todo">This is a todo item</li>
33
+ </ol>
34
+
35
+ p. Plugin authors can also add to the styleguide by ensuring that their view path
36
+ is in ActionController::Base.view_paths and by placing a partial under the
37
+ styleguides directory. For example:
38
+
39
+ bc. ActionController::Base.append_view_path(File.join(File.dirname(__FILE__), 'views'))
40
+
41
+ bc. my_awesome_plugin/views/styleguides/_pagination.erb:
42
+
43
+ bc.. <div class="pagination">
44
+ <a href="#prev">Previous</a>
45
+ <a href="#next">Next</a>
46
+ </div>
47
+
48
+ h2. Authors
49
+
50
+ Flutie was written by thoughtbot, inc.
51
+
52
+ h2. Suggestions, Bugs, Refactoring?
53
+
54
+ Fork away and create a "Github Issue":http://github.com/thoughtbot/flutie/issues. Please don't send pull requests.
@@ -0,0 +1,27 @@
1
+ module Flutie
2
+
3
+ class StyleguidesController < ApplicationController
4
+
5
+ unloadable
6
+
7
+ def show
8
+ @styleguides = styleguides
9
+ render :layout => "flutie" if params[:flutie] == "true"
10
+ end
11
+
12
+ private
13
+
14
+ def styleguides
15
+ all_styleguide_partials = ActionController::Base.view_paths.map do |view_path|
16
+ styleguide_path = File.join(view_path.to_s, 'styleguides')
17
+ if File.exists?(styleguide_path)
18
+ Dir.glob(styleguide_path + '/_*.*')
19
+ else
20
+ nil
21
+ end
22
+ end
23
+ all_styleguide_partials.flatten.compact
24
+ end
25
+ end
26
+
27
+ end
@@ -0,0 +1,742 @@
1
+ <div>
2
+ <div style="padding: 15px; text-align: right;">
3
+ <% if params[:flutie] -%>
4
+ <%= link_to "Application Styles", :flutie => false %>
5
+ <% else -%>
6
+ <%= link_to "Default Styles", :flutie => true %>
7
+ <% end -%>
8
+ </div>
9
+
10
+ <h1>This is an example page of our basic styles</h1>
11
+ <h2>This is an h2 level heading</h2>
12
+
13
+ <p>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 <a href="#">multiple occasions</a> 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.</p>
14
+
15
+ <p>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.</p>
16
+
17
+ <blockquote>
18
+ <p>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.</p>
19
+ </blockquote>
20
+
21
+ <h3>This is an h3 level heading</h3>
22
+ <p>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.</p>
23
+
24
+ <br />
25
+ <hr />
26
+ <br />
27
+
28
+ <h1>This is an h1 heading</h1>
29
+ <h2>This is an h2 heading</h2>
30
+ <h3>This is an h3 heading</h3>
31
+ <h4>This is an h4 heading</h4>
32
+ <h5>This is an h5 heading</h5>
33
+ <h6>This is an h6 heading</h6>
34
+
35
+ <br />
36
+ <hr />
37
+ <br />
38
+
39
+ <h1>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.</h1>
40
+ <p>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.”</p>
41
+ <h2>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.</h2>
42
+ <p>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.</p>
43
+ <h3>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.</h3>
44
+ <p>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.</p>
45
+ <h4>This is an h4 heading</h4>
46
+ <p>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.</p>
47
+
48
+ <p>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.</p>
49
+
50
+
51
+ <h2>List styles</h2>
52
+
53
+ <ul>
54
+ <li>Unordered list test</li>
55
+ <li>Another list element. Lorem ipsum dolor sit amet, consectetur adipisicing elit.</li>
56
+ <li>Yet another element in the list</li>
57
+ <li>Some long text. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.</li>
58
+ </ul>
59
+ <ol>
60
+ <li>Ordered list test</li>
61
+ <li>Another list element</li>
62
+ <li>Yet another element in the list</li>
63
+ <li>How many things do you really need in a list</li>
64
+ </ol>
65
+
66
+ <ol>
67
+ <li>Outer Ordered list item</li>
68
+ <li>Outer Ordered list item
69
+ <ul>
70
+ <li>Nested Unordered list item</li>
71
+ <li>Nested Unordered list item
72
+ <ol>
73
+ <li>Inner Nested Ordered list item</li>
74
+ <li>Inner Nested Ordered list item</li>
75
+ </ol>
76
+ </li>
77
+ </ul>
78
+ </li>
79
+ <li>Outer Ordered list item</li>
80
+ <li>Outer Ordered list item
81
+ <ol>
82
+ <li>Nested Ordered list item</li>
83
+ <li>Nested Ordered list item
84
+ <ul>
85
+ <li>Inner Nested Unordered list item</li>
86
+ <li>Inner Nested Unordered list item</li>
87
+ </ul>
88
+ </li>
89
+ </ol>
90
+ </li>
91
+ </ol>
92
+
93
+ <dl>
94
+ <dt>definition list dt</dt>
95
+ <dd>definition list dd</dd>
96
+ <dt>definition list dt</dt>
97
+ <dd>definition list dd</dd>
98
+ <dt>definition list dt</dt>
99
+ <dd>definition list dd one</dd>
100
+ <dd>definition list dd two</dd>
101
+ </dl>
102
+
103
+
104
+
105
+
106
+ <h2>Basic form styles</h2>
107
+
108
+ <form id="dummy" action="" method="post">
109
+ <fieldset class="inputs">
110
+ <h5 class="legend">Simple sample form</h5>
111
+
112
+ <ol>
113
+ <li class="string required title" id="dummy0_input">
114
+ <label for="dummy0">Text input<abbr title="required">*</abbr></label>
115
+ <input id="dummy0" name="dummy0" type="text" maxlength="255" size="50" value="This is some text" />
116
+ <p class="inline-hints">this is some hint text</p>
117
+ </li>
118
+ <li class="string required title" id="dummy1_input">
119
+ <label for="dummy1">Disabled text input<abbr title="required">*</abbr></label>
120
+ <input id="dummy1" name="dummy1" type="text" maxlength="255" size="50" disabled="disabled" value="You're not allowed to enter text here" />
121
+ <p class="inline-hints">You need to be an admin to edit this</p>
122
+ </li>
123
+ <li class="string required" id="dummy2_input">
124
+ <label for="dummy2">Another field<abbr title="required">*</abbr></label>
125
+ <input id="dummy2" name="dummy2" type="text" maxlength="255" size="50" value="" />
126
+ </li>
127
+
128
+ <li class="string required error" id="dummy3_input">
129
+ <label for="dummy3">Text with error<abbr title="required">*</abbr></label>
130
+ <input id="dummy3" name="dummy3" type="text" maxlength="255" size="50" value="" />
131
+ <p class="inline-errors">can't be blank</p>
132
+ </li>
133
+
134
+ <li class="text required" id="dummy4_input">
135
+ <label for="dummy4">Textarea<abbr title="required">*</abbr></label>
136
+ <textarea cols="40" id="dummy4" name="dummy4" rows="20"></textarea>
137
+ </li>
138
+
139
+ <li class="file optional" id="dummy5_input">
140
+ <label for="dummy5">File</label>
141
+ <input id="dummy5" name="dummy5" size="30" type="file" />
142
+ </li>
143
+
144
+ <li class="password required" id="dummy6_input">
145
+ <label for="dummy6">Password<abbr title="required">*</abbr></label>
146
+ <input id="dummy6" maxlength="255" name="dummy6" size="50" type="password" value="pass" />
147
+ </li>
148
+ </ol>
149
+
150
+ </fieldset>
151
+
152
+ <fieldset class="inputs">
153
+ <h5 class="legend">Select, checkboxes, lists</h5>
154
+
155
+ <ol>
156
+ <li class="select optional" id="dummy7_input">
157
+ <label for="dummy7">Name</label>
158
+ <select id="dummy7" name="dummy7">
159
+ <option value=""></option>
160
+ <option value="1">Ottawa</option>
161
+ <option value="2">Calgary</option>
162
+ <option value="3">Moosejaw</option>
163
+ </select>
164
+ <p class="inline-hints">this is some hint text</p>
165
+ </li>
166
+
167
+ <li class="select optional" id="dummy8_input">
168
+ <label for="dummy8">Select with groups</label>
169
+ <select id="dummy8" name="dummy8">
170
+ <optgroup label="mammals">
171
+ <option>dog</option>
172
+ <option>cat</option>
173
+ <option>rabbit</option>
174
+ <option>horse</option>
175
+ </optgroup>
176
+ <optgroup label="reptiles">
177
+ <option>iguana</option>
178
+ <option>snake</option>
179
+ </optgroup>
180
+ </select>
181
+ </li>
182
+
183
+ <li class="select optional error" id="dummy9_input">
184
+ <label for="dummy9">Select with error</label>
185
+ <select id="dummy9" name="dummy9">
186
+ <option value=""></option>
187
+ <option value="1">Ottawa</option>
188
+ <option value="2">Calgary</option>
189
+ <option value="3">Moosejaw</option>
190
+ </select>
191
+ <p class="inline-errors">can't be blank</p>
192
+ </li>
193
+
194
+ <li class="radio optional" id="dummy10_input">
195
+ <fieldset>
196
+ <h5 class="legend">
197
+ <span class="label">Radio Buttons</span>
198
+ </h5>
199
+ <ol>
200
+ <li>
201
+ <label for="dummy10_mastercard">
202
+ <input id="dummy10_mastercard" name="dummy10" type="radio" value="MasterCard" /> MasterCard
203
+ </label>
204
+ </li>
205
+ <li>
206
+ <label for="dummy11_discover">
207
+ <input id="dummy11_discover" name="dummy11" type="radio" value="Discover" /> Discover
208
+ </label>
209
+ </li>
210
+ <li>
211
+ <label for="dummy12_visa">
212
+ <input id="dummy12_visa" name="dummy12" type="radio" value="Visa" /> Visa
213
+ </label>
214
+ </li>
215
+ <li>
216
+ <label for="dummy13_american_express">
217
+ <input id="dummy13_american_express" name="dummy13" type="radio" value="American Express" /> American Express
218
+ </label>
219
+ </li>
220
+ </ol>
221
+ </fieldset>
222
+ <p class="inline-hints">this is some hint text</p>
223
+ </li>
224
+
225
+ <li class="check_boxes optional" id="dummy14_input">
226
+ <fieldset>
227
+ <h5 class="legend"><span class="label">Checkboxes</span></h5>
228
+ <ol>
229
+ <li>
230
+ <label for="dummy14_mastercard">
231
+ <input name="dummy14[]" type="hidden" value="" />
232
+ <input id="dummy14_mastercard" name="dummy14[]" type="checkbox" value="MasterCard" /> MasterCard
233
+ </label>
234
+ </li>
235
+ <li>
236
+ <label for="dummy14_discover">
237
+ <input name="dummy14[]" type="hidden" value="" />
238
+ <input id="dummy14_discover" name="dummy14[]" type="checkbox" value="Discover" /> Discover
239
+ </label>
240
+ </li>
241
+ <li>
242
+ <label for="dummy14_visa">
243
+ <input name="dummy14[]" type="hidden" value="" />
244
+ <input id="dummy14_visa" name="dummy14[]" type="checkbox" value="Visa" /> Visa
245
+ </label>
246
+ </li>
247
+ <li>
248
+ <label for="dummy14_american_express">
249
+ <input name="dummy14[]" type="hidden" value="" />
250
+ <input id="dummy14_american_express" name="dummy14[]" type="checkbox" value="American Express" /> American Express
251
+ </label>
252
+ </li>
253
+ </ol>
254
+ </fieldset>
255
+ </li>
256
+
257
+ <li class="datetime optional" id="dummy15_input">
258
+ <fieldset>
259
+ <h5 class="legend"><span class="label">Date and Time Selector</span></h5>
260
+ <ol>
261
+ <li>
262
+ <label for="dummy15_1i">Year</label>
263
+ <select id="dummy15_1i" name="dummy15(1i)">
264
+ <option value="2007">2007</option>
265
+ <option value="2008">2008</option>
266
+ <option selected="selected" value="2009">2009</option>
267
+ <option value="2010">2010</option>
268
+ </select>
269
+ </li>
270
+ <li>
271
+ <label for="dummy15_2i">Month</label>
272
+ <select id="dummy15_2i" name="dummy15(2i)">
273
+ <option value="1">January</option>
274
+ <option value="2">February</option>
275
+ <option value="3">March</option>
276
+ <option value="4">April</option>
277
+ <option value="5">May</option>
278
+ <option value="6">June</option>
279
+ <option selected="selected" value="7">July</option>
280
+ <option value="8">August</option>
281
+ <option value="9">September</option>
282
+ <option value="10">October</option>
283
+ <option value="11">November</option>
284
+ <option value="12">December</option>
285
+ </select>
286
+ </li>
287
+ <li>
288
+ <label for="dummy15_3i">Day</label>
289
+ <select id="dummy15_3i" name="dummy15(3i)">
290
+ <option value="1">1</option>
291
+ <option value="2">2</option>
292
+ <option value="3">3</option>
293
+ <option value="4">4</option>
294
+ <option value="5">5</option>
295
+ <option value="6">6</option>
296
+ <option value="7">7</option>
297
+ <option value="8">8</option>
298
+ <option value="9">9</option>
299
+ <option selected="selected" value="10">10</option>
300
+ <option value="11">11</option>
301
+ <option value="12">12</option>
302
+ <option value="13">13</option>
303
+ <option value="14">14</option>
304
+ <option value="15">15</option>
305
+ <option value="16">16</option>
306
+ <option value="17">17</option>
307
+ <option value="18">18</option>
308
+ <option value="19">19</option>
309
+ <option value="20">20</option>
310
+ <option value="21">21</option>
311
+ <option value="22">22</option>
312
+ <option value="23">23</option>
313
+ <option value="24">24</option>
314
+ <option value="25">25</option>
315
+ <option value="26">26</option>
316
+ <option value="27">27</option>
317
+ <option value="28">28</option>
318
+ <option value="29">29</option>
319
+ <option value="30">30</option>
320
+ <option value="31">31</option>
321
+ </select>
322
+ </li>
323
+ <li>
324
+ <label for="dummy15_4i">Hour</label>
325
+ <select id="dummy15_4i" name="dummy15(4i)">
326
+ <option value="00">00</option>
327
+ <option value="01">01</option>
328
+ <option value="02">02</option>
329
+ <option value="03">03</option>
330
+ <option value="04">04</option>
331
+ <option value="05">05</option>
332
+ <option value="06">06</option>
333
+ <option value="07">07</option>
334
+ <option value="08">08</option>
335
+ <option value="09">09</option>
336
+ <option value="10">10</option>
337
+ <option value="11">11</option>
338
+ <option selected="selected" value="12">12</option>
339
+ <option value="13">13</option>
340
+ <option value="14">14</option>
341
+ <option value="15">15</option>
342
+ <option value="16">16</option>
343
+ <option value="17">17</option>
344
+ <option value="18">18</option>
345
+ <option value="19">19</option>
346
+ <option value="20">20</option>
347
+ <option value="21">21</option>
348
+ <option value="22">22</option>
349
+ <option value="23">23</option>
350
+ </select>
351
+ </li>
352
+ <li>
353
+ <label for="dummy15_5i">Minute</label>
354
+ <select id="dummy15_5i" name="dummy15(5i)">
355
+ <option value="00">00</option>
356
+ <option value="01">01</option>
357
+ <option value="02">02</option>
358
+ <option value="03">03</option>
359
+ <option value="04">04</option>
360
+ <option value="05">05</option>
361
+ <option value="06">06</option>
362
+ <option value="07">07</option>
363
+ <option value="08">08</option>
364
+ <option value="09">09</option>
365
+ <option value="10">10</option>
366
+ <option value="11">11</option>
367
+ <option value="12">12</option>
368
+ <option value="13">13</option>
369
+ <option value="14">14</option>
370
+ <option value="15">15</option>
371
+ <option value="16">16</option>
372
+ <option value="17">17</option>
373
+ <option value="18">18</option>
374
+ <option value="19">19</option>
375
+ <option value="20">20</option>
376
+ <option value="21">21</option>
377
+ <option value="22">22</option>
378
+ <option value="23">23</option>
379
+ <option value="24">24</option>
380
+ <option value="25">25</option>
381
+ <option value="26">26</option>
382
+ <option value="27">27</option>
383
+ <option value="28">28</option>
384
+ <option value="29">29</option>
385
+ <option value="30">30</option>
386
+ <option value="31">31</option>
387
+ <option value="32">32</option>
388
+ <option value="33">33</option>
389
+ <option value="34">34</option>
390
+ <option value="35">35</option>
391
+ <option value="36">36</option>
392
+ <option value="37">37</option>
393
+ <option value="38">38</option>
394
+ <option value="39">39</option>
395
+ <option value="40">40</option>
396
+ <option value="41">41</option>
397
+ <option value="42">42</option>
398
+ <option value="43">43</option>
399
+ <option value="44">44</option>
400
+ <option value="45">45</option>
401
+ <option value="46">46</option>
402
+ <option value="47">47</option>
403
+ <option value="48">48</option>
404
+ <option value="49">49</option>
405
+ <option selected="selected" value="50">50</option>
406
+ <option value="51">51</option>
407
+ <option value="52">52</option>
408
+ <option value="53">53</option>
409
+ <option value="54">54</option>
410
+ <option value="55">55</option>
411
+ <option value="56">56</option>
412
+ <option value="57">57</option>
413
+ <option value="58">58</option>
414
+ <option value="59">59</option>
415
+ </select>
416
+ </li>
417
+ </ol>
418
+ </fieldset>
419
+ </li>
420
+
421
+ <li class="date optional" id="dummy16_input">
422
+ <fieldset>
423
+ <h5 class="legend"><span class="label">Date Selector</span></h5>
424
+ <ol>
425
+ <li>
426
+ <label for="dummy16_1i">Year</label>
427
+ <select id="dummy16_1i" name="dummy16(1i)">
428
+ <option value="2007">2007</option>
429
+ <option value="2008">2008</option>
430
+ <option selected="selected" value="2009">2009</option>
431
+ <option value="2010">2010</option>
432
+ </select>
433
+ </li>
434
+ <li>
435
+ <label for="dummy16_2i">Month</label>
436
+ <select id="dummy16_2i" name="dummy16(2i)">
437
+ <option value="1">January</option>
438
+ <option value="2">February</option>
439
+ <option value="3">March</option>
440
+ <option value="4">April</option>
441
+ <option value="5">May</option>
442
+ <option value="6">June</option>
443
+ <option selected="selected" value="7">July</option>
444
+ <option value="8">August</option>
445
+ <option value="9">September</option>
446
+ <option value="10">October</option>
447
+ <option value="11">November</option>
448
+ <option value="12">December</option>
449
+ </select>
450
+ </li>
451
+ <li>
452
+ <label for="dummy16_3i">Day</label>
453
+ <select id="dummy16_3i" name="dummy16(3i)">
454
+ <option value="1">1</option>
455
+ <option value="2">2</option>
456
+ <option value="3">3</option>
457
+ <option value="4">4</option>
458
+ <option value="5">5</option>
459
+ <option value="6">6</option>
460
+ <option value="7">7</option>
461
+ <option value="8">8</option>
462
+ <option value="9">9</option>
463
+ <option selected="selected" value="10">10</option>
464
+ <option value="11">11</option>
465
+ <option value="12">12</option>
466
+ <option value="13">13</option>
467
+ <option value="14">14</option>
468
+ <option value="15">15</option>
469
+ <option value="16">16</option>
470
+ <option value="17">17</option>
471
+ <option value="18">18</option>
472
+ <option value="19">19</option>
473
+ <option value="20">20</option>
474
+ <option value="21">21</option>
475
+ <option value="22">22</option>
476
+ <option value="23">23</option>
477
+ <option value="24">24</option>
478
+ <option value="25">25</option>
479
+ <option value="26">26</option>
480
+ <option value="27">27</option>
481
+ <option value="28">28</option>
482
+ <option value="29">29</option>
483
+ <option value="30">30</option>
484
+ <option value="31">31</option>
485
+ </select>
486
+ </li>
487
+ </ol>
488
+ </fieldset>
489
+ </li>
490
+
491
+ <li class="time optional" id="dummy17_input">
492
+ <fieldset>
493
+ <h5 class="legend"><span class="label">Time Selector</span></h5>
494
+ <ol>
495
+ <li>
496
+ <label for="dummy17_4i">Hour</label>
497
+ <select id="dummy17_4i" name="dummy17(4i)">
498
+ <option value="00">00</option>
499
+ <option value="01">01</option>
500
+ <option value="02">02</option>
501
+ <option value="03">03</option>
502
+ <option value="04">04</option>
503
+ <option value="05">05</option>
504
+ <option value="06">06</option>
505
+ <option value="07">07</option>
506
+ <option value="08">08</option>
507
+ <option value="09">09</option>
508
+ <option value="10">10</option>
509
+ <option value="11">11</option>
510
+ <option selected="selected" value="12">12</option>
511
+ <option value="13">13</option>
512
+ <option value="14">14</option>
513
+ <option value="15">15</option>
514
+ <option value="16">16</option>
515
+ <option value="17">17</option>
516
+ <option value="18">18</option>
517
+ <option value="19">19</option>
518
+ <option value="20">20</option>
519
+ <option value="21">21</option>
520
+ <option value="22">22</option>
521
+ <option value="23">23</option>
522
+ </select>
523
+ </li>
524
+ <li>
525
+ <span>:</span>
526
+ </li>
527
+ <li>
528
+ <label for="dummy17_5i">Minute</label>
529
+ <select id="dummy17_5i" name="dummy17(5i)">
530
+ <option value="00">00</option>
531
+ <option value="01">01</option>
532
+ <option value="02">02</option>
533
+ <option value="03">03</option>
534
+ <option value="04">04</option>
535
+ <option value="05">05</option>
536
+ <option value="06">06</option>
537
+ <option value="07">07</option>
538
+ <option value="08">08</option>
539
+ <option value="09">09</option>
540
+ <option value="10">10</option>
541
+ <option value="11">11</option>
542
+ <option value="12">12</option>
543
+ <option value="13">13</option>
544
+ <option value="14">14</option>
545
+ <option value="15">15</option>
546
+ <option value="16">16</option>
547
+ <option value="17">17</option>
548
+ <option value="18">18</option>
549
+ <option value="19">19</option>
550
+ <option value="20">20</option>
551
+ <option value="21">21</option>
552
+ <option value="22">22</option>
553
+ <option value="23">23</option>
554
+ <option value="24">24</option>
555
+ <option value="25">25</option>
556
+ <option value="26">26</option>
557
+ <option value="27">27</option>
558
+ <option value="28">28</option>
559
+ <option value="29">29</option>
560
+ <option value="30">30</option>
561
+ <option value="31">31</option>
562
+ <option value="32">32</option>
563
+ <option value="33">33</option>
564
+ <option value="34">34</option>
565
+ <option value="35">35</option>
566
+ <option value="36">36</option>
567
+ <option value="37">37</option>
568
+ <option value="38">38</option>
569
+ <option value="39">39</option>
570
+ <option value="40">40</option>
571
+ <option value="41">41</option>
572
+ <option value="42">42</option>
573
+ <option value="43">43</option>
574
+ <option value="44">44</option>
575
+ <option value="45">45</option>
576
+ <option value="46">46</option>
577
+ <option value="47">47</option>
578
+ <option value="48">48</option>
579
+ <option value="49">49</option>
580
+ <option selected="selected" value="50">50</option>
581
+ <option value="51">51</option>
582
+ <option value="52">52</option>
583
+ <option value="53">53</option>
584
+ <option value="54">54</option>
585
+ <option value="55">55</option>
586
+ <option value="56">56</option>
587
+ <option value="57">57</option>
588
+ <option value="58">58</option>
589
+ <option value="59">59</option>
590
+ </select>
591
+ </li>
592
+ </ol>
593
+ </fieldset>
594
+ </li>
595
+
596
+ </ol>
597
+ </fieldset>
598
+
599
+ <fieldset class="buttons">
600
+ <ol>
601
+ <li class="commit">
602
+ <input id="dummy_submit" name="commit" type="submit" value="Submit" />
603
+ </li>
604
+ <li>
605
+ <a class="cancel" href="#">Cancel</a>
606
+ </li>
607
+ </ol>
608
+ </fieldset>
609
+
610
+ </form>
611
+
612
+ <h2>Miscellaneous Styles</h2>
613
+
614
+ <div class="error">
615
+ This is a &lt;div&gt; with the class <strong>.error</strong>.
616
+ </div>
617
+ <div class="notice">
618
+ This is a &lt;div&gt; with the class <strong>.notice</strong>.
619
+ </div>
620
+ <div class="success">
621
+ This is a &lt;div&gt; with the class <strong>.success</strong>.
622
+ </div>
623
+
624
+ <p>
625
+ <strong>&lt;strong&gt;</strong><br />
626
+ <ins>&lt;ins&gt; inserted</ins><br />
627
+ <del>&lt;del&gt; deleted</del><br />
628
+ <dfn>&lt;dfn&gt; dfn</dfn><br />
629
+ <em>&lt;em&gt; emphasis</em><br />
630
+ </p>
631
+ <p>
632
+ <a>&lt;a&gt; anchor</a><br />
633
+ <a href="http://www.google.com">&lt;a&gt; a + href</a><br />
634
+ </p>
635
+ <p>
636
+ <abbr title="extended abbr text should show when mouse over">&lt;abbr&gt; abbr - extended text when mouseover.</abbr><br />
637
+ <acronym title="extended acronym text should show when mouse over">&lt;acronym&gt; acronym - extended text when mouseover.</acronym><br />
638
+ </p>
639
+ <address>
640
+ &lt;address&gt;<br />
641
+ Donald Duck<br />
642
+ Box 555<br />
643
+ Disneyland
644
+ </address>
645
+
646
+ <h2>Table Styles</h2>
647
+
648
+ <table summary="This is the summary text for this table." border="0" cellspacing="0" cellpadding="0">
649
+ <tr>
650
+ <th class="">Table Header One</th>
651
+ <th class="last">Table Header Two</th>
652
+ </tr>
653
+ <tr>
654
+ <td>TD One</td>
655
+ <td>TD Two</td>
656
+ </tr>
657
+ <tr>
658
+ <td colspan="2">TD colspan 2</td>
659
+ </tr>
660
+ </table>
661
+
662
+ <table summary="This is the summary text for this table." border="0" cellspacing="0" cellpadding="0">
663
+ <thead>
664
+ <tr>
665
+ <th>Table Header One</th>
666
+ <th>Table Header Two</th>
667
+ <th>Table Header One</th>
668
+ <th>Table Header Two</th>
669
+ </tr>
670
+ </thead>
671
+ <tfoot>
672
+ <tr>
673
+ <td colspan="4">tfoot footer</td>
674
+ </tr>
675
+ </tfoot>
676
+ <tbody>
677
+ <tr>
678
+ <td>TD One</td>
679
+ <td>TD Two</td>
680
+ <td>TD One</td>
681
+ <td>TD Two</td>
682
+ </tr>
683
+ <tr>
684
+ <td>TD One</td>
685
+ <td>TD Two</td>
686
+ <td>TD One</td>
687
+ <td>TD Two</td>
688
+ </tr>
689
+ </tbody>
690
+ <tbody>
691
+ <tr>
692
+ <td>TD One</td>
693
+ <td>TD Two</td>
694
+ <td>TD One</td>
695
+ <td>TD Two</td>
696
+ </tr>
697
+ <tr>
698
+ <td>TD One</td>
699
+ <td>TD Two</td>
700
+ <td>TD One</td>
701
+ <td>TD Two</td>
702
+ </tr>
703
+ </tbody>
704
+ </table>
705
+
706
+ <h2>Code Styles</h2>
707
+
708
+ <pre>&lt;pre&gt;
709
+ What light
710
+ through yonder window breaks</pre>
711
+
712
+ <code>&lt;code&gt;
713
+ User.new</code>
714
+
715
+ <pre class="code"><code>&lt;pre class="code"&gt;&lt;code&gt;
716
+ class User &lt; ActiveRecord::Base
717
+ has_many :groups
718
+ belongs_to :account
719
+
720
+ def name
721
+ [first_name, last_name].join(' ')
722
+ end
723
+ end</code></pre>
724
+
725
+ <tt>&lt;tt&gt;
726
+ This tt text should be monospaced
727
+ and
728
+ wrap as if
729
+ one line of text
730
+ even though the code has newlines, spaces, and tabs.
731
+ It should be the same size as &lt;p&gt; text.
732
+ </tt>
733
+
734
+ <hr />
735
+ <h1>Additional Styleguides</h1>
736
+ <hr />
737
+
738
+ <% @styleguides.each do |styleguide| %>
739
+ <%= render :file => styleguide %>
740
+ <% end %>
741
+
742
+ </div>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <%= stylesheet_link_tag :flutie %>
7
+ <title>Flutie v1</title>
8
+
9
+ <style type="text/css">
10
+ /* These are styles to make the page look nice */
11
+
12
+ body { background-color: #dadada;}
13
+ .content {
14
+ background: #fff;
15
+ padding: 40px;
16
+ margin: 40px auto;
17
+ width: 880px;
18
+ -moz-border-radius: 24px;
19
+ -webkit-border-radius: 24px;
20
+ }
21
+ </style>
22
+
23
+ </head>
24
+
25
+ <body>
26
+ <div class="content">
27
+ <%= yield %>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1,9 @@
1
+ ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :flutie => [
2
+ '/flutie/stylesheets/reset',
3
+ '/flutie/stylesheets/defaults',
4
+ '/flutie/stylesheets/type',
5
+ '/flutie/stylesheets/forms',
6
+ '/flutie/stylesheets/tables',
7
+ '/flutie/stylesheets/lists',
8
+ '/flutie/stylesheets/screen'
9
+ ]
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do |map|
2
+
3
+ resource :styleguides, :as => :styleguide, :controller => 'flutie/styleguides', :only => [:show]
4
+
5
+ end
@@ -0,0 +1,6 @@
1
+ module Flutie
2
+
3
+ class Engine < Rails::Engine
4
+ end
5
+
6
+ end
data/lib/flutie.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Flutie
2
+ require 'flutie/engine' if defined?(Rails)
3
+ end
@@ -0,0 +1,17 @@
1
+ require 'fileutils'
2
+
3
+ def copy_files(source_path, destination_path, directory)
4
+ source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path)
5
+ FileUtils.mkdir_p(destination, :verbose => true) unless File.exist?(destination)
6
+ FileUtils.cp_r(source, destination, :verbose => true)
7
+ end
8
+
9
+ directory = File.dirname(__FILE__)
10
+
11
+ namespace :flutie do
12
+ desc 'install flutie stylesheets into public/ directory'
13
+ task :install => :environment do
14
+ # Copy the flutie stylesheets into rails_root/public/flutie
15
+ copy_files("../../public/stylesheets", "/public/flutie", directory)
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flutie
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 1
10
+ version: 1.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Chad Pytel
14
+ - Kevin Burg
15
+ - Matt Jankowski
16
+ - Mike Burns
17
+ - Fred Yates
18
+ autorequire:
19
+ bindir: bin
20
+ cert_chain: []
21
+
22
+ date: 2010-07-01 00:00:00 -04:00
23
+ default_executable:
24
+ dependencies: []
25
+
26
+ description: Flutie is a starting point for personal discovery
27
+ email: support@thoughtbot.com
28
+ executables: []
29
+
30
+ extensions: []
31
+
32
+ extra_rdoc_files: []
33
+
34
+ files:
35
+ - app/controllers/flutie/styleguides_controller.rb
36
+ - app/views/flutie/styleguides/show.erb
37
+ - app/views/layouts/flutie.erb
38
+ - config/initializers/expansion.rb
39
+ - config/routes.rb
40
+ - lib/flutie/engine.rb
41
+ - lib/flutie.rb
42
+ - lib/tasks/flutie.rake
43
+ - README.textile
44
+ has_rdoc: true
45
+ homepage: http://github.com/thoughtbot/flutie
46
+ licenses: []
47
+
48
+ post_install_message:
49
+ rdoc_options: []
50
+
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ hash: 3
68
+ segments:
69
+ - 0
70
+ version: "0"
71
+ requirements: []
72
+
73
+ rubyforge_project:
74
+ rubygems_version: 1.3.7
75
+ signing_key:
76
+ specification_version: 3
77
+ summary: Flutie adds default stylesheets to web apps
78
+ test_files: []
79
+