lknovel 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -4,3 +4,4 @@
4
4
  0.0.3: Cover image hot fix, update list css
5
5
  0.0.4: Remove unnecessary require, check if cover image exist in template and
6
6
  crop
7
+ 0.0.5: Fix lots of errors detected by epubcheck
@@ -119,10 +119,12 @@ module Lknovel
119
119
  contributor volume.illustrator, 'ill'
120
120
 
121
121
  resources(:workdir => volume.path) {
122
- cover_image File.join(IMAGE_DIR, volume.cover_image)
122
+ cover_image = File.join(IMAGE_DIR, volume.cover_image)
123
+ cover_image cover_image
123
124
  file \
124
125
  "#{STYLESHEET_DIR}/default.css" => "#{STYLESHEET_PATH}/default.css"
125
- glob "#{IMAGE_DIR}/*"
126
+ images = Dir.glob("#{IMAGE_DIR}/*").select {|x| x != cover_image}
127
+ files *images
126
128
  ordered {
127
129
  nav "#{HTML_DIR}/front.html"
128
130
  volume.chapters.each_with_index do |chapter, index|
@@ -15,7 +15,7 @@ img {
15
15
  margin-right: auto;
16
16
  }
17
17
 
18
- ul li {
18
+ ol li {
19
19
  padding-top: 15px;
20
20
  }
21
21
 
@@ -1,5 +1,5 @@
1
1
  module Lknovel
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  MODULE_PATH = File.expand_path('..', __FILE__)
4
4
  TEMPLATE_PATH = File.join(MODULE_PATH, 'templates')
5
5
  STYLESHEET_PATH = File.join(MODULE_PATH, 'assets', 'stylesheets')
@@ -1,8 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <!DOCTYPE html>
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
4
4
  <head>
5
- <meta http-equiv="content-type" content="text/html;charset=UTF-8">
6
5
  <link href="<%= "../#{Lknovel::STYLESHEET_DIR}/default.css" %>" rel="stylesheet" type="text/css"/>
7
6
  <title><%= @title %></title>
8
7
  </head>
@@ -10,7 +9,7 @@
10
9
  <h1><%= @title %></h1>
11
10
  <% @content.each do |item| -%>
12
11
  <% if item.is_a?(Lknovel::Image) -%>
13
- <img src="<%= "../#{Lknovel::IMAGE_DIR}/#{item.file}" %>">
12
+ <img src="<%= "../#{Lknovel::IMAGE_DIR}/#{item.file}" %>"/>
14
13
  <% else -%>
15
14
  <p><%= item %></p>
16
15
  <% end -%>
@@ -1,21 +1,20 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
3
3
  <head>
4
- <meta http-equiv="content-type" content="text/html;charset=UTF-8">
5
4
  <link href="<%= "../#{Lknovel::STYLESHEET_DIR}/default.css" %>" rel="stylesheet" type="text/css"/>
6
5
  </head>
7
6
  <body>
8
7
  <% if @cover_image -%>
9
- <img class="page-break" src="<%= "../#{Lknovel::IMAGE_DIR}/#{@cover_image}" %>">
8
+ <img class="page-break" src="<%= "../#{Lknovel::IMAGE_DIR}/#{@cover_image}" %>"/>
10
9
  <% end -%>
11
10
  <h1>简介</h1>
12
11
  <p><%= @intro %></p>
13
12
  <nav epub:type="toc" id="toc">
14
- <ul class="nav">
13
+ <ol class="nav">
15
14
  <% @chapters.each_with_index do |chapter, index| -%>
16
15
  <li><a href="<%= Lknovel::HTML_FILE_FORMAT % index %>"><%= chapter.title %></a></li>
17
16
  <% end -%>
18
- </ul>
17
+ </ol>
19
18
  </nav>
20
19
  </body>
21
20
  </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lknovel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: