mirror of
https://github.com/alexadam/save-as-ebook.git
synced 2025-09-10 01:15:09 +00:00
styles - wip
This commit is contained in:
parent
9f3d349ffe
commit
7dd34efee5
10 changed files with 1119 additions and 38 deletions
|
@ -98,7 +98,11 @@ function _buildEbook(allPages) {
|
|||
'</ncx>'
|
||||
);
|
||||
|
||||
oebps.file(cssFileName, '');
|
||||
oebps.file(cssFileName, ''); //TODO
|
||||
var styleFolder = oebps.folder('style');
|
||||
allPages.forEach(function(page) {
|
||||
styleFolder.file(page.styleFileName, page.styleFileContent);
|
||||
});
|
||||
|
||||
var pagesFolder = oebps.folder('pages');
|
||||
allPages.forEach(function(page) {
|
||||
|
@ -107,7 +111,7 @@ function _buildEbook(allPages) {
|
|||
'<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">' +
|
||||
'<head>' +
|
||||
'<title>' + page.title + '</title>' +
|
||||
'<link href="../' + cssFileName + '" rel="stylesheet" type="text/css" />' +
|
||||
'<link href="../style/' + page.styleFileName + '" rel="stylesheet" type="text/css" />' +
|
||||
'</head><body>' +
|
||||
page.content +
|
||||
'</body></html>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue