package template

templ CoverXHTML(coverPath string) {
	@templ.Raw(`
<?xml version='1.0' encoding='utf-8'?>`)
	<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="zh-CN">
		<head>
			<title>Cover</title>
		</head>
		<style type="text/css">
		@page {
			padding: 0pt;
			margin: 0pt
		}
		body {
			text-align: center;
			padding: 0pt;
			margin: 0pt;
		}
		</style>
		<body>
			<div>
				<svg
					xmlns="http://www.w3.org/2000/svg"
					xmlns:xlink="http://www.w3.org/1999/xlink"
					version="1.1"
					width="100%"
					height="100%"
					viewBox="0 0 400 581"
					preserveAspectRatio="none"
				>
					<image width="400" height="581" xlink:href={ coverPath }></image>
				</svg>
			</div>
		</body>
	</html>
}
