mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
WIP
This commit is contained in:
parent
f33c095094
commit
0613bca3bc
@ -106,6 +106,10 @@ func (i EPUBImage) RelSize(viewWidth, viewHeight int) (relWidth, relHeight int)
|
|||||||
w, h := viewWidth, viewHeight
|
w, h := viewWidth, viewHeight
|
||||||
srcw, srch := i.Width, i.Height
|
srcw, srch := i.Width, i.Height
|
||||||
|
|
||||||
|
if srcw < w && srch < h {
|
||||||
|
return srcw, srch
|
||||||
|
}
|
||||||
|
|
||||||
if w <= 0 || h <= 0 || srcw <= 0 || srch <= 0 {
|
if w <= 0 || h <= 0 || srcw <= 0 || srch <= 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<meta charset="utf-8" />
|
<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 }}"/>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
</body>
|
</body>
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
<meta charset="utf-8" />
|
<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 }}"/>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<img src="../{{ .ImagePath }}" alt="{{ .Title }}" style="{{ .ImageStyle }}"/>
|
<img src="../{{ .ImagePath }}" alt="{{ .Title }}" style="{{ .ImageStyle }}"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user