From ad6d7e2cd3e1f8f673d193a62aafcb8cb57ace00 Mon Sep 17 00:00:00 2001 From: Seednode Date: Fri, 28 Oct 2022 19:52:53 -0500 Subject: [PATCH] Empty space on image pages is now clickable, and returns a new random image --- cmd/version.go | 2 +- cmd/web.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/version.go b/cmd/version.go index 5832493..c02a2af 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.20.3" +var Version = "0.20.4" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index 6a06094..e64e78a 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -162,8 +162,11 @@ func serveHtml(w http.ResponseWriter, r *http.Request, filePath, dimensions stri htmlBody := ` - - ` + <style> + a{display:block;height:100%;width:100%;text-decoration:none} + img{max-width:100%;max-height:97vh;height:auto;} + </style> + <title>` htmlBody += fmt.Sprintf("%v (%v)", fileName, dimensions) htmlBody += `