Removed extraneous </img> tag and added doctype tag

This commit is contained in:
Seednode 2022-11-09 23:53:02 -06:00
parent f12b800a71
commit 3e98201cdd
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
)
var Version = "0.24.1"
var Version = "0.24.2"
func init() {
rootCmd.AddCommand(versionCmd)

View File

@ -201,7 +201,7 @@ func serveHtml(w http.ResponseWriter, r *http.Request, filePath string, dimensio
queryParams, err := generateQueryParams(filters, r.URL.Query().Get("sort"), refreshInterval)
var htmlBody strings.Builder
htmlBody.WriteString(`<html lang="en"><head>`)
htmlBody.WriteString(`<!DOCTYPE html><html lang="en"><head>`)
htmlBody.WriteString(`<style>a{display:block;height:100%;width:100%;text-decoration:none;}`)
htmlBody.WriteString(`img{max-width:100%;max-height:97vh;object-fit:contain;}</style>`)
htmlBody.WriteString(fmt.Sprintf(`<title>%v (%vx%v)</title>`,
@ -209,7 +209,7 @@ func serveHtml(w http.ResponseWriter, r *http.Request, filePath string, dimensio
dimensions.Width,
dimensions.Height))
htmlBody.WriteString(`</head><body>`)
htmlBody.WriteString(fmt.Sprintf(`<a href="/%v"><img src="%v" width="%v" height="%v" alt="Roulette selected: %v"></img></a>`,
htmlBody.WriteString(fmt.Sprintf(`<a href="/%v"><img src="%v" width="%v" height="%v" alt="Roulette selected: %v"></a>`,
queryParams,
generateFilePath(filePath),
dimensions.Width,