Support for cover template files:
cover-template2.xhtml
cover-template3.xhtml
have now been pushed to Sigil master. It will appear in the next release.
These template files use the same PLACEHOLDERS as previous versions:
Code:
text.replace("SGC_IMAGE_FILENAME", image_relative_path);
text.replace("SGC_IMAGE_WIDTH", width);
text.replace("SGC_IMAGE_HEIGHT", height);
and empty covers (no template found) default under epub3 to:
Code:
const QString HTML5_COVER_SOURCE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n"
"<!DOCTYPE html>\n\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\">\n"
"<head>\n"
" <title>Cover</title>\n"
"</head>\n"
""
"<body>\n"
" <div style=\"text-align: center; padding: 0pt; margin: 0pt;\">\n"
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"100%\" preserveAspectRatio=\"xMidYMid meet\" version=\"1.1\" viewBox=\"0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT\" width=\"100%\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n"
" <image width=\"SGC_IMAGE_WIDTH\" height=\"SGC_IMAGE_HEIGHT\" xlink:href=\"SGC_IMAGE_FILENAME\"/>\n"
" </svg>\n"
" </div>\n"
"</body>\n"
"</html>\n";
And similar for epub2.
Hope this helps,
KevinH
Quote:
Originally Posted by RbnJrg
|