timeline_setter 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.document +4 -0
  2. data/LICENSE.txt +18 -0
  3. data/README +15 -0
  4. data/Rakefile +98 -0
  5. data/bin/timeline-setter +9 -0
  6. data/doc/doc.markdown +253 -0
  7. data/doc/doc_wrapper.erb +87 -0
  8. data/doc/docco.css +186 -0
  9. data/doc/timeline-setter.html +592 -0
  10. data/doc/todo.markdown +28 -0
  11. data/doc/twitter-demo.html +122 -0
  12. data/documentation/TimelineSetter/CLI.html +575 -0
  13. data/documentation/TimelineSetter/Parser.html +285 -0
  14. data/documentation/TimelineSetter/Timeline.html +513 -0
  15. data/documentation/TimelineSetter/Util.html +246 -0
  16. data/documentation/TimelineSetter.html +112 -0
  17. data/documentation/_index.html +132 -0
  18. data/documentation/class_list.html +36 -0
  19. data/documentation/css/common.css +1 -0
  20. data/documentation/css/full_list.css +53 -0
  21. data/documentation/css/style.css +318 -0
  22. data/documentation/file.README.html +70 -0
  23. data/documentation/file_list.html +38 -0
  24. data/documentation/frames.html +13 -0
  25. data/documentation/index.html +70 -0
  26. data/documentation/js/app.js +203 -0
  27. data/documentation/js/full_list.js +149 -0
  28. data/documentation/js/jquery.js +16 -0
  29. data/documentation/method_list.html +155 -0
  30. data/documentation/top-level-namespace.html +88 -0
  31. data/index.html +397 -0
  32. data/lib/timeline_setter/cli.rb +85 -0
  33. data/lib/timeline_setter/parser.rb +28 -0
  34. data/lib/timeline_setter/timeline.rb +44 -0
  35. data/lib/timeline_setter/version.rb +3 -0
  36. data/lib/timeline_setter.rb +22 -0
  37. data/public/javascripts/timeline-setter.js +822 -0
  38. data/public/javascripts/vendor/jquery-min.js +16 -0
  39. data/public/javascripts/vendor/underscore-min.js +26 -0
  40. data/public/stylesheets/timeline-setter.css +396 -0
  41. data/spec/spec_helper.rb +10 -0
  42. data/spec/test_data.csv +4 -0
  43. data/spec/timeline_setter_spec.rb +85 -0
  44. data/templates/timeline-markup.erb +61 -0
  45. data/templates/timeline-min.erb +1 -0
  46. data/templates/timeline.erb +12 -0
  47. data/timeline_setter.gemspec +104 -0
  48. metadata +189 -0
