Hi,
I have a snippet for SVG covers:
Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="${1:pt-BR}" xml:lang="${2:pt-BR}">
<head>
<title>${3:Capa}</title>
<style type="text/css" title="override_css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>
<body>
<div>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100%" height="100%" viewBox="0 0 ${4:903} ${5:1354}"
preserveAspectRatio="xMidYMid meet">
<image width="${6:903}" height="${7:1354}" xlink:href="${8*:../Images/cover.jpg}"/>
</svg>
</div>
</body>
</html>$9
I use it to transform simple <img> tags into a SVG cover.
To start, I select the image path (e.g.: '../Images/cover.jpg') and press Ctrl+J. The snippet get this path and creates the SVG cover. All good, except for the image height and width, that I have to edit manually.
My question: is it possible to get these attributes as parameters for the snippet? The manual doesn't mention it, but maybe it might be possible.
P.S.: I know I can use the "Add cover" option. But it is very specific for covers, and the lang attribute is always "en". I also use this for other full page images as well.