mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +02:00
improve style
This commit is contained in:
parent
b27a826cd2
commit
d96e63bc50
@ -99,11 +99,6 @@ func (e *ePub) writeImage(wz *epubZip, img *Image) error {
|
|||||||
e.render(textTmpl, map[string]any{
|
e.render(textTmpl, map[string]any{
|
||||||
"Title": fmt.Sprintf("Image %d Part %d", img.Id, img.Part),
|
"Title": fmt.Sprintf("Image %d Part %d", img.Id, img.Part),
|
||||||
"ViewPort": fmt.Sprintf("width=%d,height=%d", e.ViewWidth, e.ViewHeight),
|
"ViewPort": fmt.Sprintf("width=%d,height=%d", e.ViewWidth, e.ViewHeight),
|
||||||
"ImageStyle": fmt.Sprintf(
|
|
||||||
"width:%dpx; height:%dpx;",
|
|
||||||
img.Width,
|
|
||||||
img.Height,
|
|
||||||
),
|
|
||||||
"ImagePath": img.ImgPath(),
|
"ImagePath": img.ImgPath(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link href="style.css" type="text/css" rel="stylesheet"/>
|
<link href="style.css" type="text/css" rel="stylesheet"/>
|
||||||
<meta name="viewport" content="{{ .ViewPort }}"/>
|
<meta name="viewport" content="{{ .ViewPort }}"/>
|
||||||
|
@ -1,13 +1,22 @@
|
|||||||
body {
|
body {
|
||||||
color: #000;
|
color: #000;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: {{ .PageWidth }}px;
|
width: {{ .PageWidth }}px;
|
||||||
height: {{ .PageHeight }}px;
|
height: {{ .PageHeight }}px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div {
|
img {
|
||||||
|
position: absolute;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
|
z-index:0;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width: {{ .PageWidth }}px;
|
||||||
|
height: {{ .PageHeight }}px;
|
||||||
}
|
}
|
@ -2,13 +2,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link href="style.css" type="text/css" rel="stylesheet"/>
|
<link href="style.css" type="text/css" rel="stylesheet"/>
|
||||||
<meta name="viewport" content="{{ .ViewPort }}"/>
|
<meta name="viewport" content="{{ .ViewPort }}"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<img style="{{ .ImageStyle }}" src="../{{ .ImagePath }}"/>
|
<img src="../{{ .ImagePath }}" alt="{{ .Title }}"/>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -2,6 +2,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
<title>Part {{ .Part }}</title>
|
<title>Part {{ .Part }}</title>
|
||||||
<link href="style.css" type="text/css" rel="stylesheet"/>
|
<link href="style.css" type="text/css" rel="stylesheet"/>
|
||||||
<meta name="viewport" content="width={{ .Info.ViewWidth }}, height={{ .Info.ViewHeight }}"/>
|
<meta name="viewport" content="width={{ .Info.ViewWidth }}, height={{ .Info.ViewHeight }}"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user