diff --git a/config/version.go b/config/version.go new file mode 100644 index 0000000..440cd28 --- /dev/null +++ b/config/version.go @@ -0,0 +1,3 @@ +package config + +var Version = "1.1" diff --git a/public/question.css b/public/question.css index 07b7f15..a29defc 100644 --- a/public/question.css +++ b/public/question.css @@ -90,6 +90,15 @@ img { font-size: .8rem; } +.logo-link { + text-decoration: none; +} + +.logo { + width: 2rem; + height: 2rem; +} + @media only screen and (max-width: 800px) { body { padding-left: 1rem; diff --git a/src/routes/home.go b/src/routes/home.go index 4c97c1e..7d05625 100644 --- a/src/routes/home.go +++ b/src/routes/home.go @@ -1,6 +1,7 @@ package routes import ( + "anonymousoverflow/config" "fmt" "strings" @@ -8,7 +9,9 @@ import ( ) func GetHome(c *gin.Context) { - c.HTML(200, "home.html", gin.H{}) + c.HTML(200, "home.html", gin.H{ + "version": config.Version, + }) } type urlConversionRequest struct { diff --git a/src/routes/question.go b/src/routes/question.go index ce101cd..8c764a7 100644 --- a/src/routes/question.go +++ b/src/routes/question.go @@ -141,10 +141,10 @@ func ViewQuestion(c *gin.Context) { answers = append(answers, template.HTML(answerBodyHTML)) }) - imagePolicy := "https:" + imagePolicy := "'self' https:" if c.MustGet("disable_images").(bool) { - imagePolicy = "'none'" + imagePolicy = "'self'" } c.HTML(200, "question.html", gin.H{ diff --git a/templates/home.html b/templates/home.html index a51d76b..1298aa4 100644 --- a/templates/home.html +++ b/templates/home.html @@ -12,12 +12,19 @@ - +