prophecy 0.0.1

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.
Files changed (129) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/Overview.md +44 -0
  6. data/README.md +35 -0
  7. data/Rakefile +1 -0
  8. data/bin/kindlegen +18 -0
  9. data/bin/kindlegen.exe +0 -0
  10. data/bin/kindlegen_linux +0 -0
  11. data/bin/kindlegen_mac +0 -0
  12. data/bin/prophecy +4 -0
  13. data/docs/licenses/kindlegen/.empty_directory +0 -0
  14. data/docs/licenses/kindlegen/EULA.txt +61 -0
  15. data/docs/licenses/kindlegen/KindleGen Legal Notices 2009-11-10 Linux.txt +21 -0
  16. data/docs/licenses/kindlegen/KindleGen Legal Notices 2009-11-10 Mac.txt +21 -0
  17. data/docs/licenses/kindlegen/KindleGen OSS Notices 2009-07-29-Windows.txt +19 -0
  18. data/features/assets.feature +14 -0
  19. data/features/book.feature +10 -0
  20. data/features/generator.feature +15 -0
  21. data/features/support/hooks.rb +5 -0
  22. data/features/support/setup.rb +3 -0
  23. data/lib/prophecy/assets/.gitignore +2 -0
  24. data/lib/prophecy/assets/config.rb +20 -0
  25. data/lib/prophecy/assets/epub_template/META-INF/com.apple.ibooks.display-options.xml +6 -0
  26. data/lib/prophecy/assets/epub_template/META-INF/container.xml +6 -0
  27. data/lib/prophecy/assets/epub_template/OEBPS/.gitkeep +0 -0
  28. data/lib/prophecy/assets/epub_template/OEBPS/chapters/.gitkeep +0 -0
  29. data/lib/prophecy/assets/epub_template/OEBPS/content.opf.erb +114 -0
  30. data/lib/prophecy/assets/epub_template/OEBPS/toc.ncx.erb +18 -0
  31. data/lib/prophecy/assets/epub_template/mimetype +1 -0
  32. data/lib/prophecy/assets/fonts/Crimson-Bold.otf +0 -0
  33. data/lib/prophecy/assets/fonts/Crimson-BoldItalic.otf +0 -0
  34. data/lib/prophecy/assets/fonts/Crimson-Italic.otf +0 -0
  35. data/lib/prophecy/assets/fonts/Crimson-Roman.otf +0 -0
  36. data/lib/prophecy/assets/fonts/Crimson-Semibold.otf +0 -0
  37. data/lib/prophecy/assets/fonts/Crimson-SemiboldItalic.otf +0 -0
  38. data/lib/prophecy/assets/fonts/GenBasB.ttf +0 -0
  39. data/lib/prophecy/assets/fonts/GenBasBI.ttf +0 -0
  40. data/lib/prophecy/assets/fonts/GenBasI.ttf +0 -0
  41. data/lib/prophecy/assets/fonts/GenBasR.ttf +0 -0
  42. data/lib/prophecy/assets/fonts/GenBkBasB.ttf +0 -0
  43. data/lib/prophecy/assets/fonts/GenBkBasBI.ttf +0 -0
  44. data/lib/prophecy/assets/fonts/GenBkBasI.ttf +0 -0
  45. data/lib/prophecy/assets/fonts/GenBkBasR.ttf +0 -0
  46. data/lib/prophecy/assets/fonts/GentiumPlus-I.ttf +0 -0
  47. data/lib/prophecy/assets/fonts/GentiumPlus-R.ttf +0 -0
  48. data/lib/prophecy/assets/helpers/check_typos.sh +27 -0
  49. data/lib/prophecy/assets/helpers/helpers.rb +0 -0
  50. data/lib/prophecy/assets/helpers/pali_typos +2 -0
  51. data/lib/prophecy/assets/helpers/sed_chars +5 -0
  52. data/lib/prophecy/assets/helpers/sed_dumb_ebook +18 -0
  53. data/lib/prophecy/assets/helpers/sed_tex2uni +62 -0
  54. data/lib/prophecy/assets/helpers/tex2html.sh +112 -0
  55. data/lib/prophecy/assets/helpers/tex2md.sh +10 -0
  56. data/lib/prophecy/assets/helpers/tidy_quotes +1 -0
  57. data/lib/prophecy/assets/helpers/tidy_quotes.sh +8 -0
  58. data/lib/prophecy/assets/helpers/to-html.sh +9 -0
  59. data/lib/prophecy/assets/latex_template/Makefile +37 -0
  60. data/lib/prophecy/assets/latex_template/anecdote.cls +163 -0
  61. data/lib/prophecy/assets/latex_template/book-core-first.sty +673 -0
  62. data/lib/prophecy/assets/latex_template/book-core-last.sty +40 -0
  63. data/lib/prophecy/assets/latex_template/book_main.tex.erb +31 -0
  64. data/lib/prophecy/assets/latex_template/booklet_main.tex +15 -0
  65. data/lib/prophecy/assets/latex_template/chapters/.gitkeep +0 -0
  66. data/lib/prophecy/assets/latex_template/cover_main.tex +48 -0
  67. data/lib/prophecy/assets/latex_template/mylayout.sty +2 -0
  68. data/lib/prophecy/assets/layouts/page.xhtml.erb +20 -0
  69. data/lib/prophecy/assets/sass/_booktheme.sass +3 -0
  70. data/lib/prophecy/assets/sass/_byronic.sass +263 -0
  71. data/lib/prophecy/assets/sass/_colors.sass +7 -0
  72. data/lib/prophecy/assets/sass/_epub-css-starter-kit.sass +734 -0
  73. data/lib/prophecy/assets/sass/_font-existence.scss +12 -0
  74. data/lib/prophecy/assets/sass/_font-source-sans-pro.scss +75 -0
  75. data/lib/prophecy/assets/sass/_fontfaces.scss +11 -0
  76. data/lib/prophecy/assets/sass/_mixins.sass +4 -0
  77. data/lib/prophecy/assets/sass/print.sass +6 -0
  78. data/lib/prophecy/assets/sass/style-epub.sass +7 -0
  79. data/lib/prophecy/assets/sass/style-mobi-kf8.sass +7 -0
  80. data/lib/prophecy/assets/sass/style-mobi.sass +9 -0
  81. data/lib/prophecy/assets/stylesheets/print.css +3 -0
  82. data/lib/prophecy/assets/stylesheets/style-epub.css +401 -0
  83. data/lib/prophecy/assets/stylesheets/style-mobi-kf8.css +401 -0
  84. data/lib/prophecy/assets/stylesheets/style-mobi.css +317 -0
  85. data/lib/prophecy/assets/webfonts/existence-light.ttf +0 -0
  86. data/lib/prophecy/assets/webfonts/sourcesanspro-bold.ttf +0 -0
  87. data/lib/prophecy/assets/webfonts/sourcesanspro-extralight.ttf +0 -0
  88. data/lib/prophecy/assets/webfonts/sourcesanspro-italic.ttf +0 -0
  89. data/lib/prophecy/assets/webfonts/sourcesanspro-light.ttf +0 -0
  90. data/lib/prophecy/assets/webfonts/sourcesanspro-lightitalic.ttf +0 -0
  91. data/lib/prophecy/assets/webfonts/sourcesanspro-regular.ttf +0 -0
  92. data/lib/prophecy/assets/webfonts-extra/sourcesanspro-bolditalic.ttf +0 -0
  93. data/lib/prophecy/assets/webfonts-extra/sourcesanspro-extralightitalic.ttf +0 -0
  94. data/lib/prophecy/assets/webfonts-extra/sourcesanspro-semibold.ttf +0 -0
  95. data/lib/prophecy/assets/webfonts-extra/sourcesanspro-semibolditalic.ttf +0 -0
  96. data/lib/prophecy/book.rb +281 -0
  97. data/lib/prophecy/chapter.rb +359 -0
  98. data/lib/prophecy/cli.rb +144 -0
  99. data/lib/prophecy/generators/assets.rb +29 -0
  100. data/lib/prophecy/generators/book/.gitignore +7 -0
  101. data/lib/prophecy/generators/book/LICENSE.txt +5 -0
  102. data/lib/prophecy/generators/book/README.md.tt +4 -0
  103. data/lib/prophecy/generators/book/book.yml.tt +55 -0
  104. data/lib/prophecy/generators/book/build/epub/.empty_directory +0 -0
  105. data/lib/prophecy/generators/book/build/latex/.empty_directory +0 -0
  106. data/lib/prophecy/generators/book/build/mobi/.empty_directory +0 -0
  107. data/lib/prophecy/generators/book/epub_mobi.yml +26 -0
  108. data/lib/prophecy/generators/book/example-book.yml +78 -0
  109. data/lib/prophecy/generators/book/images/cover.jpg +0 -0
  110. data/lib/prophecy/generators/book/images/cover.xcf +0 -0
  111. data/lib/prophecy/generators/book/images/publisher-logo.jpg +0 -0
  112. data/lib/prophecy/generators/book/manuscript/glossary.md +7 -0
  113. data/lib/prophecy/generators/book/manuscript/nameless-labyrinth.markdown +34 -0
  114. data/lib/prophecy/generators/book/manuscript/preface.md +5 -0
  115. data/lib/prophecy/generators/book/manuscript/the-sway-of-reason.markdown +22 -0
  116. data/lib/prophecy/generators/book/manuscript/unhuman-massiveness.markdown +27 -0
  117. data/lib/prophecy/generators/book/manuscript/xhtml/.gitkeep +0 -0
  118. data/lib/prophecy/generators/book/manuscript/xhtml/cover.xhtml.erb +21 -0
  119. data/lib/prophecy/generators/book/manuscript/xhtml/titlepage.xhtml.erb +31 -0
  120. data/lib/prophecy/generators/book/manuscript/xhtml/toc.xhtml.erb +16 -0
  121. data/lib/prophecy/generators/new.rb +22 -0
  122. data/lib/prophecy/manifest.rb +72 -0
  123. data/lib/prophecy/version.rb +3 -0
  124. data/lib/prophecy.rb +18 -0
  125. data/prophecy.gemspec +36 -0
  126. data/spec/book_spec.rb +9 -0
  127. data/spec/chapter_spec.rb +0 -0
  128. data/spec/manifest_spec.rb +0 -0
  129. metadata +366 -0
