bookshop 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/lib/bookshop/commands/build.rb +12 -8
  2. data/lib/bookshop/generators/bookshop/app/app_generator.rb +16 -20
  3. data/lib/bookshop/generators/bookshop/app/templates/book/assets/css/stylesheet.epub.css +2 -203
  4. data/lib/bookshop/generators/bookshop/app/templates/book/assets/css/stylesheet.mobi.css +14 -169
  5. data/lib/bookshop/generators/bookshop/app/templates/book/bodymatter/ch01/adding_images.html.erb +1 -1
  6. data/lib/bookshop/generators/bookshop/app/templates/book/bodymatter/ch01/ch01.html.erb +1 -1
  7. data/lib/bookshop/generators/bookshop/app/templates/book/book.html.erb +6 -6
  8. data/lib/bookshop/generators/bookshop/app/templates/book/epub/OEBPS/content.opf.erb +17 -13
  9. data/lib/bookshop/generators/bookshop/app/templates/book/frontmatter/preface.html.erb +1 -1
  10. data/lib/bookshop/generators/bookshop/app/templates/book/frontmatter/toc.html.erb +5 -1
  11. data/lib/bookshop/generators/bookshop/app/templates/config/book.yml +2 -2
  12. data/lib/bookshop/generators/bookshop/app/templates/script/zip/Contents +36 -0
  13. data/lib/bookshop/generators/bookshop/app/templates/script/zip/LICENSE +60 -0
  14. data/lib/bookshop/generators/bookshop/app/templates/script/zip/README +234 -0
  15. data/lib/bookshop/generators/bookshop/app/templates/script/zip/README.CR +119 -0
  16. data/lib/bookshop/generators/bookshop/app/templates/script/zip/WHATSNEW +333 -0
  17. data/lib/bookshop/generators/bookshop/app/templates/script/zip/WHERE +266 -0
  18. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zip.exe +0 -0
  19. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zip.txt +2027 -0
  20. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zip30.ann +95 -0
  21. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zipcloak.exe +0 -0
  22. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zipcloak.txt +75 -0
  23. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zipnote.exe +0 -0
  24. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zipnote.txt +63 -0
  25. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zipsplit.exe +0 -0
  26. data/lib/bookshop/generators/bookshop/app/templates/script/zip/zipsplit.txt +53 -0
  27. data/lib/bookshop/version.rb +1 -1
  28. metadata +31 -16
@@ -21,7 +21,7 @@ module Bookshop
21
21
 
22
22
  def self.clean_builds(build_type)
23
23
  puts "Deleting any old builds"
24
- FileUtils.rm_r Dir.glob('builds/#{build_type}/*')
24
+ FileUtils.rm_r Dir.glob("builds/#{build_type}/*"), :verbose => true
25
25
  end
26
26
 
27
27
  def self.generate_file(src, dest)
@@ -75,7 +75,11 @@ module Bookshop
75
75
  builds/epub/OEBPS/assets/css/stylesheet.mobi.css )
76
76
 
77
77
  puts "Zipping up into epub"
78
- cmd = %x[cd builds/epub/ && zip -X0 "book.epub" mimetype && zip -rDX9 "book.epub" * -x "*.DS_Store" -x mimetype]
78
+ if RUBY_PLATFORM =~ /linux|darwin|cygwin/
79
+ cmd = system("cd builds/epub/ && zip -X0 'book.epub' mimetype && zip -rDX9 'book.epub' * -x '*.DS_Store' -x mimetype")
80
+ elsif RUBY_PLATFORM =~ /mingw|mswin32/
81
+ cmd = system("cd builds/epub/ & ..\..\script\zip\zip.exe -X0 'book.epub' mimetype & ..\..\script\zip\zip.exe -rDX9 'book.epub' * -x mimetype")
82
+ end
79
83
 
80
84
  puts "Validating with epubcheck"
81
85
  cmd = cmd = system("java -jar script/epubcheck/epubcheck.jar builds/epub/book.epub")
@@ -92,10 +96,6 @@ module Bookshop
92
96
 
93
97
  puts "Generating new html from erb"
94
98
  generate_file(BOOK_SOURCE, "builds/mobi/OEBPS/book.html")
95
-
96
- # Generate the cover.html file
97
- puts "Generating new cover.html from erb"
98
- generate_file("frontmatter/cover.html.erb","builds/mobi/OEBPS/cover.html")
99
99
 
