feat: added login page
no functionality tho
This commit is contained in:
10
handler/login.go
Normal file
10
handler/login.go
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package handler
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gofiber/fiber/v3"
|
||||||
|
"github.com/itsig0/tallytome/view/login"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Login(c fiber.Ctx) error {
|
||||||
|
return render(c, login.Show())
|
||||||
|
}
|
||||||
1
main.go
1
main.go
@@ -39,6 +39,7 @@ func main() {
|
|||||||
// app.Get("/*", func(c *fiber.Ctx) error {
|
// app.Get("/*", func(c *fiber.Ctx) error {
|
||||||
// return c.SendString("Hello, World!")
|
// return c.SendString("Hello, World!")
|
||||||
// })
|
// })
|
||||||
|
app.Get("/login", handler.Login)
|
||||||
|
|
||||||
app.Listen(fmt.Sprint(":", port))
|
app.Listen(fmt.Sprint(":", port))
|
||||||
}
|
}
|
||||||
|
|||||||
25
view/login/login.templ
Normal file
25
view/login/login.templ
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package login
|
||||||
|
|
||||||
|
templ Show() {
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" data-theme="dark">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<link rel="stylesheet" href="/tallytome.css"/>
|
||||||
|
<script src="/scripts/htmx.js"></script>
|
||||||
|
<script src="/scripts/tallytome.js"></script>
|
||||||
|
<title>Anmelden | Tallytome</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main id="loginContainer" class="container">
|
||||||
|
<h1>Anmelden</h1>
|
||||||
|
<form>
|
||||||
|
<input type="text" placeholder="Login"/>
|
||||||
|
<input type="password" placeholder="Passwort"/>
|
||||||
|
<button type="submit">Anmelden</button>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
}
|
||||||
@@ -259,6 +259,14 @@ progress{
|
|||||||
margin-bottom: var(--pico-spacing);
|
margin-bottom: var(--pico-spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#loginContainer {
|
||||||
|
height: 100vh;
|
||||||
|
max-width: 510px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
// form elements
|
// form elements
|
||||||
|
|
||||||
// form{
|
// form{
|
||||||
|
|||||||
Reference in New Issue
Block a user