preview: add page title, viewport, add 'again...' button
This commit is contained in:
parent
6ab2b08099
commit
f27d14aac4
11
preview.go
11
preview.go
@ -25,6 +25,8 @@ func (this *Server) handlePreview(w http.ResponseWriter, fileID string) {
|
||||
tmpl := `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>` + html.EscapeString(this.opts.ServerPublicProperties.AppTitle) + `</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
background: #333;
|
||||
@ -46,6 +48,15 @@ html, body {
|
||||
<div class="thumbnail">
|
||||
<a href="` + html.EscapeString(`/get/`+fileID) + `"><img src="` + html.EscapeString(`/thumb/m/`+fileID) + `"></a>
|
||||
</div>
|
||||
`
|
||||
if this.opts.EnableHomepage {
|
||||
tmpl += `
|
||||
<div class="return">
|
||||
<button onclick="window.location.href='/'">Again...</button>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
tmpl += `
|
||||
</div>
|
||||
</body>
|
||||
</html>`
|
||||
|
Loading…
Reference in New Issue
Block a user