100
100
  # Generate the nav.html file
101
101
  puts "Generating new toc.html from erb"
@@ -114,8 +114,12 @@ module Bookshop
114
114
  builds/mobi/OEBPS/assets/css/stylesheet.html.css
115
115
  builds/mobi/OEBPS/assets/css/stylesheet.epub.css )
116
116
 
117
- puts "Zipping up into epub"
118
- cmd = %x[cd builds/mobi/ && zip -X0 "book.epub" mimetype && zip -rDX9 "book.epub" * -x "*.DS_Store" -x mimetype]
117
+ puts "Zipping up into epub"
118
+ if RUBY_PLATFORM =~ /linux|darwin|cygwin/
119
+ cmd = system("cd builds/mobi/ && zip -X0 'book.epub' mimetype && zip -rDX9 'book.epub' * -x '*.DS_Store' -x mimetype")
120
+ elsif RUBY_PLATFORM =~ /mingw|mswin32/
121
+ cmd = system("cd builds/mobi/ & ..\..\script\zip\zip.exe -X0 'book.epub' mimetype & ..\..\script\zip\zip.exe -rDX9 'book.epub' * -x mimetype")
122
+ end
119
123
 
120
124
  puts "Validating with epubcheck"
121
125
 
@@ -17,27 +17,23 @@ module Bookshop
17
17
  end
18
18
 
19
19
 
20
- # Create the project from templates
21
- def create_base_project
22
- raise GeneratorArgumentsError if app_path.nil?
23
- puts "creating base project"
24
- directory "templates", "#{app_path}"
25
- end
26
-
27
- # Adds third-party tools
28
- # def add_tools
29
- # directory "tools/", "#{app_path}/tools/"
30
- # end
20
+ # Create the project from templates
21
+ def create_base_project
22
+ raise GeneratorArgumentsError if app_path.nil?
23
+ puts "creating base project"
24
+ directory "templates", "#{app_path}"
25
+ end
31
26
 
32
- #Change the permissions so tools are executable
33
- def chmod_tools
34
- chmod "#{app_path}/script/epubcheck/epubcheck.jar", 0755
35
- chmod "#{app_path}/script/epubcheck/lib/jing.jar", 0755
36
- chmod "#{app_path}/script/epubcheck/lib/saxon.jar", 0755
37
- chmod "#{app_path}/script/kindlegen/kindlegen.exe", 0755
38
- chmod "#{app_path}/script/kindlegen/kindlegen_mac", 0755
39
- chmod "#{app_path}/script/kindlegen/kindlegen_linux", 0755
40
- end
27
+ #Change the permissions so tools are executable
28
+ def chmod_tools
29
+ chmod "#{app_path}/script/epubcheck/epubcheck.jar", 0755
30
+ chmod "#{app_path}/script/epubcheck/lib/jing.jar", 0755
31
+ chmod "#{app_path}/script/epubcheck/lib/saxon.jar", 0755
32
+ chmod "#{app_path}/script/kindlegen/kindlegen.exe", 0755
33
+ chmod "#{app_path}/script/kindlegen/kindlegen_mac", 0755
34
+ chmod "#{app_path}/script/kindlegen/kindlegen_linux", 0755
35
+ chmod "#{app_path}/script/zip/zip.exe", 0755
36
+ end
41
37
 
42
38
 
43
39
 
@@ -2,10 +2,10 @@
2
2
  /* written by Hakon Wium Lie and Bert Bos, November 2005 */
3
3
  /* You may reuse this style sheet for any purpose without any fees */
4
4
 
5
-
6
5
  html {
7
6
  margin: 0;
8
- font: 10pt/1.26 "Gill Sans", sans-serif;
7
+ font-family: "Gill Sans", sans-serif;
8
+ font-size: 10pt;
9
9
  }
10
10
 
