lib/review/epubmaker/epubv3.rb in review-5.6.0 vs lib/review/epubmaker/epubv3.rb in review-5.7.0

- old
+ new

@@ -1,8 +1,8 @@ # = epubv3.rb -- EPUB version 3 producer. # -# Copyright (c) 2010-2022 Kenshi Muto +# Copyright (c) 2010-2023 Kenshi Muto # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". @@ -209,9 +209,17 @@ @title = h(ReVIEW::I18n.t('toctitle')) @language = config['language'] @stylesheets = config['stylesheet'] ReVIEW::Template.generate(path: template_name, binding: binding) + end + + def coveritem + if config['cover'] + [Content.new(file: config['cover'], title: ReVIEW::I18n.t('covertitle'), level: 1, chaptype: 'cover')] + else + [] + end end # Produce EPUB file +epubfile+. # +work_dir+ points the directory has contents. # +tmpdir+ defines temporary directory.