Add plugin widget
Change-Id: I55f006bfe1d60e6fe8e73b801171e507a62b97d9
diff --git a/service.go b/service.go
index ba009b8..5d82e15 100644
--- a/service.go
+++ b/service.go
@@ -68,7 +68,17 @@
func setupRouter() *gin.Engine {
r := gin.Default()
+ r.LoadHTMLGlob("templates/*")
+
+ r.GET("/index", func(c *gin.Context) {
+ c.HTML(http.StatusOK, "main.html", gin.H{
+ "title": "External Sale Plugin",
+ "korapServer": "https://korap.ids-mannheim.de/",
+ })
+ })
+
r.GET("/:corpus_id/:doc_id/:text_id", CheckSaleUrl)
+ r.Static("/assets", "./assets")
return r
}