feat!: APP_URL env, theme switcher icon with redirect

This commit is contained in:
httpjamesm 2022-12-28 11:56:17 -05:00
parent 3d53fd5806
commit d92edafb03
4 changed files with 55 additions and 7 deletions

View file

@ -3,6 +3,7 @@ package routes
import (
"fmt"
"html/template"
"os"
"strings"
"github.com/PuerkitoBio/goquery"
@ -157,6 +158,7 @@ func ViewQuestion(c *gin.Context) {
"imagePolicy": imagePolicy,
"shortenedBody": questionBodyParent.Text()[0:50],
"theme": c.MustGet("theme").(string),
"currentUrl": fmt.Sprintf("%s/questions/%s/%s", os.Getenv("APP_URL"), questionId, questionTitle),
})
}