11
11
  body {
@@ -88,8 +88,6 @@ div.sidebar {
88
88
  background: #CCC;
89
89
  padding: 0.5em 1em;
90
90
  page-break-inside: avoid;
91
- column-count: 2;
92
- column-gap: 1.5em;
93
91
  }
94
92
 
95
93
  div.sidebar h2 {
@@ -100,7 +98,6 @@ div.sidebar h2 {
100
98
 
101
99
  div.figure {
102
100
  margin: 1em 0;
103
- counter-increment: figure;
104
101
  }
105
102
 
106
103
  div.figure .caption, div.table .caption {
@@ -112,19 +109,8 @@ div.figure .caption, div.table .caption {
112
109
  margin: 0 0 1.2em -40%;
113
110
  }
114
111
 
115
- div.figure .caption::before {
116
- content: "Figure " counter(figure) ": ";
117
- font-weight: bold;
118
- }
119
-
120
- div.table .caption::before {
121
- content: "Table " counter(table) ": ";
122
- font-weight: bold;
123
- }
124
-
125
112
  div.table {
126
113
  margin: 1em 0;
127
- counter-increment: table;
128
114
  }
129
115
 
130
116
  div.table th {
@@ -143,110 +129,11 @@ table.lined td, table.lined th {
143
129
  padding-bottom: 0.2em;
144
130
  }
145
131
 
146
-
147
- @page {
148
- margin: 27mm 16mm 27mm 16mm;
149
- size: 7in 9.25in;
150
-
151
- @footnotes {
152
- border-top: thin solid black;
153
- padding-top: 0.3em;
154
- margin-top: 0.6em;
155
- margin-left: 30%;
156
- }
157
- }
158
-
159
-
160
- /* define default page and names pages: cover, blank, frontmatter */
161
-
162
- @page :left {
163
- @top-left {
164
- font: 11pt "Gill Sans", serif;
165
- content: "Cascading Style Sheets";
166
- vertical-align: bottom;
167
- padding-bottom: 2em;
168
- }
169
-
170
- @bottom-left {
171
- font: 11pt "Gill Sans", serif;
172
- content: counter(page);
173
- padding-top: 2em;
174
- vertical-align: top;
175
- }
176
- }
177
-
178
- @page :right {
179
- @top-right {
180
- font: 11pt "Gill Sans", serif;
181
- content: string(header, first);
182
- vertical-align: bottom;
183
- padding-bottom: 2em;
184
- }
185
-
186
- @bottom-right {
187
- font: 11pt "Gill Sans", serif;
188
- content: counter(page);
189
- text-align: right;
190
- vertical-align: top;
191
- padding-top: 2em;
192
- }
193
- }
194
-
195
- @page frontmatter :left {
196
- @top-left {
197
- font: 11pt "Gill Sans", serif;
198
- content: string(title);
199
- vertical-align: bottom;
200
- padding-bottom: 2em;
201
- }
202
-
203
- @bottom-left {
204
- font: 11pt "Gill Sans", serif;
205
- content: counter(page, lower-roman);
206
- padding-top: 2em;
207
- vertical-align: top;
208
- }
209
- }
210
-
211
- @page cover { margin: 0; }
212
-
213
- @page frontmatter :right {
214
- @top-right {
215
- font: 11pt "Gill Sans", serif;
216
- content: string(header, first);
217
- vertical-align: bottom;
218
- padding-bottom: 2em;
219
- }
220
-
221
- @bottom-right {
222
- font: 11pt "Gill Sans", serif;
223
- content: counter(page, lower-roman);
224
- text-align: right;
225
- vertical-align: top;
226
- padding-top: 2em;
227
- }
228
- }
229
-
230
- @page blank :left {
231
- @top-left { content: normal }
232
- @bottom-left { content: normal }
233
- }
234
-
235
- @page blank :right {
236
- @top-right { content: normal }
237
- @bottom-right { content: normal }
238
- }
239
-
240
132
  /* footnotes */
241
133
 
242
134
  .footnote {
243
135
  display: none; /* default rule */
244
136
 
245
- display: prince-footnote; /* prince-specific rules */
246
- position: footnote;
247
- footnote-style-position: inside;
248
-
249
- counter-increment: footnote;
250
137
  margin-left: 1.4em;
251
138
  font-size: 90%;
252
139
  line-height: 1.4;
@@ -289,11 +176,6 @@ table.lined td, table.lined th {
289
176
  will use all of them.
290
177
  */
291
178
 
292
- /* which section uses which named page */
293
-
294
- div.halftitlepage, div.titlepage, div.imprint, div.dedication { page: blank }
295
- div.foreword, div.toc, div.preface { page: frontmatter }
296
-
297
179
 
298
180
  /* page breaks */
299
181
 
@@ -305,53 +187,6 @@ div.appendix, div.bibliography, div.glossary, div.index, div.colophon {
305
187
  }
306
188
  div.backcover { page-break-before: left }
307
189
 
308
- /* the front cover; this code is probably not very reusable by other books */
309
-
310
- div.frontcover { page: cover; }
311
-
312
- div.frontcover img {
313
- position: absolute;
314
- width: 7in; height: 9.25in;
315
- left: 0; top: 0;
316
- z-index: -1;
317
- }
318
-
319
- div.frontcover h1 {
320
- position: absolute;
321
- left: 2cm; top: 1cm;
322
- color: white;
323
- font-size: 44pt;
324
- font-weight: normal;
325
- }
326
-
327
- div.frontcover h2 {
328
- position: absolute;
329
- right: 0; top: 5cm;
330
- color: black;
331
- background: white;
332
- font-size: 16pt;
333
- font-weight: normal;
334
- padding: 0.2em 5em 0.2em 1em;
335
- letter-spacing: 0.15em;
336
- }
337
-
338
- div.frontcover h3 {
339
- position: absolute;
340
- left: 2cm; top: 7cm;
341
- color: white;
342
- font-size: 24pt;
343
- font-weight: normal;
344
- }
345
-
346
- div.frontcover p {
347
- position: absolute;
348
- left: 2cm; bottom: 1.5cm;
349
- font-size: 24pt;
350
- color: black;
351
- font-weight: bold;
352
- text-transform: uppercase;
353
- }
354
-
355
190
 
356
191
  /* titlepage, halftitlepage */
357
192
 
@@ -387,26 +222,6 @@ ol.toc > li {
387
222
  font-weight: bold;
388
223
  margin-bottom: 0.5em;
389
224
  }
390
- ol.toc a::after {
391
- content: leader('.') target-counter(attr(href), page);
392
- font-style: normal;
393
- }
394
- ol.toc > li.frontmatter a::after {
395
- content: leader('.') target-counter(attr(href), page, lower-roman);
396
- font-style: normal;
397
- }
398
- ol.toc > li.backmatter a::after {
399
- content: leader('.') target-counter(attr(href), page);
400
- font-style: normal;
401
- }
402
- ol.toc > li.chapter::before {
403
- content: "Chapter " counter(toc-chapter, decimal);
404
- display: block;
405
- margin: 1em 0 0.1em -2.5cm;
406
- font-weight: normal;
407
- counter-increment: toc-chapter;
408
- page-break-after: avoid;
409
- }
410
225
 
411
226
  /* chapter numbers */
412
227
 
@@ -414,7 +229,6 @@ div.chapter { counter-increment: chapter; }
414
229
 
415
230
  h1::before {
416
231
  white-space: pre;
417
- margin-left: -2.5cm;
418
232
  font-size: 50%;
419
233
  content: "\B0 \B0 \B0 \B0 \B0 \A"; /* ornaments */
420
234
  }
@@ -425,20 +239,13 @@ div.frontcover h1::before, div.titlepage h1::before, div.halftitlepage h1::befor
425
239
  content: normal; /* that is, none */
426
240
  }
427
241
 
428
- h1 { string-set: header content();}
429
- div.chapter h1 { string-set: header "Chapter " counter(chapter) ": " content(); }
430
-
431
242
  /* index */
432
243
 
433
244
  ol.index {
434
245
  list-style-type: none;
435
246
  margin: 0; padding: 0;
436
- column-count: 2;
437
- column-gap: 1em;
438
247
  }
439
248
 
440
- ul.index a::after { content: ", " target-counter(attr(href), page); }
441
-
442
249
 
443
250
  span.element, span.attribute {
444
251
  text-transform: uppercase;
@@ -448,12 +255,4 @@ span.element, span.attribute {
448
255
  span.property { font-weight: bold }
449
256
  code, span.css, span.value, span.declaration {
450
257
  font: 90% "Lucida Console", "Lucida Sans Typewriter", monospace;
451
- }
452
-
453
-
454
- @media screen, handheld {
455
- html { margin: 1em; font: 14px "Gill Sans", sans-serif; }
456
- h1 { margin-bottom: 0.5em }
457
- div.frontcover, div.halftitlepage,
458
- div.dedication, div.foreword, div.toc, div.index { display: none }
459
258
  }
@@ -2,10 +2,20 @@
2
2
  /* written by Hakon Wium Lie and Bert Bos, November 2005 */
3
3
  /* You may reuse this style sheet for any purpose without any fees */
4
4
 
5
+ /* Font Sets */
6
+
7
+ @font-face {
8
+ font-family: GillSans;
9
+ font-weight: normal;
10
+ font-style: normal;
11
+ src: url(../fonts/GillSans.ttc);
12
+ }
13
+
14
+ /* Main Styles */
5
15
 
6
16
  html {
7
17
  margin: 0;
8
- font: 10pt/1.26 "Gill Sans", sans-serif;
18
+ font-size: 10pt/1.26;
9
19
  }
10
20
 
11
21
  body {
@@ -13,7 +23,6 @@ body {
13
23
  }
14
24
 
15
25
  h1, h2, h3, h4, h5, h6 {
16
- font-family: "Gill Sans", sans-serif;
17
26
  margin: 2em 0 0.5em 0;
18
27
  page-break-after: avoid;
19
28
  }
@@ -88,8 +97,6 @@ div.sidebar {
88
97
  background: #CCC;
89
98
  padding: 0.5em 1em;
90
99
  page-break-inside: avoid;
91
- column-count: 2;
92
- column-gap: 1.5em;
93
100
  }
94
101
 
95
102
  div.sidebar h2 {
@@ -100,7 +107,6 @@ div.sidebar h2 {
100
107
 
101
108
  div.figure {
102
109
  margin: 1em 0;
103
- counter-increment: figure;
104
110
  }
105
111
 
106
112
  div.figure .caption, div.table .caption {
@@ -124,7 +130,6 @@ div.table .caption::before {
124
130
 
125
131
  div.table {
126
132
  margin: 1em 0;
127
- counter-increment: table;
128
133
  }
129
134
 
130
135
  div.table th {
@@ -143,110 +148,14 @@ table.lined td, table.lined th {
143
148
  padding-bottom: 0.2em;
144
149
  }
145
150
 
146
-
147
- @page {
148
- margin: 27mm 16mm 27mm 16mm;
149
- size: 7in 9.25in;
150
-
151
- @footnotes {
152
- border-top: thin solid black;
153
- padding-top: 0.3em;
154
- margin-top: 0.6em;
155
- margin-left: 30%;
156
- }
157
- }
158
-
159
-
160
- /* define default page and names pages: cover, blank, frontmatter */
161
-
162
- @page :left {
163
- @top-left {
164
- font: 11pt "Gill Sans", serif;
165
- content: "Cascading Style Sheets";
166
- vertical-align: bottom;
167
- padding-bottom: 2em;
168
- }
169
-
170
- @bottom-left {
171
- font: 11pt "Gill Sans", serif;
172
- content: counter(page);
173
- padding-top: 2em;
174
- vertical-align: top;
175
- }
176
- }
177
-
178
- @page :right {
179
- @top-right {
180
- font: 11pt "Gill Sans", serif;
181
- content: string(header, first);
182
- vertical-align: bottom;
183
- padding-bottom: 2em;
184
- }
185
-
186
- @bottom-right {
187
- font: 11pt "Gill Sans", serif;
188
- content: counter(page);
189
- text-align: right;
190
- vertical-align: top;
191
- padding-top: 2em;
192
- }
193
- }
194
-
195
- @page frontmatter :left {
196
- @top-left {
197
- font: 11pt "Gill Sans", serif;
198
- content: string(title);
199
- vertical-align: bottom;
200
- padding-bottom: 2em;
201
- }
202
-
203
- @bottom-left {
204
- font: 11pt "Gill Sans", serif;
205
- content: counter(page, lower-roman);
206
- padding-top: 2em;
207
- vertical-align: top;
208
- }
209
- }
210
-
211
- @page cover { margin: 0; }
212
-
213
- @page frontmatter :right {
214
- @top-right {
215
- font: 11pt "Gill Sans", serif;
216
- content: string(header, first);
217
- vertical-align: bottom;
218
- padding-bottom: 2em;
219
- }
220
-
221
- @bottom-right {
222
- font: 11pt "Gill Sans", serif;
223
- content: counter(page, lower-roman);
224
- text-align: right;
225
- vertical-align: top;
226
- padding-top: 2em;
227
- }
228
- }
229
-
230
- @page blank :left {
231
- @top-left { content: normal }
232
- @bottom-left { content: normal }
233
- }
234
-
235
- @page blank :right {
236
- @top-right { content: normal }
237
- @bottom-right { content: normal }
238
- }
239
-
240
151
  /* footnotes */
241
152
 
242
153
  .footnote {
243
154
  display: none; /* default rule */
244
155
 
245
- display: prince-footnote; /* prince-specific rules */
246
156
  position: footnote;
247
157
  footnote-style-position: inside;
248
158
 
249
- counter-increment: footnote;
250
159
  margin-left: 1.4em;
251
160
  font-size: 90%;
252
161
  line-height: 1.4;
@@ -305,53 +214,6 @@ div.appendix, div.bibliography, div.glossary, div.index, div.colophon {
305
214
  }
306
215
  div.backcover { page-break-before: left }
307
216
 
308
- /* the front cover; this code is probably not very reusable by other books */
309
-
310
- div.frontcover { page: cover; }
311
-
312
- div.frontcover img {
313
- position: absolute;
314
- width: 7in; height: 9.25in;
315
- left: 0; top: 0;
316
- z-index: -1;
317
- }
318
-
319
- div.frontcover h1 {
320
- position: absolute;
321
- left: 2cm; top: 1cm;
322
- color: white;
323
- font-size: 44pt;
324
- font-weight: normal;
325
- }
326
-
327
- div.frontcover h2 {
328
- position: absolute;
329
- right: 0; top: 5cm;
330
- color: black;
331
- background: white;
332
- font-size: 16pt;
333
- font-weight: normal;
334
- padding: 0.2em 5em 0.2em 1em;
335
- letter-spacing: 0.15em;
336
- }
337
-
338
- div.frontcover h3 {
339
- position: absolute;
340
- left: 2cm; top: 7cm;
341
- color: white;
342
- font-size: 24pt;
343
- font-weight: normal;
344
- }
345
-
346
- div.frontcover p {
347
- position: absolute;
348
- left: 2cm; bottom: 1.5cm;
349
- font-size: 24pt;
350
- color: black;
351
- font-weight: bold;
352
- text-transform: uppercase;
353
- }
354
-
355
217
 
356
218
  /* titlepage, halftitlepage */
357
219
 
@@ -373,7 +235,7 @@ div.imprint img {
373
235
  width: 200px; height: 157px;
374
236
  }
375
237
 
376
- /* TOC */
238
+ /* TOC
377
239
 
378
240
  ol.toc, ol.toc ol {
379
241
  list-style-type: none;
@@ -407,11 +269,10 @@ ol.toc > li.chapter::before {
407
269
  counter-increment: toc-chapter;
408
270
  page-break-after: avoid;
409
271
  }
272
+ */
410
273
 
411
274
  /* chapter numbers */
412
275
 
413
- div.chapter { counter-increment: chapter; }
414
-
415
276
  h1::before {
416
277
  white-space: pre;
417
278
  margin-left: -2.5cm;
@@ -419,22 +280,14 @@ h1::before {
419
280
  content: "\B0 \B0 \B0 \B0 \B0 \A"; /* ornaments */
420
281
  }
421
282
 
422
- div.chapter h1::before { content: "Chapter " counter(chapter) " \A"; }
423
-
424
- div.frontcover h1::before, div.titlepage h1::before, div.halftitlepage h1::before {
425
- content: normal; /* that is, none */
426
- }
427
-
428
283
  h1 { string-set: header content();}
429
- div.chapter h1 { string-set: header "Chapter " counter(chapter) ": " content(); }
430
284
 
431
285
  /* index */
432
286
 
433
287
  ol.index {
434
288
  list-style-type: none;
435
289
  margin: 0; padding: 0;
436
- column-count: 2;
437
- column-gap: 1em;
290
+
438
291
  }
439
292
 
440
293
  ul.index a::after { content: ", " target-counter(attr(href), page); }
@@ -448,12 +301,4 @@ span.element, span.attribute {
448
301
  span.property { font-weight: bold }
449
302
  code, span.css, span.value, span.declaration {
450
303
  font: 90% "Lucida Console", "Lucida Sans Typewriter", monospace;
451
- }
452
-
453
-
454
- @media screen, handheld {
455
- html { margin: 1em; font: 14px "Gill Sans", sans-serif; }
456
- h1 { margin-bottom: 0.5em }
457
- div.frontcover, div.halftitlepage,
458
- div.dedication, div.foreword, div.toc, div.index { display: none }
459
304
  }