@@ -0,0 +1,734 @@
1
+
2
+ /* Epub CSS Starter Kit
3
+ * https://github.com/mattharrison/epub-css-starter-kit.git
4
+
5
+ $sidebar-border-color: #ccc
6
+ $table-border-color: black
7
+ $line-height: 1.5em
8
+ $green: #8ae234
9
+ $red: #ef2929
10
+
11
+ /* This assumes geometric header shrinkage
12
+ /* Also, it tries to make h2 be 1em
13
+ $h1-size: 1em * 1.6
14
+ $heading-shrinkage: 1/1.6
15
+
16
+
17
+ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
18
+ /* Note kindle hates margin:0 ! (or margin-left or margin-top set) it inserts newlines galore
19
+ /* margin: 0
20
+ margin-right: 0
21
+ padding: 0
22
+ border: 0
23
+ font-size: 100%
24
+ /* font: inherit
25
+ vertical-align: baseline
26
+
27
+
28
+ /* optimal sizing see http://demosthenes.info/blog/578/Crafting-Optimal-Type-Sizes-For-Web-Pages
29
+ /* kobo and nook dislike this
30
+ /*
31
+ /*html
32
+ /* font-size: 62.5%
33
+ /*body
34
+ /* font-size: 1.6rem
35
+ /* line-height: 2.56rem
36
+ /* text-rendering: optimizeLegibility
37
+
38
+
39
+ table
40
+ border-collapse: collapse
41
+ border-spacing: 0
42
+
43
+ /* end reset
44
+
45
+ @page
46
+ margin-top: 30px
47
+ margin-bottom: 20px
48
+
49
+
50
+ div.cover
51
+ text-align: center
52
+ page-break-after: always
53
+ padding: 0px
54
+ margin: 0px
55
+ img
56
+ height: 100%
57
+ max-width: 100%
58
+ padding: 10px
59
+ margin: 0px
60
+ background-color: #ccc
61
+
62
+ .half
63
+ max-width: 50%
64
+
65
+ .tenth
66
+ max-width: 10%
67
+ width: 10%
68
+
69
+ .cover-img
70
+ height: 100%
71
+ max-width: 100%
72
+ padding: 0px
73
+ margin: 0px
74
+
75
+ /* font plan- serif text, sans headers
76
+
77
+ h1, h2, h3, h4, h5, h6
78
+ hyphens: none !important
79
+ -moz-hyphens: none !important
80
+ -webkit-hyphens: none !important
81
+ adobe-hyphenate: none !important
82
+ page-break-after: avoid
83
+ page-break-inside: avoid
84
+ text-indent: 0px
85
+ text-align: left
86
+ font-family: Helvetica, Arial, sans-serif
87
+
88
+ h1
89
+ font-size: $h1-size
90
+ margin-bottom: $h1-size*2
91
+
92
+ .title h1
93
+ margin-bottom: 0px
94
+ margin-top: $h1-size*2
95
+
96
+ h2
97
+ font-size: $h1-size*$heading-shrinkage
98
+ margin-top: .5em
99
+ margin-bottom: .5em
100
+
101
+ h3
102
+ font-size: $h1-size*$heading-shrinkage*$heading-shrinkage
103
+
104
+ h4
105
+ font-size: $h1-size*$heading-shrinkage*$heading-shrinkage*$heading-shrinkage
106
+
107
+ h5
108
+ font-size: $h1-size*$heading-shrinkage*$heading-shrinkage*$heading-shrinkage*$heading-shrinkage
109
+
110
+ h6
111
+ font-size: $h1-size*$heading-shrinkage*$heading-shrinkage*$heading-shrinkage*$heading-shrinkage*$heading-shrinkage
112
+
113
+ /* Do not indent first paragraph. Mobi will need class='first-para'
114
+
115
+ h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p
116
+ text-indent: 0
117
+
118
+
119
+
120
+ p
121
+ &.first-para, &.first-para-chapter, &.note-p-first
122
+ text-indent: 0
123
+ &.first-para-chapter::first-line
124
+ /* handle run-in
125
+ font-variant: small-caps
126
+ &.no-indent
127
+ text-indent: 0
128
+ /* paperwhite defaults to sans
129
+ font-family: "Palatino", "Times New Roman", Caecilia, serif
130
+ -webkit-hyphens: auto
131
+ -moz-hyphens: auto
132
+ hyphens: auto
133
+ hyphenate-after: 3
134
+ hyphenate-before: 3
135
+ hyphenate-lines: 2
136
+ -webkit-hyphenate-after: 3
137
+ -webkit-hyphenate-before: 3
138
+ -webkit-hyphenate-lines: 2
139
+ line-height: $line-height
140
+ margin: 0
141
+ text-align: justify
142
+ text-indent: 1em
143
+ orphans: 2
144
+ widows: 2
145
+
146
+ .no-hyphens
147
+ hyphens: none !important
148
+ -moz-hyphens: none !important
149
+ -webkit-hyphens: none !important
150
+ adobe-hyphenate: none !important
151
+
152
+ .rtl
153
+ direction: rtl
154
+ float: right
155
+
156
+ .drop
157
+ overflow: hidden
158
+ line-height: 89%
159
+ height: 0.80em
160
+ font-size: 281%
161
+ margin-right: 0.075em
162
+ float: left
163
+
164
+ .dropcap
165
+ line-height: 100%
166
+ font-size: 341%
167
+ margin-right: 0.075em
168
+ margin-top: -0.22em
169
+ float: left
170
+ height: 0.8em
171
+
172
+ /* lists
173
+
174
+ ul, ol, dl
175
+ margin: 1em 0 1em 0
176
+ text-align: left
177
+
178
+ li
179
+ font-family: "Palatino", "Times New Roman", Caecilia, serif
180
+ line-height: $line-height
181
+ orphans: 2
182
+ widows: 2
183
+ text-align: justify
184
+ text-indent: 0
185
+ margin: 0
186
+ p
187
+ /* Fix paragraph indenting inside of lists
188
+ text-indent: 0em
189
+
190
+ dt
191
+ font-weight: bold
192
+ font-family: Helvetica, Arial, sans-serif
193
+
194
+ dd
195
+ line-height: $line-height
196
+ font-family: "Palatino", "Times New Roman", Caecilia, serif
197
+ p
198
+ /* Fix paragraph indenting inside of definition lists
199
+ text-indent: 0em
200
+
201
+
202
+ blockquote
203
+ margin-left: 1em
204
+ margin-right: 1em
205
+ line-height: $line-height
206
+ font-style: italic
207
+ p.first-para, p
208
+ text-indent: 0
209
+
210
+
211
+ pre, tt, code, samp, kbd
212
+ font-family: "Courier New", Courier, monospace
213
+ word-wrap: break-word
214
+
215
+ pre
216
+ font-size: .8em
217
+ line-height: 1.2em
218
+ margin-left: 1em
219
+ /* margin-top: 1em
220
+ margin-bottom: 1em
221
+ white-space: pre-wrap
222
+ display: block
223
+
224
+ img
225
+ border-radius: 0.3em
226
+ -webkit-border-radius: 0.3em
227
+ -webkit-box-shadow: rgba(0, 0, 0, 0.15) 0 1px 4px
228
+ box-shadow: rgba(0, 0, 0, 0.15) 0 1px 4px
229
+ box-sizing: border-box
230
+ border: white 0.5em solid
231
+ /* Don't go too big on images, let reader zoom in if they care to
232
+ max-width: 80%
233
+ max-height: 80%
234
+
235
+ img.pwhack
236
+ /* Paperwhite hack
237
+ width: 100%
238
+
239
+ .group
240
+ page-break-inside: avoid
241
+
242
+
243
+ .caption
244
+ text-align: center
245
+ font-size: .8em
246
+ font-weight: bold
247
+
248
+ p img
249
+ border-radius: 0
250
+ border: none
251
+
252
+ figure
253
+ /* These first 3 should center figures
254
+ padding: 1em
255
+ background-color: $sidebar-border-color
256
+ border: 1px solid black
257
+ text-align: center
258
+ figcaption
259
+ text-align: center
260
+ font-size: .8em
261
+ font-weight: bold
262
+ div
263
+ &.div-literal-block-admonition
264
+ margin-left: 1em
265
+ background-color: $sidebar-border-color
266
+ &.note, &.tip, &.hint
267
+ margin: 1em 0 1em 0 !important
268
+ background-color: $sidebar-border-color
269
+ padding: 1em !important
270
+ /* kindle is finnicky with borders, bottoms dissappear, width is ignored */
271
+ border-top: 0px solid $sidebar-border-color
272
+ border-bottom: 0px dashed $sidebar-border-color
273
+ page-break-inside: avoid
274
+
275
+ /* sidebar
276
+
277
+ p.note-title, .admonition-title
278
+ margin-top: 0
279
+ /*mobi doesn't like div margins
280
+ font-variant: small-caps
281
+ font-size: .9em
282
+ text-align: center
283
+ font-weight: bold
284
+ font-style: normal
285
+ -webkit-hyphens: none
286
+ -moz-hyphens: none
287
+ hyphens: none
288
+ /* margin:0 1em 0 1em
289
+
290
+ div.note p, .note-p
291
+ text-indent: 1em
292
+ margin-left: 0
293
+ margin-right: 0
294
+ /* font-style: italic
295
+
296
+ /* Since Kindle doesn't like multiple classes have to have combinations
297
+ div.note p.note-p-first
298
+ text-indent: 0
299
+ margin-left: 0
300
+ margin-right: 0
301
+
302
+
303
+ /* Tables
304
+
305
+ table
306
+ /*width: 100%
307
+ page-break-inside: avoid
308
+ border: 1px
309
+ /* centers on kf8
310
+ margin: 1em auto
311
+ border-collapse: collapse
312
+ border-spacing: 0
313
+
314
+ th
315
+ font-variant: small-caps
316
+ padding: 5px !important
317
+ vertical-align: baseline
318
+ border-bottom: 1px solid $table-border-color
319
+
320
+ td
321
+ font-family: "Palatino", "Times New Roman", Caecilia, serif
322
+ font-size: small
323
+ hyphens: none
324
+ -moz-hyphens: none
325
+ -webkit-hyphens: none
326
+ padding: 5px !important
327
+ page-break-inside: avoid
328
+ text-align: left
329
+ text-indent: 0
330
+ vertical-align: baseline
331
+
332
+ td:nth-last-child
333
+ border-bottom: 1px solid $table-border-color
334
+
335
+ .zebra
336
+ /* shade background by groups of three
337
+ tr th
338
+ background-color: white
339
+ tr:nth-child(6n-1), tr:nth-child(6n+0), tr:nth-child(6n+1)
340
+ background-color: #ccc
341
+
342
+ sup
343
+ vertical-align: super
344
+ font-size: .5em
345
+ line-height: .5em
346
+
347
+ sub
348
+ vertical-align: sub
349
+ font-size: .5em
350
+ line-height: .5em
351
+
352
+ table.footnote
353
+ margin: .5em 0em 0em 0em
354
+
355
+ .footnote
356
+ font-size: .8em
357
+
358
+ .footnote-link
359
+ font-size: .8em
360
+ vertical-align: super
361
+
362
+ .tocEntry-1 a
363
+ /* empty
364
+ font-weight: bold
365
+ text-decoration: none
366
+ color: black
367
+
368
+ .tocEntry-2 a
369
+ margin-left: 1em
370
+ text-indent: 1em
371
+ text-decoration: none
372
+ color: black
373
+
374
+ .tocEntry-3 a
375
+ text-indent: 2em
376
+ text-decoration: none
377
+ color: black
378
+
379
+ .tocEntry-4 a
380
+ text-indent: 3em
381
+ text-decoration: none
382
+ color: black
383
+
384
+ .copyright-top
385
+ margin-top: 6em
386
+
387
+ .page-break-before
388
+ page-break-before: always
389
+
390
+ .page-break-after
391
+ page-break-after: always
392
+ .center
393
+ text-indent: 0
394
+ text-align: center
395
+ margin-left: auto
396
+ margin-right: auto
397
+ display: block
398
+
399
+ .right
400
+ text-align: right
401
+
402
+ .left
403
+ text-align: left
404
+
405
+ .f-right
406
+ float: right
407
+
408
+ .f-left
409
+ float: left
410
+
411
+ /* Samples
412
+ .ingredient
413
+ page-break-inside: avoid
414
+
415
+
416
+ .box-example
417
+ background-color: $green
418
+ margin: 2em
419
+ padding: 1em
420
+ border: 2px dashed $red
421
+
422
+ .blue
423
+ background-color: blue
424
+
425
+ .dashed
426
+ border: 2px dashed $red
427
+
428
+ .padding-only
429
+ padding: 1em
430
+
431
+ .margin-only
432
+ margin: 2em
433
+
434
+
435
+ .smaller
436
+ font-size: .8em
437
+
438
+ .em1
439
+ font-size: .5em
440
+
441
+ .em2
442
+ font-size: .75em
443
+
444
+ .em3
445
+ font-size: 1em
446
+
447
+ .em4
448
+ font-size: 1.5em
449
+
450
+ .em5
451
+ font-size: 2em
452
+
453
+ .per1
454
+ font-size: 50%
455
+ .per2
456
+ font-size: 75%
457
+ .per3
458
+ font-size: 100%
459
+ .per4
460
+ font-size: 150%
461
+ .per5
462
+ font-size: 200%
463
+
464
+
465
+ .mousepoem p
466
+ line-height: 0
467
+ margin-left: 1em
468
+
469
+ .per100
470
+ font-size: 100%
471
+ line-height: $line-height*.6
472
+ .per90
473
+ font-size: 90%
474
+ line-height: $line-height*.6
475
+ .per80
476
+ font-size: 80%
477
+ line-height: $line-height*.6
478
+ .per70
479
+ font-size: 70%
480
+ line-height: $line-height*.6
481
+ .per60
482
+ font-size: 60%
483
+ line-height: $line-height*.6
484
+ .per50
485
+ font-size: 50%
486
+ line-height: $line-height*.7
487
+ .per40
488
+ font-size: 40%
489
+ line-height: $line-height*.6
490
+
491
+
492
+ .size1
493
+ font-size: x-small
494
+ .size2
495
+ font-size: small
496
+ .size3
497
+ /* default
498
+ font-size: medium
499
+ .size4
500
+ font-size: large
501
+ .size5
502
+ font-size: x-large
503
+
504
+ /* Poetic margins
505
+ .stanza
506
+ margin-top: 1em
507
+ font-family: serif
508
+ padding-left: 1em
509
+ p
510
+ padding-left: 1em
511
+
512
+ .poetry
513
+ margin: 1em
514
+
515
+ /*line number
516
+ .ln
517
+ float: left
518
+ color: #999
519
+ font-size: .8em
520
+ font-style: italic
521
+ .pos1
522
+ margin-left: 1em
523
+ text-indent: -1em
524
+ .pos2
525
+ margin-left: 2em
526
+ text-indent: -1em
527
+ .pos3
528
+ margin-left: 3em
529
+ text-indent: -1em
530
+ .pos4
531
+ margin-left: 4em
532
+ text-indent: -1em
533
+
534
+ @font-face
535
+ font-family: Inconsolata Mono
536
+ font-style: normal
537
+ font-weight: normal
538
+ src: url("Inconsolata.otf")
539
+
540
+ .normal-mono
541
+ font-family: "Courier New", Courier, monospace
542
+
543
+ tt, pre, .mono
544
+ /* Kindle Keyboard has KF8 but no font support, fallback to default mono
545
+ font-family: "Inconsolata Mono", "Courier New", Courier, monospace
546
+ font-style: normal
547
+
548
+ @font-face
549
+ font-family: mgopen modata
550
+ font-style: normal
551
+ font-weight: normal
552
+ font-size: .5em
553
+ src: url("MgOpenModataRegular.ttf")
554
+
555
+ .modata
556
+ font-family: "mgopen modata"
557
+
558
+ @font-face
559
+ font-family: hidden
560
+ font-style: normal
561
+ font-weight: normal
562
+ font-size: 1em
563
+ src: url("invisible1.ttf")
564
+
565
+ .hidden-font
566
+ font-family: "hidden"
567
+
568
+
569
+ /* Nook works to here :)
570
+ /* media queries at bottom to not confuse other platforms
571
+ @media (min-width: 200px)
572
+ .px200
573
+ color: $green
574
+
575
+ @media (min-width: 400px)
576
+ .px400
577
+ color: $green
578
+
579
+ @media (min-width: 800px)
580
+ .px800
581
+ color: $green
582
+
583
+ @media (min-width: 1200px)
584
+ .px1200
585
+ color: $green
586
+ /* broke nook!
587
+ /*/* WIP device specific...
588
+ /*@media (min-width: 600px) and (height: 800px) and (amzn-kf8)
589
+ /* /* Kindle Keyboard w/ KF8
590
+ /* .kk
591
+ /* color: $green
592
+ /*
593
+ /*/* @media (min-width: 768px) and (height: 1024px) and (amzn-kf8)
594
+ /*@media (min-width: 748px) and (min-height: 1004px) and (amzn-kf8)
595
+ /* /* Kindle Paperwhite
596
+ /* .kpw
597
+ /* color: $green
598
+ /*
599
+ /*@media (width: 600px) and (height: 1024px) and (amzn-kf8)
600
+ /* /* Kindle Fire
601
+ /* .kf
602
+ /* color: $green
603
+ /*
604
+ /*/* Retina iPad
605
+ /*@media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5)
606
+ /* .retina
607
+ /* color: $green
608
+ /*
609
+ @media amzn-kf8
610
+ span.dropcapold
611
+ font-size: 300%
612
+ font-weight: bold
613
+ height: 1em
614
+ float: left
615
+ margin: -0.2em 0.1em 0 0.1em
616
+
617
+ .dropcap
618
+ line-height: 100%
619
+ font-size: 341%
620
+ margin-right: 0.075em
621
+ margin-top: -0.22em
622
+ float: left
623
+ height: 0.8em
624
+
625
+
626
+ @media amzn-mobi
627
+ span.dropcap
628
+ font-size: 1.5em
629
+ font-weight: bold
630
+
631
+ /* tt, pre
632
+ /* font-size: 3
633
+
634
+ /* Size table
635
+ /* name becomes
636
+ /* x-small 2
637
+ /* small 3
638
+ /* medium 4
639
+ /* 1em default (nothing)
640
+
641
+ tt
642
+ /* mobi fun
643
+ /* font-size: x-small /* turns into <font size="2" */
644
+ font-family: "Courier New", Courier, monospace
645
+
646
+ pre
647
+ margin-left: 1em
648
+ margin-bottom: 1em
649
+ /* mobi fun
650
+ font-size: x-small
651
+ font-family: "Courier New", Courier, monospace
652
+ white-space: pre-wrap
653
+ display: block
654
+ .no-indent
655
+ margin-left: 0em
656
+ text-indent: 0em
657
+
658
+ div.no-indent
659
+ margin-left: 0em
660
+ text-indent: 0em
661
+
662
+ /* Sass wants to add em to the end..., hardcoded for now */
663
+
664
+ h1
665
+ font-size: 2em
666
+
667
+ h2
668
+ font-size: 1em
669
+
670
+ h3
671
+ font-size: 1 + $h1-size/1.6
672
+
673
+ h4
674
+ font-size: $h1-size/1.6
675
+
676
+ blockquote
677
+ /* something in this css causes blockquotes to get doubly indented! (BUG)
678
+ font-style: italics
679
+ margin-left: 0em
680
+ margin-right: 0em
681
+
682
+
683
+ /* descendant selectors don't work in mobi7 infact this will override the preview h1 defintion! */
684
+ /* h1 tt, h2 tt {
685
+ /* font-size: 1em;
686
+ /* color: green;}
687
+
688
+ div.note
689
+ border: 1px solid black
690
+ /*text-indent: 1em
691
+
692
+ div.note, .note-p
693
+ text-indent: 1em
694
+ margin-left: 0
695
+ margin-right: 0
696
+ font-style: italic
697
+
698
+ /* Since Kindle doesn't like multiple classes have to have combinations (fixed in 2.7)
699
+ .note-p-first
700
+ text-indent: 0
701
+ margin-left: 1em
702
+ margin-right: 1em
703
+ .note-p
704
+ text-indent: 1em
705
+ margin-left: 1em
706
+ margin-right: 1em
707
+
708
+
709
+ /* Poetry handing indent hacks
710
+ /* see http://ebookarchitects.com/blog/backwards-compatible-poetry-for-kf8mobi/
711
+ /* and http://www.pigsgourdsandwikis.com/2012/01/media-queries-for-formatting-poetry-on.html
712
+ .pos1
713
+ text-indent: -1em
714
+ .pos2
715
+ text-indent: -1em
716
+ .pos3
717
+ text-indent: -1em
718
+ .pos4
719
+ text-indent: -1em
720
+
721
+
722
+ /* does nook ignore this?
723
+ .green
724
+ color: $green
725
+ /*These break NOOK!
726
+ /*@media (monochrome)
727
+ /* .monochrome
728
+ /* color: $green
729
+ /*
730
+ /*@media (color)
731
+ /* .color
732
+ /* color: $green
733
+ /*
734
+
@@ -0,0 +1,12 @@
1
+
2
+ .font-existence-light {
3
+ font-family: 'ExistenceLight';
4
+ }
5
+
6
+ @font-face {
7
+ font-family: 'ExistenceLight';
8
+ src: url('../webfonts/existence-light.ttf') format('truetype');
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ }
12
+