Add index

This commit is contained in:
Jan Bader 2016-12-07 17:19:11 +01:00
parent 39141ab2e6
commit f4e227957b
2 changed files with 22 additions and 0 deletions

View File

@ -12,6 +12,7 @@ func main() {
router.LoadHTMLGlob("./templates/*") router.LoadHTMLGlob("./templates/*")
router.Static("/static", "./static") router.Static("/static", "./static")
router.GET("/", func(c *gin.Context) { c.HTML(http.StatusOK, "index", nil) })
router.GET("/login", login) router.GET("/login", login)
api := router.Group("/api/v1") api := router.Group("/api/v1")
{ {

21
templates/index.html Normal file
View File

@ -0,0 +1,21 @@
{{define "index"}}
<!DOCTYPE html>
<html>
<head>
<title>Budgeteer</title>
{{template "head"}}
</head>
<body>
<div class="container" id="head">
Budgeteer
</div>
<div class="container col-md-8 col-ld-8" id="content">
Willkommen bei Budgeteer, der neuen App für's Budget!
</div>
<div class="container col-md-4" id="login">
<a href="/login">Login</a>
</div>
</body>
</html>
{{end}}