View Single Post
Old 10-14-2015, 06:17 PM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,363
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by MartyTX View Post
Turtle91, JSWolf,

Thanks for the svg suggestion. By changing to: viewBox="0 0 450 600" covers fit on one screen in their original aspect ratio.

"Give an inch and I'll ask for a mile ..."

Is there a way to set a default size for the viewbox so I don't have to change to "0 0 450 600" in each ePub? Possibly set a default in a style.css setting?

This novice is definitely venturing into water above his head ...
You can save a template file in Sigil's directory called "cover.html" and it will use that when you press tools/add cover. (Try looking in this directory for windows: ...AppData\Local\sigil-ebook\sigil) You can design the template any way you wish, including the variables SGC_IMAGE_FILENAME, SGC_IMAGE_WIDTH and SGC_IMAGE_HEIGHT, but I use the following:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Cover</title>
</head>

<body style="margin:0; padding:0; text-align:center; background-color:black">
  <h1 style="display:none" title="Cover"/>

  <div style="margin:0; padding:0; text-align:center">
    <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">
      <image height="SGC_IMAGE_HEIGHT" width="SGC_IMAGE_WIDTH" xlink:href="SGC_IMAGE_FILENAME"/>
    </svg>
  </div>
</body>
</html>
Cheers!
Turtle91 is offline   Reply With Quote