New option to hide feedback button on pages
continuous-integration/drone/push Build is passing Details

This commit is contained in:
nemunaire 2023-11-20 13:05:32 +01:00
parent 7ff56ca762
commit 0bdb1c4c04
1 changed files with 6 additions and 0 deletions

View File

@ -20,14 +20,20 @@ var (
indexTpl *template.Template
CustomHeadHTML = ""
CustomBodyHTML = ""
HideVoxPeople = false
)
func init() {
flag.StringVar(&CustomHeadHTML, "custom-head-html", CustomHeadHTML, "Add custom HTML right before </head>")
flag.StringVar(&CustomBodyHTML, "custom-body-html", CustomBodyHTML, "Add custom HTML right before </body>")
flag.BoolVar(&HideVoxPeople, "hide-feedback-button", HideVoxPeople, "Hide the icon on page that permit to give feedback")
}
func DeclareRoutes(cfg *config.Options, router *gin.Engine) {
if HideVoxPeople {
CustomHeadHTML += "<style>#voxpeople { display: none !important; }</style>"
}
if cfg.DevProxy != "" {
router.GET("/.svelte-kit/*_", serveOrReverse("", cfg))
router.GET("/node_modules/*_", serveOrReverse("", cfg))