author 1.1.0.alpha → 1.1.1.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTBlMzUwOWE0ZjQ3MWNjYmJmYmU2Y2JlNmQ0YmZhOWVkODJmZTA2NA==
4
+ N2I0OWYxNjI3ZmJiOGMwMzlkZDU4OTMwZDViYzRjZGM0OTJjOGNhMQ==
5
5
  data.tar.gz: !binary |-
6
- ZmRiMDRjZDlmMjdjZTUzM2Q1ZDhhZmY5ODg1YWE1NjU5YzQzZGQ1NA==
6
+ MzM1ZTFmZmYzZDY1YmNjZjE0MzEyZGI4OWMwZTRiOTIxZWRkYzU5OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWVkNjRiNDhmYWNkMjBlNTNhMGZhMGRkNjAyNzhiMDEwZmVjMzY5YWRmMmIw
10
- MmIxMWY3N2RkMmJiOGIzOWM0NzY2MDcwNTc4NWU0MGNhNDgyOTMxMjA4NmUz
11
- YTczY2UzNjYwMTJiOGRjYWViZTQwZDA3MTE2NWVmYzI3OWVhYTE=
9
+ MzBkOTY5MWZhNmUxMjQxMDQ5NDIzNjc0MDhiOTE3ZTNmZjc2N2QxNzY5ZDBj
10
+ OWZkN2M0OTNjYjc3YjVkZGEyNTk4YzhhM2VmMzBlMjE0M2Y0YTJkNzg2ODhm
11
+ MTE1ZDk1YmU3Y2Q2M2U4MDZkZTUyYzIyMmU2ZDdkNTE3OTJjYWU=
12
12
  data.tar.gz: !binary |-
13
- ODgwZDBlYzhlOWE4YzQ5OTFkN2QyNDNkNTNiYzQxY2Q2ODYxZmViOWRjZTk4
14
- ZTBkNzlhOWVjMDg5MzUwYzg2NjA5NDBhYTVlMzRiYjVlMTRhOWNhNDU1NzEy
15
- NjZjYmMzODk3NDVjZTZhYjhiODA0YTg2MDI2MDJmZDE3ZGY0ZGQ=
13
+ N2UzM2QzNzkyN2RkZGViMzQ0MTJmZWExZDRmZjJlOWFkNmFkZTE3Nzg4NjE1
14
+ OWFkNjU5ZjczNWVkZGUwZTM4OGM0ZDI2ZTgzMzllZDRkOTRiMWEyNWZkMGZh
15
+ MThlNzNiYTg4MmE4YWRkOGUwNmM1NmNiOWFhNGZmOGViMGJkMjM=
@@ -26,7 +26,9 @@ module Author
26
26
  template 'sample.md', 'chapters/sample.md'
27
27
  template 'layout.xhtml', 'templates/layout.xhtml'
28
28
 
29
- gsub_file 'templates/layout.xhtml', '<!-- insert @body -->', '<%= @body %>'
29
+ gsub_file 'templates/layout.xhtml', '<!-- insert @body -->', '<%= @body %>'
30
+
31
+ copy_file 'book.css', 'export/book.css'
30
32
  end
31
33
 
32
34
  def bundle_gems
