Basic frontend login ui
This commit is contained in:
0
frontend/index.css
Normal file
0
frontend/index.css
Normal file
24
frontend/index.html
Normal file
24
frontend/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>GiacPoints</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/picnic">
|
||||
<link rel="stylesheet" href="/index.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="login">
|
||||
<article class="card">
|
||||
<label for="name">Name</label> <br>
|
||||
<input type="text" id="name"> <br>
|
||||
<label for="password">Password</label> <br>
|
||||
<input type="password" id="password"> <br>
|
||||
<input type="submit" value="Login"> <br>
|
||||
</article>
|
||||
</div>
|
||||
<div id="mainPage" style="display: none;">
|
||||
<p>Main Page</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>GiacPoints</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello web</p>
|
||||
</body>
|
||||
</html>
|
||||
3
main.go
3
main.go
@@ -170,10 +170,11 @@ func main() {
|
||||
router.GET("/getHistory", getHistory)
|
||||
|
||||
// page routes
|
||||
router.LoadHTMLGlob("html/*")
|
||||
router.LoadHTMLGlob("frontend/*")
|
||||
router.GET("/", func(c *gin.Context) {
|
||||
c.HTML(http.StatusOK, "index.html", gin.H{})
|
||||
})
|
||||
router.Static("/", "./frontend")
|
||||
|
||||
// asset routes
|
||||
router.Static("/scripts", "./scripts")
|
||||
|
||||
Reference in New Issue
Block a user