@@ -0,0 +1,396 @@
1
+ #timeline_setter {
2
+ width:85%;
3
+ margin:0 auto;
4
+ padding:10px;
5
+ position:relative;
6
+ height:100%;
7
+ background-color:white;
8
+ }
9
+ .TS-item {
10
+ z-index:1;
11
+ position:absolute;
12
+ border:1px solid #EBEBEB;
13
+ -webkit-border-radius: 3px;
14
+ -moz-border-radius: 3px;
15
+ border-radius: 3px;
16
+ padding:10px;
17
+ background:#F7F7F7;
18
+ color:#333;
19
+ min-width: 150px;
20
+ }
21
+ .TS-item_user_html {
22
+ padding-bottom:5px;
23
+ }
24
+ .TS-item_label {
25
+ font-family:Georgia,"Times New Roman",Times,serif;
26
+ font-size:12px;
27
+ line-height:16px;
28
+ height:85%;
29
+ display:block;
30
+ }
31
+ .TS-item_year {
32
+ font-family:"Helvetica Neue",Helvetica,arial,sans-serif;
33
+ font-weight:bold;
34
+ font-size:16px;
35
+ padding-top:10px;
36
+ float:left;
37
+ clear:left;
38
+ display:block;
39
+ width:150px;
40
+ }
41
+ .TS-item_year_text {
42
+ float:left;
43
+ }
44
+ .TS-css_arrow {
45
+ border-style: solid;
46
+ height: 0px;
47
+ width: 0px;
48
+ position:relative;
49
+ top: 2px;
50
+ border-width: 10px 10px 10px 10px;
51
+ }
52
+ .TS-css_arrow_up {
53
+ border-color: transparent transparent #7C93AF transparent;
54
+ }
55
+ .TS-read_btn {
56
+ -webkit-box-shadow: #CECECE 0px 0px 2px;
57
+ -moz-box-shadow: #CECECE 0px 0px 2px;
58
+ box-shadow: #CECECE 0px 0px 2px;
59
+ -webkit-user-select: none;
60
+ background: #E9F0F8;
61
+ border-bottom-left-radius: 4px 4px;
62
+ border-bottom-right-radius: 4px 4px;
63
+ border-top-left-radius: 4px 4px;
64
+ border-top-right-radius: 4px 4px;
65
+ color: black;
66
+ cursor: pointer;
67
+ font-weight: bold;
68
+ padding: 5px;
69
+ margin-top:8px;
70
+ font-size:11px;
71
+ font-family:"Helvetica Neue",arial,sans-serif;
72
+ text-transform:uppercase;
73
+ font-weight:normal;
74
+ text-align:center;
75
+ }
76
+ .TS-read_btn:hover {
77
+ color:black;cursor:pointer;text-decoration:none;background:#cecece;
78
+ }
79
+ #timeline_setter a {
80
+ text-decoration:none;
81
+ color:#333;
82
+ }
83
+
84
+ #TS-top_matter_container {
85
+ -webkit-user-select: none;
86
+ -khtml-user-select: none;
87
+ -moz-user-select: none;
88
+ -o-user-select: none;
89
+ user-select: none;
90
+ overflow:visible;
91
+ }
92
+ .TS-notchbar_container {
93
+ border:1px solid #cecece;
94
+ -webkit-box-shadow: #CECECE 0px 0px 2px;
95
+ -moz-box-shadow: #CECECE 0px 0px 2px;
96
+ box-shadow: #CECECE 0px 0px 2px;
97
+ background:#f7f7f7;
98
+ width:100%;
99
+ height:20px;
100
+ position:relative;
101
+ overflow:hidden;
102
+ clear:left;
103
+ -webkit-user-select: none;
104
+ -khtml-user-select: none;
105
+ -moz-user-select: none;
106
+ -o-user-select: none;
107
+ user-select: none;
108
+ cursor: col-resize;
109
+ }
110
+ #TS-card_scroller {
111
+ width:100%;
112
+ position:relative;
113
+ overflow:hidden;
114
+ height:800px; /* FIX THIS!!! */
115
+ }
116
+ #TS-card_scroller_inner {
117
+ width:100%;
118
+ position:relative;
119
+ }
120
+ .TS-notchbar {
121
+ height:20px;
122
+ position:relative;
123
+ width:100%;
124
+ margin: 0 auto;
125
+ }
126
+ .TS-notchbar_draggable {
127
+ cursor: col-resize;
128
+ }
129
+ .TS-notch, .TS-year_notch {
130
+ height:100%;
131
+ position:absolute;
132
+ color:#999;
133
+ }
134
+ .TS-year_notch {
135
+ border-left: 1px solid #999;
136
+ }
137
+ .TS-year_notch_year_text {
138
+ display:block;
139
+ /*
140
+ Arial actually looks better than Helvetica at
141
+ small sizes. See Comment 6 here:
142
+ http://www.subtraction.com/2007/11/01/the-elements#7497
143
+ */
144
+ font-family:Arial,sans-serif;
145
+ font-size:9px;
146
+ padding:2px 0 0 5px;
147
+ }
148
+ .TS-year_notch:hover {
149
+ }
150
+ .TS-notch{
151
+ width:4px;
152
+ cursor:pointer;
153
+ }
154
+ .TS-notch:hover {
155
+ background:#cecece;
156
+ }
157
+ .TS-card_container {
158
+ position:absolute;
159
+ margin-left:-5px;
160
+ z-index: 9999;
161
+ }
162
+ .TS-controls {
163
+ margin: 0 0 0 0;
164
+ float:right;
165
+ height:2%;
166
+ overflow:visible;
167
+ text-align: right;
168
+ width: 220px;
169
+ }
170
+ .TS-controls a {
171
+ border:1px solid #cecece;
172
+ background-color:#f0f0f0;
173
+ padding:3px 5px 3px 5px;
174
+ color:#999;
175
+ font-family:"Helvetica Neue",Arial,sans-serif;
176
+ font-weight:normal;
177
+ height: 14px;
178
+ font-size:14px;
179
+ -webkit-border-radius: 2px;
180
+ -moz-border-radius: 2px;
181
+ border-radius: 2px;
182
+ display: inline;
183
+ }
184
+ .TS-choose_next {
185
+ margin-left:4px;
186
+ }
187
+ .TS-controls_inner_text {
188
+ font-size:11px;
189
+ text-transform:uppercase;
190
+ }
191
+ .TS-controls a.TS-controls_disabled {
192
+ color:#cecece;
193
+ background-color:#f7f7f7;
194
+ cursor:default;
195
+ }
196
+ .TS-controls a:hover {
197
+ background-color:#fff;
198
+ }
199
+ .TS-notch_active {
200
+ -webkit-box-shadow: 0px 0px 10px #333;
201
+ -moz-box-shadow: 0px 0px 10px #333;
202
+ box-shadow: 0px 0px 10px #333;
203
+
204
+ /* let's throw IE7 users a bone */
205
+ *border: 1px solid #333;
206
+ }
207
+ .TS-zoom {
208
+ background-repeat:no-repeat;
209
+ background-position:center center;
210
+ width:20px !important;
211
+ padding:3px 8px 3px 8px !important;
212
+ margin-right:4px;
213
+ }
214
+ .TS-zoom_inner_text {
215
+ display:none;
216
+ /* IE7 */
217
+ *display:inline;
218
+ }
219
+ .TS-zoom_in {
220
+ background-image:url("data:image/gif;charset=utf-8;base64,R0lGODlhCgAKALMAADMzM//M/5GRkdXV1fDw8GZmZk1NTf////r6+gAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAAEALAAAAAAKAAoAAAQpMMhJpyiihjLIKJTQGV4mFYShEqAkHIiBHKYEHHhhVAWgY5qToFZRRQAAOw==");
221
+ }
222
+ .TS-zoom_out {
223
+ background-image:url("data:image/gif;charset=utf-8;base64,R0lGODlhCgAKALMAADMzM//M/5GRkdXV1fDw8GZmZk1NTf////r6+gAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEHAAEALAAAAAAKAAoAAAQoMMhJpyiihjLIKJTQEV4mFYShEqAkHAh8mBJw3IVRFUCOaScBraKKAAA7");
224
+ }
225
+
226
+ /* legend */
227
+
228
+ .TS-series_nav_container {
229
+ font-family:Arial,sans-serif;
230
+ font-size:11px;
231
+ height:30px;
232
+ margin-left:-10px;
233
+ }
234
+ .TS-series_legend_swatch {
235
+ background-image:url("data:image/gif;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIBJREFUeNrskksKwCAMBev9byS4UfEOoh7AA4hu9JUG2kVb+8FVoYFsQmbghTAA00ix7wumRfC0nXPYz97Ca70ThBA20hhzL7DWIsZIi957AmutB7gryDkTlFLaYKUUznZPBUIIlFIIbq1BSolevG5uzjnF0Frj6j7sf+VxwSzAAG/ifZQMhRJhAAAAAElFTkSuQmCC");
236
+ background-repeat:no-repeat;
237
+ background-position:center center;
238
+ width: 16px;
239
+ height: 16px;
240
+ display: block;
241
+ float: left;
242
+ -webkit-border-radius: 2px;
243
+ -moz-border-radius: 2px;
244
+ border-radius: 2px;
245
+ border-top-left-radius: 2px 2px;
246
+ border-top-right-radius: 2px 2px;
247
+ border-bottom-right-radius: 2px 2px;
248
+ border-bottom-left-radius: 2px 2px;
249
+ margin-right:5px;
250
+ }
251
+ .TS-series_legend_item {
252
+ float:left;
253
+ margin:-3px 10px 0 10px;
254
+ cursor:pointer;
255
+ }
256
+ .TS-series_legend_item_inactive {}
257
+ .TS-series_legend_item_inactive .TS-series_legend_swatch {
258
+ background-image:none !important;
259
+ filter:alpha(opacity=40); /* IE can't do data URLs, so this will serve as 'inactive' UI for series heds in IE */
260
+ }
261
+ .TS-item h2, .TS-img-hed {
262
+ font-family: 'Helvetica Neue',arial,sans-serif;
263
+ font-size: 18px;
264
+ font-weight: bold;
265
+ display:inline-block;
266
+ margin:0;
267
+ margin-bottom: 10px;
268
+ line-height:20px;
269
+ }
270
+ .TS-permalink {
271
+ font-family:"Helvetica Neue",arial,sans-serif;
272
+ font-size:12px;
273
+ color:#404040;
274
+ cursor:pointer;
275
+ padding:0 0 0 15px;
276
+ margin-top:-5px;
277
+ float:left;
278
+ -webkit-transform:rotate(45deg);
279
+ -moz-transform:rotate(45deg);
280
+ }
281
+
282
+ /* color priority */
283
+ /* "#065718", "#EDC047", "#91ADD1", "#929E5E", "#9E5E23", "#C44846", "#065718", "#EDD4A5", "#CECECE" */
284
+
285
+ /* default */
286
+ .TS-notch_color_default,.TS-series_legend_swatch_default {
287
+ background-color: #444;
288
+ }
289
+ .TS-css_arrow_color_default {
290
+ border-bottom-color:#444;
291
+ }
292
+ .TS-item_color_default {
293
+ border-top:1px solid #444;
294
+ }
295
+
296
+ /* 1 */
297
+ .TS-notch_color_1,.TS-series_legend_swatch_1 {
298
+ background-color: #065718 !important;
299
+ }
300
+ .TS-css_arrow_color_1 {
301
+ border-bottom-color:#065718 !important;
302
+ }
303
+ .TS-item_color_1 {
304
+ border-top:1px solid #065718 !important;
305
+ }
306
+
307
+ /* 2 */
308
+ .TS-notch_color_2,.TS-series_legend_swatch_2 {
309
+ background-color: #EDC047 !important;
310
+ }
311
+ .TS-css_arrow_color_2 {
312
+ border-bottom-color:#EDC047 !important;
313
+ }
314
+ .TS-item_color_2 {
315
+ border-top:1px solid #EDC047 !important;
316
+ }
317
+
318
+ /* 3 */
319
+ .TS-notch_color_3,.TS-series_legend_swatch_3 {
320
+ background-color: #91ADD1 !important;
321
+ }
322
+ .TS-css_arrow_color_3 {
323
+ border-bottom-color:#91ADD1 !important;
324
+ }
325
+ .TS-item_color_3 {
326
+ border-top:1px solid #91ADD1 !important;
327
+ }
328
+
329
+ /* 4 */
330
+ .TS-notch_color_4,.TS-series_legend_swatch_4 {
331
+ background-color: #929E5E !important;
332
+ }
333
+ .TS-css_arrow_color_4 {
334
+ border-bottom-color:#929E5E !important;
335
+ }
336
+ .TS-item_color_4 {
337
+ border-top:1px solid #929E5E !important;
338
+ }
339
+
340
+ /* 5 */
341
+ .TS-notch_color_5,.TS-series_legend_swatch_5 {
342
+ background-color: #9E5E23 !important;
343
+ }
344
+ .TS-css_arrow_color_5 {
345
+ border-bottom-color:#9E5E23 !important;
346
+ }
347
+ .TS-item_color_5 {
348
+ border-top:1px solid #9E5E23 !important;
349
+ }
350
+
351
+ /* 6 */
352
+ .TS-notch_color_6,.TS-series_legend_swatch_6 {
353
+ background-color: #C44846 !important;
354
+ }
355
+ .TS-css_arrow_color_6 {
356
+ border-bottom-color:#C44846 !important;
357
+ }
358
+ .TS-item_color_6 {
359
+ border-top:1px solid #C44846 !important;
360
+ }
361
+
362
+ /* 7 */
363
+ .TS-notch_color_7,.TS-series_legend_swatch_7 {
364
+ background-color: #065718 !important;
365
+ }
366
+ .TS-css_arrow_color_7 {
367
+ border-bottom-color:#065718 !important;
368
+ }
369
+ .TS-item_color_7 {
370
+ border-top:1px solid #065718 !important;
371
+ }
372
+
373
+
374
+ /* 8 */
375
+ .TS-notch_color_8,.TS-series_legend_swatch_8 {
376
+ background-color: #EDD4A5 !important;
377
+ }
378
+ .TS-css_arrow_color_8 {
379
+ border-bottom-color:#EDD4A5 !important;
380
+ }
381
+ .TS-item_color_8 {
382
+ border-top:1px solid #EDD4A5 !important;
383
+ }
384
+
385
+ /* 9 */
386
+ .TS-notch_color_9,.TS-series_legend_swatch_9 {
387
+ background-color: #CECECE !important;
388
+ }
389
+ .TS-css_arrow_color_9 {
390
+ border-bottom-color:#CECECE !important;
391
+ }
392
+ .TS-item_color_9 {
393
+ border-top:1px solid #CECECE !important;
394
+ }
395
+
396
+
@@ -0,0 +1,10 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+
3
+ require 'rubygems'
4
+ require 'timeline_setter'
5
+ require 'timeline_setter/cli'
6
+ require 'rspec'
7
+
8
+ TEST_CSV_PATH = File.expand_path(File.dirname(__FILE__) + '/test_data.csv')
9
+ TEST_CSV = File.open(TEST_CSV_PATH,'r').read
10
+ TS_BINARY = File.expand_path('../../bin/timeline-setter',__FILE__)
@@ -0,0 +1,4 @@
1
+ date,display_date,description,link,,series,event_html
2
+ "Feb. 18, 2003",,"Brock Savelkoul joins the Army and is stationed at Fort Riley, Kan., in the artillery division. His assigned position is artillery survey, meaning he prepares terrain for mounting artillery canon.",,,Brock Savelkoul,"<h2 class=""timeline-img-hed"">Savelkoul Joins the Army</h2><img src=""http://maps.google.com/maps/api/staticmap?size=300x200&markers=color:blue|Fort%20Riley,KS&sensor=false&zoom=6"" width=""300"" height=""200"">"
3
+ "Aug. 10, 2003",,"Savelkoul deploys to Iraq, where he is based at Camp Forehead, near the Mansour District of Baghdad. ",,,Brock Savelkoul,
4
+ "Dec. 1, 2003",December 2003,Savelkoul and his unit are ambushed in the Mansour district. Many of them are shaken by the experience.,,,Brock Savelkoul,
@@ -0,0 +1,85 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "TimelineSetter core" do
4
+ it 'should build a hash from a spreadsheet' do
5
+ TimelineSetter::Parser.new(TEST_CSV).events[0][:date].should eql("Feb. 18, 2003")
6
+ end
7
+
8
+ it 'should create json from an events hash' do
9
+ events = TimelineSetter::Parser.new(TEST_CSV)
10
+ j = TimelineSetter::Timeline.new(events.events).to_json
11
+ JSON.parse(j)[0]['date'].should eql "Feb. 18, 2003"
12
+ end
13
+
14
+ it 'should create html from an events hash' do
15
+ events = TimelineSetter::Parser.new(TEST_CSV)
16
+ html = TimelineSetter::Timeline.new(events.events).timeline.to_s
17
+ html.should =~ /"timestamp":1045544400/
18
+ end
19
+
20
+ it 'should create minified timelines' do
21
+ events = TimelineSetter::Parser.new(TEST_CSV)
22
+ html = TimelineSetter::Timeline.new(events.events).timeline_min.to_s
23
+
24
+ # test to see we've compiled all the assets
25
+
26
+ # test CSS
27
+ html.should =~ /#timeline_setter/
28
+ # test timeline
29
+ html.should =~ /"timestamp":1045544400/
30
+ # test underscore
31
+ html.should =~ /Underscore\.js/
32
+ # test jQuery
33
+ html.should =~ /jQuery JavaScript Library/
34
+ # test timeline-setter.js
35
+ html.should =~ /INTERVAL_ORDER/
36
+ end
37
+ end
38
+
39
+ describe "TimelineSetter CLI" do
40
+ it 'should drop just timeline.html into tmp' do
41
+ `mkdir /tmp/ts_test_1`
42
+ %x[ #{TS_BINARY} -c #{TEST_CSV_PATH} -o /tmp/ts_test_1/ ]
43
+ Dir.glob("/tmp/ts_test_1/*").should include("/tmp/ts_test_1/timeline.html")
44
+ file = File.open("/tmp/ts_test_1/timeline.html").read
45
+ file.should =~ /"timestamp":1045544400/
46
+ end
47
+
48
+ it 'should drop timeline.html and associated assets into tmp' do
49
+ `mkdir /tmp/ts_test_2`
50
+ %x[ #{TS_BINARY} -c #{TEST_CSV_PATH} -o /tmp/ts_test_2/ -a ]
51
+ Dir.glob("/tmp/ts_test_2/*").should include("/tmp/ts_test_2/timeline.html")
52
+ Dir.glob("/tmp/ts_test_2/javascripts/*").should include("/tmp/ts_test_2/javascripts/timeline-setter.js")
53
+ Dir.glob("/tmp/ts_test_2/javascripts/vendor/*").should include("/tmp/ts_test_2/javascripts/vendor/jquery-min.js")
54
+ Dir.glob("/tmp/ts_test_2/javascripts/vendor/*").should include("/tmp/ts_test_2/javascripts/vendor/underscore-min.js")
55
+ Dir.glob("/tmp/ts_test_2/stylesheets/*").should include("/tmp/ts_test_2/stylesheets/timeline-setter.css")
56
+ end
57
+
58
+ it 'should create a minified timeline in tmp' do
59
+ `mkdir /tmp/ts_test_3`
60
+ %x[ #{TS_BINARY} -c #{TEST_CSV_PATH} -o /tmp/ts_test_3/ -m ]
61
+ file = File.open("/tmp/ts_test_3/timeline.html").read
62
+ file.should =~ /"timestamp":1045544400/
63
+
64
+ # test to see we've compiled all the assets
65
+
66
+ # test CSS
67
+ file.should =~ /#timeline_setter/
68
+ # test timeline
69
+ file.should =~ /"timestamp":1045544400/
70
+ # test underscore
71
+ file.should =~ /Underscore\.js/
72
+ # test jQuery
73
+ file.should =~ /jQuery JavaScript Library/
74
+ # test timeline-setter.js
75
+ file.should =~ /INTERVAL_ORDER/
76
+ end
77
+
78
+ after :all do
79
+ `rm -rf /tmp/ts_test_1`
80
+ `rm -rf /tmp/ts_test_2`
81
+ `rm -rf /tmp/ts_test_3`
82
+ end
83
+
84
+
85
+ end
@@ -0,0 +1,61 @@
1
+
2
+ <div id="timeline_setter">
3
+ <div id="TS-top_matter_container">
4
+ <div class="TS-controls">
5
+ <a href="#" class="TS-zoom TS-zoom_in"><span class="TS-controls_inner_text TS-zoom_inner_text">+</span></a>
6
+ <a href="#" class="TS-zoom TS-zoom_out"><span class="TS-controls_inner_text TS-zoom_inner_text">-</span></a>
7
+ &nbsp;&nbsp;&nbsp;&nbsp;
8
+ <a href="#" class="TS-choose TS-choose_prev">&laquo; <span class="TS-controls_inner_text">Previous</span></a>
9
+ <a href="#" class="TS-choose TS-choose_next"><span class="TS-controls_inner_text">Next</span> &raquo;</a>
10
+ </div>
11
+ <div class="TS-series_nav_container"></div>
12
+ </div>
13
+
14
+ <div class="TS-notchbar_container">
15
+ <div class="TS-notchbar"></div>
16
+ </div>
17
+ <div id="TS-card_scroller">
18
+ <div id="TS-card_scroller_inner">
19
+ </div>
20
+ </div>
21
+ </div>
22
+
23
+ <script type="text/javascript">
24
+ TimelineSetter.Timeline.boot(<%= self.to_json %>);
25
+ </script>
26
+ <script id="TS-year_notch_tmpl" type="text/jst">
27
+ <div class="TS-year_notch TS-year_notch_<%%= timestamp %>">
28
+ <span class="TS-year_notch_year_text"><%%= human %></span>
29
+ </div>
30
+ </script>
31
+ <script id="TS-notch_tmpl" type="text/jst">
32
+ <div class="TS-notch TS-notch_<%%= timestamp %> TS-notch_<%%= series.replace(/\W/g, "") %> TS-notch_color_<%%= topcolor %>"></div>
33
+ </script>
34
+ <script id="TS-series_legend_tmpl" type="text/jst">
35
+ <div class="TS-series_legend_item TS-series_legend_item_<%%= name.replace(/\W/g, "") %>">
36
+ <span class="TS-series_legend_swatch TS-series_legend_swatch_<%%= color %>">&nbsp;</span> <span class="TS-series_legend_text"><%%= name %></span>
37
+ </div>
38
+ </script>
39
+ <script id="TS-card_tmpl" type="text/jst">
40
+ <div class="TS-card_container TS-card_container_<%%= (card.get("series") || "").replace(/\W/g, "") %>">
41
+ <div class="TS-css_arrow TS-css_arrow_up TS-css_arrow_color_<%%= card.get("topcolor") %>"></div>
42
+ <div class="TS-item TS-item_color_<%%= card.get("topcolor") %>" data-timestamp="<%%= card.get("timestamp") %>">
43
+ <div class="TS-item_label">
44
+ <%% if (!_.isEmpty(card.get("html"))){ %>
45
+ <div class="TS-item_user_html">
46
+ <%%= card.get("html") %>
47
+ </div>
48
+ <%% } %>
49
+ <%%= card.get("description") %>
50
+ </div>
51
+ <%% if (!_.isEmpty(card.get("link"))){ %>
52
+ <div class="TS-read_btn"><a target="_blank" href="<%%= card.get("link") %>">Read More</a></div>
53
+ <%% } %>
54
+
55
+ <div class="TS-item_year">
56
+ <span class="TS-item_year_text"><%%= (card.get("display_date") || "").length > 0 ? card.get("display_date") : card.get("date") %></span>
57
+ <div class="TS-permalink">&#8734;</div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </script>
@@ -0,0 +1 @@
1
+ <style><%= @css %></style><script><%= @js %></script><%= @min_html %>
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <link href="stylesheets/timeline-setter.css" rel="stylesheet" />
5
+ <script src="javascripts/vendor/jquery-min.js"></script>
6
+ <script src="javascripts/vendor/underscore-min.js"></script>
7
+ <script src="javascripts/timeline-setter.js"></script>
8
+ </head>
9
+ <body style="height: 100%">
10
+ <%= timeline_markup %>
11
+ </body>
12
+ </html>
@@ -0,0 +1,104 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{timeline_setter}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Al Shaw", "Jeff Larson"]
12
+ s.date = %q{2011-04-04}
13
+ s.default_executable = %q{timeline-setter}
14
+ s.description = %q{TimelineSetter is a tool to create HTML timelines from spreadsheets of events.}
15
+ s.email = %q{almshaw@gmail.com}
16
+ s.executables = ["timeline-setter"]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "LICENSE.txt",
24
+ "README",
25
+ "Rakefile",
26
+ "bin/timeline-setter",
27
+ "doc/doc.markdown",
28
+ "doc/doc_wrapper.erb",
29
+ "doc/docco.css",
30
+ "doc/timeline-setter.html",
31
+ "doc/todo.markdown",
32
+ "doc/twitter-demo.html",
33
+ "documentation/TimelineSetter.html",
34
+ "documentation/TimelineSetter/CLI.html",
35
+ "documentation/TimelineSetter/Parser.html",
36
+ "documentation/TimelineSetter/Timeline.html",
37
+ "documentation/TimelineSetter/Util.html",
38
+ "documentation/_index.html",
39
+ "documentation/class_list.html",
40
+ "documentation/css/common.css",
41
+ "documentation/css/full_list.css",
42
+ "documentation/css/style.css",
43
+ "documentation/file.README.html",
44
+ "documentation/file_list.html",
45
+ "documentation/frames.html",
46
+ "documentation/index.html",
47
+ "documentation/js/app.js",
48
+ "documentation/js/full_list.js",
49
+ "documentation/js/jquery.js",
50
+ "documentation/method_list.html",
51
+ "documentation/top-level-namespace.html",
52
+ "index.html",
53
+ "lib/timeline_setter.rb",
54
+ "lib/timeline_setter/cli.rb",
55
+ "lib/timeline_setter/parser.rb",
56
+ "lib/timeline_setter/timeline.rb",
57
+ "lib/timeline_setter/version.rb",
58
+ "public/javascripts/timeline-setter.js",
59
+ "public/javascripts/vendor/jquery-min.js",
60
+ "public/javascripts/vendor/underscore-min.js",
61
+ "public/stylesheets/timeline-setter.css",
62
+ "spec/spec_helper.rb",
63
+ "spec/test_data.csv",
64
+ "spec/timeline_setter_spec.rb",
65
+ "templates/timeline-markup.erb",
66
+ "templates/timeline-min.erb",
67
+ "templates/timeline.erb",
68
+ "timeline_setter.gemspec"
69
+ ]
70
+ s.homepage = %q{http://github.com/propublica/timeline-setter}
71
+ s.require_paths = ["lib"]
72
+ s.rubygems_version = %q{1.3.7}
73
+ s.summary = %q{TimelineSetter is a tool to create HTML timelines from spreadsheets of events.}
74
+ s.test_files = [
75
+ "spec/spec_helper.rb",
76
+ "spec/timeline_setter_spec.rb"
77
+ ]
78
+
79
+ if s.respond_to? :specification_version then
80
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
81
+ s.specification_version = 3
82
+
83
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
84
+ s.add_runtime_dependency(%q<json>, [">= 0"])
85
+ s.add_runtime_dependency(%q<table_fu>, [">= 0"])
86
+ s.add_runtime_dependency(%q<kompress>, [">= 0.0.2"])
87
+ s.add_runtime_dependency(%q<closure-compiler>, [">= 0"])
88
+ s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
89
+ else
90
+ s.add_dependency(%q<json>, [">= 0"])
91
+ s.add_dependency(%q<table_fu>, [">= 0"])
92
+ s.add_dependency(%q<kompress>, [">= 0.0.2"])
93
+ s.add_dependency(%q<closure-compiler>, [">= 0"])
94
+ s.add_dependency(%q<rspec>, [">= 2.0.0"])
95
+ end
96
+ else
97
+ s.add_dependency(%q<json>, [">= 0"])
98
+ s.add_dependency(%q<table_fu>, [">= 0"])
99
+ s.add_dependency(%q<kompress>, [">= 0.0.2"])
100
+ s.add_dependency(%q<closure-compiler>, [">= 0"])
101
+ s.add_dependency(%q<rspec>, [">= 2.0.0"])
102
+ end
103
+ end
104
+