@@ -0,0 +1,602 @@
1
+ @charset "UTF-8";
2
+ @namespace "http://www.w3.org/1999/xhtml";
3
+ @namespace epub "http://www.idpf.org/2007/ops";
4
+
5
+ /*! normalize.css v3.0.1 | MIT License | git.io/normalize */
6
+
7
+ /**
8
+ * 1. Set default font family to sans-serif.
9
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
10
+ * user zoom.
11
+ */
12
+
13
+ html {
14
+ font-family: sans-serif; /* 1 */
15
+ -ms-text-size-adjust: 100%; /* 2 */
16
+ -webkit-text-size-adjust: 100%; /* 2 */
17
+ }
18
+
19
+ /**
20
+ * Remove default margin.
21
+ */
22
+
23
+ body {
24
+ margin: 0;
25
+ }
26
+
27
+ /* HTML5 display definitions
28
+ ========================================================================== */
29
+
30
+ /**
31
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
32
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
33
+ * Correct `block` display not defined for `main` in IE 11.
34
+ */
35
+
36
+ article,
37
+ aside,
38
+ details,
39
+ figcaption,
40
+ figure,
41
+ footer,
42
+ header,
43
+ hgroup,
44
+ main,
45
+ nav,
46
+ section,
47
+ summary {
48
+ display: block;
49
+ }
50
+
51
+ /**
52
+ * 1. Correct `inline-block` display not defined in IE 8/9.
53
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
54
+ */
55
+
56
+ audio,
57
+ canvas,
58
+ progress,
59
+ video {
60
+ display: inline-block; /* 1 */
61
+ vertical-align: baseline; /* 2 */
62
+ }
63
+
64
+ /**
65
+ * Prevent modern browsers from displaying `audio` without controls.
66
+ * Remove excess height in iOS 5 devices.
67
+ */
68
+
69
+ audio:not([controls]) {
70
+ display: none;
71
+ height: 0;
72
+ }
73
+
74
+ /**
75
+ * Address `[hidden]` styling not present in IE 8/9/10.
76
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
77
+ */
78
+
79
+ [hidden],
80
+ template {
81
+ display: none;
82
+ }
83
+
84
+ /* Links
85
+ ========================================================================== */
86
+
87
+ /**
88
+ * Remove the gray background color from active links in IE 10.
89
+ */
90
+
91
+ a {
92
+ background: transparent;
93
+ }
94
+
95
+ /**
96
+ * Improve readability when focused and also mouse hovered in all browsers.
97
+ */
98
+
99
+ a:active,
100
+ a:hover {
101
+ outline: 0;
102
+ }
103
+
104
+ /* Text-level semantics
105
+ ========================================================================== */
106
+
107
+ /**
108
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
109
+ */
110
+
111
+ abbr[title] {
112
+ border-bottom: 1px dotted;
113
+ }
114
+
115
+ /**
116
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
117
+ */
118
+
119
+ b,
120
+ strong {
121
+ font-weight: bold;
122
+ }
123
+
124
+ /**
125
+ * Address styling not present in Safari and Chrome.
126
+ */
127
+
128
+ dfn {
129
+ font-style: italic;
130
+ }
131
+
132
+ /**
133
+ * Address variable `h1` font-size and margin within `section` and `article`
134
+ * contexts in Firefox 4+, Safari, and Chrome.
135
+ */
136
+
137
+ h1 {
138
+ font-size: 2em;
139
+ margin: 0.67em 0;
140
+ }
141
+
142
+ /**
143
+ * Address styling not present in IE 8/9.
144
+ */
145
+
146
+ mark {
147
+ background: #ff0;
148
+ color: #000;
149
+ }
150
+
151
+ /**
152
+ * Address inconsistent and variable font size in all browsers.
153
+ */
154
+
155
+ small {
156
+ font-size: 80%;
157
+ }
158
+
159
+ /**
160
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
161
+ */
162
+
163
+ sub,
164
+ sup {
165
+ font-size: 75%;
166
+ line-height: 0;
167
+ position: relative;
168
+ vertical-align: baseline;
169
+ }
170
+
171
+ sup {
172
+ top: -0.5em;
173
+ }
174
+
175
+ sub {
176
+ bottom: -0.25em;
177
+ }
178
+
179
+ /* Embedded content
180
+ ========================================================================== */
181
+
182
+ /**
183
+ * Remove border when inside `a` element in IE 8/9/10.
184
+ */
185
+
186
+ img {
187
+ border: 0;
188
+ }
189
+
190
+ /**
191
+ * Correct overflow not hidden in IE 9/10/11.
192
+ */
193
+
194
+ svg:not(:root) {
195
+ overflow: hidden;
196
+ }
197
+
198
+ /* Grouping content
199
+ ========================================================================== */
200
+
201
+ /**
202
+ * Address margin not present in IE 8/9 and Safari.
203
+ */
204
+
205
+ figure {
206
+ margin: 1em 40px;
207
+ }
208
+
209
+ /**
210
+ * Address differences between Firefox and other browsers.
211
+ */
212
+
213
+ hr {
214
+ -moz-box-sizing: content-box;
215
+ box-sizing: content-box;
216
+ height: 0;
217
+ }
218
+
219
+ /**
220
+ * Contain overflow in all browsers.
221
+ */
222
+
223
+ pre {
224
+ overflow: auto;
225
+ }
226
+
227
+ /**
228
+ * Address odd `em`-unit font size rendering in all browsers.
229
+ */
230
+
231
+ code,
232
+ kbd,
233
+ pre,
234
+ samp {
235
+ font-family: monospace, monospace;
236
+ font-size: 1em;
237
+ }
238
+
239
+ /* Forms
240
+ ========================================================================== */
241
+
242
+ /**
243
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
244
+ * styling of `select`, unless a `border` property is set.
245
+ */
246
+
247
+ /**
248
+ * 1. Correct color not being inherited.
249
+ * Known issue: affects color of disabled elements.
250
+ * 2. Correct font properties not being inherited.
251
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
252
+ */
253
+
254
+ button,
255
+ input,
256
+ optgroup,
257
+ select,
258
+ textarea {
259
+ color: inherit; /* 1 */
260
+ font: inherit; /* 2 */
261
+ margin: 0; /* 3 */
262
+ }
263
+
264
+ /**
265
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
266
+ */
267
+
268
+ button {
269
+ overflow: visible;
270
+ }
271
+
272
+ /**
273
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
274
+ * All other form control elements do not inherit `text-transform` values.
275
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
276
+ * Correct `select` style inheritance in Firefox.
277
+ */
278
+
279
+ button,
280
+ select {
281
+ text-transform: none;
282
+ }
283
+
284
+ /**
285
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
286
+ * and `video` controls.
287
+ * 2. Correct inability to style clickable `input` types in iOS.
288
+ * 3. Improve usability and consistency of cursor style between image-type
289
+ * `input` and others.
290
+ */
291
+
292
+ button,
293
+ html input[type="button"], /* 1 */
294
+ input[type="reset"],
295
+ input[type="submit"] {
296
+ -webkit-appearance: button; /* 2 */
297
+ cursor: pointer; /* 3 */
298
+ }
299
+
300
+ /**
301
+ * Re-set default cursor for disabled elements.
302
+ */
303
+
304
+ button[disabled],
305
+ html input[disabled] {
306
+ cursor: default;
307
+ }
308
+
309
+ /**
310
+ * Remove inner padding and border in Firefox 4+.
311
+ */
312
+
313
+ button::-moz-focus-inner,
314
+ input::-moz-focus-inner {
315
+ border: 0;
316
+ padding: 0;
317
+ }
318
+
319
+ /**
320
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
321
+ * the UA stylesheet.
322
+ */
323
+
324
+ input {
325
+ line-height: normal;
326
+ }
327
+
328
+ /**
329
+ * It's recommended that you don't attempt to style these elements.
330
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
331
+ *
332
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
333
+ * 2. Remove excess padding in IE 8/9/10.
334
+ */
335
+
336
+ input[type="checkbox"],
337
+ input[type="radio"] {
338
+ box-sizing: border-box; /* 1 */
339
+ padding: 0; /* 2 */
340
+ }
341
+
342
+ /**
343
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
344
+ * `font-size` values of the `input`, it causes the cursor style of the
345
+ * decrement button to change from `default` to `text`.
346
+ */
347
+
348
+ input[type="number"]::-webkit-inner-spin-button,
349
+ input[type="number"]::-webkit-outer-spin-button {
350
+ height: auto;
351
+ }
352
+
353
+ /**
354
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
355
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
356
+ * (include `-moz` to future-proof).
357
+ */
358
+
359
+ input[type="search"] {
360
+ -webkit-appearance: textfield; /* 1 */
361
+ -moz-box-sizing: content-box;
362
+ -webkit-box-sizing: content-box; /* 2 */
363
+ box-sizing: content-box;
364
+ }
365
+
366
+ /**
367
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
368
+ * Safari (but not Chrome) clips the cancel button when the search input has
369
+ * padding (and `textfield` appearance).
370
+ */
371
+
372
+ input[type="search"]::-webkit-search-cancel-button,
373
+ input[type="search"]::-webkit-search-decoration {
374
+ -webkit-appearance: none;
375
+ }
376
+
377
+ /**
378
+ * Define consistent border, margin, and padding.
379
+ */
380
+
381
+ fieldset {
382
+ border: 1px solid #c0c0c0;
383
+ margin: 0 2px;
384
+ padding: 0.35em 0.625em 0.75em;
385
+ }
386
+
387
+ /**
388
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
389
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
390
+ */
391
+
392
+ legend {
393
+ border: 0; /* 1 */
394
+ padding: 0; /* 2 */
395
+ }
396
+
397
+ /**
398
+ * Remove default vertical scrollbar in IE 8/9/10/11.
399
+ */
400
+
401
+ textarea {
402
+ overflow: auto;
403
+ }
404
+
405
+ /**
406
+ * Don't inherit the `font-weight` (applied by a rule above).
407
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
408
+ */
409
+
410
+ optgroup {
411
+ font-weight: bold;
412
+ }
413
+
414
+ /* Tables
415
+ ========================================================================== */
416
+
417
+ /**
418
+ * Remove most spacing between table cells.
419
+ */
420
+
421
+ table {
422
+ border-collapse: collapse;
423
+ border-spacing: 0;
424
+ }
425
+
426
+ td,
427
+ th {
428
+ padding: 0;
429
+ }
430
+
431
+ /*****************************************
432
+ Coderay Github Theme
433
+ *****************************************/
434
+
435
+ .CodeRay {
436
+ font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
437
+ }
438
+
439
+ .CodeRay .debug { color:white ! important; background:blue ! important; }
440
+
441
+ .CodeRay .annotation { color:#007 }
442
+ .CodeRay .attribute-name { color:#f08 }
443
+ .CodeRay .attribute-value { color:#700 }
444
+ .CodeRay .binary { color:#509; font-weight:bold }
445
+ .CodeRay .comment { color:#998; font-style: italic;}
446
+ .CodeRay .char { color:#04D }
447
+ .CodeRay .char .content { color:#04D }
448
+ .CodeRay .char .delimiter { color:#039 }
449
+ .CodeRay .class { color:#458; font-weight:bold }
450
+ .CodeRay .complex { color:#A08; font-weight:bold }
451
+ .CodeRay .constant { color:teal; }
452
+ .CodeRay .color { color:#0A0 }
453
+ .CodeRay .class-variable { color:#369 }
454
+ .CodeRay .decorator { color:#B0B; }
455
+ .CodeRay .definition { color:#099; font-weight:bold }
456
+ .CodeRay .directive { color:#088; font-weight:bold }
457
+ .CodeRay .delimiter { color:black }
458
+ .CodeRay .doc { color:#970 }
459
+ .CodeRay .doctype { color:#34b }
460
+ .CodeRay .doc-string { color:#D42; font-weight:bold }
461
+ .CodeRay .escape { color:#666; font-weight:bold }
462
+ .CodeRay .entity { color:#800; font-weight:bold }
463
+ .CodeRay .error { color:#F00; background-color:#FAA }
464
+ .CodeRay .exception { color:#C00; font-weight:bold }
465
+ .CodeRay .filename { color:#099; }
466
+ .CodeRay .function { color:#900; font-weight:bold }
467
+ .CodeRay .global-variable { color:teal; font-weight:bold }
468
+ .CodeRay .hex { color:#058; font-weight:bold }
469
+ .CodeRay .integer { color:#099; }
470
+ .CodeRay .include { color:#B44; font-weight:bold }
471
+ .CodeRay .inline { color: black }
472
+ .CodeRay .inline .inline { background: #ccc }
473
+ .CodeRay .inline .inline .inline { background: #bbb }
474
+ .CodeRay .inline .inline-delimiter { color: #D14; }
475
+ .CodeRay .inline-delimiter { color: #D14; }
476
+ .CodeRay .important { color:#f00; }
477
+ .CodeRay .interpreted { color:#B2B; font-weight:bold }
478
+ .CodeRay .instance-variable { color:teal }
479
+ .CodeRay .label { color:#970; font-weight:bold }
480
+ .CodeRay .local-variable { color:#963 }
481
+ .CodeRay .octal { color:#40E; font-weight:bold }
482
+ .CodeRay .operator { }
483
+ .CodeRay .predefined-constant { font-weight:bold }
484
+ .CodeRay .predefined { color:#369; font-weight:bold }
485
+ .CodeRay .preprocessor { color:#579; }
486
+ .CodeRay .pseudo-class { color:#00C; font-weight:bold }
487
+ .CodeRay .predefined-type { color:#074; font-weight:bold }
488
+ .CodeRay .reserved, .CodeRay .keyword { color:#000; font-weight:bold }
489
+
490
+ .CodeRay .key { color: #808; }
491
+ .CodeRay .key .delimiter { color: #606; }
492
+ .CodeRay .key .char { color: #80f; }
493
+ .CodeRay .value { color: #088; }
494
+
495
+ .CodeRay .regexp { background-color:#fff0ff }
496
+ .CodeRay .regexp .content { color:#808 }
497
+ .CodeRay .regexp .delimiter { color:#404 }
498
+ .CodeRay .regexp .modifier { color:#C2C }
499
+ .CodeRay .regexp .function { color:#404; font-weight: bold }
500
+
501
+ .CodeRay .string { color: #D20; }
502
+ .CodeRay .string .string { }
503
+ .CodeRay .string .string .string { background-color:#ffd0d0 }
504
+ .CodeRay .string .content { color: #D14; }
505
+ .CodeRay .string .char { color: #D14; }
506
+ .CodeRay .string .delimiter { color: #D14; }
507
+
508
+ .CodeRay .shell { color:#D14 }
509
+ .CodeRay .shell .content { }
510
+ .CodeRay .shell .delimiter { color:#D14 }
511
+
512
+ .CodeRay .symbol { color:#990073 }
513
+ .CodeRay .symbol .content { color:#A60 }
514
+ .CodeRay .symbol .delimiter { color:#630 }
515
+
516
+ .CodeRay .tag { color:#070 }
517
+ .CodeRay .tag-special { color:#D70; font-weight:bold }
518
+ .CodeRay .type { color:#339; font-weight:bold }
519
+ .CodeRay .variable { color:#036 }
520
+
521
+ .CodeRay .insert { background: #afa; }
522
+ .CodeRay .delete { background: #faa; }
523
+ .CodeRay .change { color: #aaf; background: #007; }
524
+ .CodeRay .head { color: #f8f; background: #505 }
525
+
526
+ .CodeRay .insert .insert { color: #080; font-weight:bold }
527
+ .CodeRay .delete .delete { color: #800; font-weight:bold }
528
+ .CodeRay .change .change { color: #66f; }
529
+ .CodeRay .head .head { color: #f4f; }
530
+
531
+ figure.code {
532
+ border: 1px solid #d5d5d5;
533
+ margin: 0 20px;
534
+ border-radius: 2px;
535
+ }
536
+
537
+ figure.code figcaption {
538
+ background: #f5f5f5;
539
+ border-bottom: 1px solid #d5d5d5;
540
+ padding: 10px 0;
541
+ text-align: center;
542
+ }
543
+
544
+ .CodeRay table {
545
+ width: 100%;
546
+ }
547
+
548
+ .CodeRay pre,
549
+ .CodeRay td.gutter,
550
+ .CodeRay td.lines-of-code {
551
+ padding: 0;
552
+ margin: 0;
553
+ font-size: 13px;
554
+ line-height: 1.3;
555
+ }
556
+
557
+ .CodeRay td.gutter {
558
+ border-right: 1px solid #d5d5d5;
559
+ text-align: right;
560
+ width: 50px;
561
+ }
562
+
563
+ .CodeRay td.gutter div,
564
+ .CodeRay td.lines-of-code div {
565
+ padding: 3px 7px;
566
+ }
567
+
568
+ .CodeRay td.lines-of-code div {
569
+ padding-left: 10px;
570
+ }
571
+
572
+ .CodeRay td.gutter div:nth-child(1),
573
+ .CodeRay td.lines-of-code div:nth-child(1) {
574
+ padding-top: 10px;
575
+ }
576
+
577
+ .CodeRay td.gutter .highlight,
578
+ .CodeRay td.lines-of-code .highlight {
579
+ background: #d5ffd5;
580
+ }
581
+
582
+
583
+ /*****************************************
584
+ Coderay Github Theme
585
+ *****************************************/
586
+
587
+ body {
588
+ padding: 50px;
589
+ font-weight: 100;
590
+ width: 1100px;
591
+ height: 600px;
592
+ }
593
+
594
+ p {
595
+ line-height: 1.6;
596
+ }
597
+
598
+ h2 {
599
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
600
+ font-weight: 100;
601
+ font-size: 42px;
602
+ }
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <title><%= name %></title>
6
+ <link rel="stylesheet" href="book.css" type="text/css" media="all" title="Default ebook theme" charset="utf-8" />
6
7
  </head>
7
8
  <body>
8
9
  <div id="contents">
@@ -1,3 +1,3 @@
1
1
  module Author
2
- VERSION = "1.1.0.alpha"
2
+ VERSION = "1.1.1.alpha"
3
3
  end
@@ -28,6 +28,7 @@ describe Author::Commands::Generator do
28
28
  'ihazfiles/outline.txt'.must_be_a_file
29
29
  'ihazfiles/chapters/sample.md'.must_be_a_file
30
30
  'ihazfiles/templates/layout.xhtml'.must_be_a_file
31
+ 'ihazfiles/export/book.css'.must_be_a_file
31
32
  end
32
33
  end
33
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: author
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.alpha
4
+ version: 1.1.1.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry Schmidt
@@ -147,6 +147,7 @@ files:
147
147
  - lib/author/exporters/xhtml.rb
148
148
  - lib/author/plugins/awesome_codeblock.rb
149
149
  - lib/author/templates/Gemfile
150
+ - lib/author/templates/book.css
150
151
  - lib/author/templates/config.yml
151
152
  - lib/author/templates/layout.xhtml
152
153
  - lib/author/templates/sample.md