lknovel 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
1
  0.0.1: Initial release.
2
2
  0.0.2: Move block all out of Chapter/Volume class, use more helper function and
3
3
  mixin to generalize code.
4
+ 0.0.3: Cover image hot fix, update list css
@@ -70,17 +70,6 @@ module Lknovel
70
70
 
71
71
  FileUtils.mkdir_p(volume.path)
72
72
  Dir.chdir(volume.path) do
73
- # generate html
74
- FileUtils.mkdir_p(HTML_DIR)
75
- Dir.chdir(HTML_DIR) do
76
- volume.render(File.join(TEMPLATE_PATH, 'front.html.erb'), 'front.html')
77
- erb = File.read(File.join(TEMPLATE_PATH, 'chapter.html.erb'))
78
- template = ERB.new(erb, nil, '-')
79
- volume.chapters.each_with_index do |chapter, index|
80
- chapter.render(template, HTML_FILE_FORMAT % index)
81
- end
82
- end
83
-
84
73
  # download images
85
74
  FileUtils.mkdir_p(IMAGE_DIR)
86
75
  Dir.chdir(IMAGE_DIR) do
@@ -105,6 +94,17 @@ module Lknovel
105
94
  volume.cover_image = cropped ? 'cover.jpg' : cover_image.file
106
95
  end
107
96
  end
97
+
98
+ # generate html
99
+ FileUtils.mkdir_p(HTML_DIR)
100
+ Dir.chdir(HTML_DIR) do
101
+ volume.render(File.join(TEMPLATE_PATH, 'front.html.erb'), 'front.html')
102
+ erb = File.read(File.join(TEMPLATE_PATH, 'chapter.html.erb'))
103
+ template = ERB.new(erb, nil, '-')
104
+ volume.chapters.each_with_index do |chapter, index|
105
+ chapter.render(template, HTML_FILE_FORMAT % index)
106
+ end
107
+ end
108
108
  end
109
109
 
110
110
  builder = GEPUB::Builder.new {
@@ -15,6 +15,10 @@ img {
15
15
  margin-right: auto;
16
16
  }
17
17
 
18
+ ul li {
19
+ padding-top: 15px;
20
+ }
21
+
18
22
  .page-break {
19
23
  page-break-after: always;
20
24
  }
@@ -1,5 +1,5 @@
1
1
  module Lknovel
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
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')
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.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: