View Single Post
Old 01-11-2017, 07:01 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,617
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Turtle91 View Post
Let me throw in my .02...

You an cheat Sigil into putting any kind of code in when you Add a cover. Simply save whatever code you want as a file named "cover.xhtml" into Sigil's default folder. When you add a cover it will use that template if it is available; if not, it uses it's default SVG wrapper.

Here's the template I use:

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>
SGC_IMAGE_HEIGHT
SGC_IMAGE_WIDTH
SGC_IMAGE_FILENAME

Are variables that autofill with the properties of the image you select.

It should work just fine with any kind of HTML code as well as it does with SVG...

Cheers,
Leave it to a user to have to remind me about that feature.
DiapDealer is offline   Reply With Quote