softcover 1.1.4 → 1.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bb170c78891bfe1745b87f131e45926f1cda9d6
4
- data.tar.gz: 413605cac3d518143bd413c20c4115ed0ec583ee
3
+ metadata.gz: 6e7ce9f41281c15fc962d8293f9a901c1eb35884
4
+ data.tar.gz: ff5a37c76b189d32a884b57384fb41b132eba793
5
5
  SHA512:
6
- metadata.gz: 1563cc8901a77baeda85503af89f81a18c2d3e606da1563f709dbc0e190ea9b01ca554862798d82dcbf1271a4e08807704ed12ad85db16ac5bbf563166e04287
7
- data.tar.gz: b650ef1c0319d530ad217ec18007b9ba83972db42a8201040b3680627ec5bfc375be5e47f0d9fb0f9c0d8fa4bc9946733d08383ad7fd5a59220b401ae0214c3e
6
+ metadata.gz: f20bf7b1e862062896aa29477251a341c37c012a2dff95b5de36fd48cac204a795f090be0b24e4ed0a7dca9e1f11dcdeb9f8402cf3ee3b2de0377e2111102377
7
+ data.tar.gz: d5b92a4bb6f396ef5055861e605649b140f21299452b3ab84e6c92692c4ad926cbc87903b153ccd2d967580b1f19c219e60dc9a67b2b016be4eab13cf821a52b
@@ -14,6 +14,7 @@ body #book {
14
14
  font-size: 230%;
15
15
  border-top: 2px solid #333;
16
16
  padding-top: 1em;
17
+ text-align: left;
17
18
  }
18
19
 
19
20
  #book h2 {
@@ -64,7 +65,7 @@ body #book {
64
65
  }
65
66
 
66
67
  #book a.tex {
67
- text-decoration: none;
68
+ text-decoration: none !important;
68
69
  }
69
70
 
70
71
  #book code {
@@ -307,7 +308,7 @@ body #book {
307
308
  }
308
309
 
309
310
  #book ol.footnotes a.arrow {
310
- text-decoration: none;
311
+ text-decoration: none !important;
311
312
  }
312
313
 
313
314
  #book ol.footnotes.nonumbers li {
@@ -327,7 +328,7 @@ body #book {
327
328
  }
328
329
 
329
330
  #book a.arrow {
330
- text-decoration: none;
331
+ text-decoration: none !important;
331
332
  }
332
333
 
333
334
  #book a:visited.arrow {
@@ -336,12 +337,12 @@ body #book {
336
337
 
337
338
  #book a.section {
338
339
  color: #070707;
339
- text-decoration: none;
340
+ text-decoration: none !important;
340
341
  }
341
342
 
342
343
  #book a.heading {
343
344
  color: #000;
344
- text-decoration: none;
345
+ text-decoration: none !important;
345
346
  }
346
347
 
347
348
  #book a:hover.heading {
@@ -36,6 +36,13 @@ module Softcover
36
36
  # Returns a content.opf file based on a valid template.
37
37
  def content_opf_template(title, copyright, author, uuid, cover_id,
38
38
  toc_chapters, manifest_chapters, images)
39
+ if cover_id
40
+ cover_meta = %(<meta name="cover" content="#{cover_id}"/>)
41
+ cover_html = '<item id="cover" href="cover.html" media-type="application/xhtml+xml"/>'
42
+ cover_ref = '<itemref idref="cover" linear="no" />'
43
+ else
44
+ cover_meta = cover_html = cover_ref = ''
45
+ end
39
46
  %(<?xml version="1.0" encoding="UTF-8"?>
40
47
  <package unique-identifier="BookID" version="3.0" xmlns="http://www.idpf.org/2007/opf">
41
48
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"
@@ -47,7 +54,7 @@ module Softcover
47
54
  <dc:publisher>Softcover</dc:publisher>
48
55
  <dc:identifier id="BookID">urn:uuid:#{uuid}</dc:identifier>
49
56
  <meta property="dcterms:modified">#{Time.now.strftime('%Y-%m-%dT%H:%M:%S')}Z</meta>
50
- <meta name="cover" content="#{cover_id}"/>
57
+ #{cover_meta}
51
58
  </metadata>
52
59
  <manifest>
53
60
  <item href="nav.html" id="nav" media-type="application/xhtml+xml" properties="nav"/>
@@ -58,12 +65,12 @@ module Softcover
58
65
  <item id="epub.css" href="styles/epub.css" media-type="text/css"/>
59
66
  <item id="custom.css" href="styles/custom.css" media-type="text/css"/>
60
67
  <item id="custom_epub.css" href="styles/custom_epub.css" media-type="text/css"/>
61
- <item id="cover" href="cover.html" media-type="application/xhtml+xml"/>
68
+ #{cover_html}
62
69
  #{manifest_chapters.join("\n")}
63
70
  #{images.join("\n")}
64
71
  </manifest>
65
72
  <spine toc="ncx">
66
- <itemref idref="cover" linear="no" />
73
+ #{cover_ref}
67
74
  #{toc_chapters.join("\n")}
68
75
  </spine>
69
76
  </package>
@@ -500,7 +507,7 @@ module Softcover
500
507
  end
501
508
 
502
509
  def cover_id
503
- "img-#{cover_img.sub('.', '-')}"
510
+ cover? ? "img-#{cover_img.sub('.', '-')}" : nil
504
511
  end
505
512
 
506
513
  # Returns the Table of Contents for the spine.
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.1.4"
2
+ VERSION = "1.1.6"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
- gem.add_dependency 'polytexnic', '~> 1.1'
21
+ gem.add_dependency 'polytexnic', '~> 1.1.3'
22
22
  gem.add_dependency 'msgpack', '~> 0.4.2'
23
23
  gem.add_dependency 'nokogiri', '~> 1.6.0'
24
24
  gem.add_dependency 'thor', '~> 0.18.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softcover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-19 00:00:00.000000000 Z
12
+ date: 2015-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.1'
20
+ version: 1.1.3
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.1'
27
+ version: 1.1.3
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: msgpack
30
30
  requirement: !ruby/object:Gem::Requirement