webui finally
All checks were successful
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Successful in 3m28s
mozhi pipeline / Build and publish artifacts (push) Successful in 12m36s

This commit is contained in:
2023-09-10 17:27:22 +05:30
parent 566eb69743
commit 8403dfe227
12 changed files with 371 additions and 448 deletions

View File

@@ -85,10 +85,18 @@ func Serve(port string) {
})
app.Get("/", pages.HandleIndex)
app.Get("/switchlanguages", func(c *fiber.Ctx) error {
engine := c.Query("engine")
from := c.Query("from")
to := c.Query("to")
text := c.Query("text")
return c.Redirect("/?engine="+engine+"&from="+to+"&to="+from+"&text="+text+"&redirected=true", 301)
})
app.Static("/css", "./public/css", staticConfig)
app.Static("/robots.txt", "./public/robots.txt", staticConfig)
app.Static("/favicon.ico", "./public/assets/favicon.ico", staticConfig)
app.Static("/mozhi.svg", "./public/assets/mozhi.svg", staticConfig)
app.Static("/mozhi.png", "./public/assets/mozhi.png", staticConfig)
// app.Get("/about", pages.HandleAbout)
api := app.Group("/api")