startpage + panel k i w

This commit is contained in:
Mikołaj Wielgosz 2019-01-08 22:29:33 +01:00
parent 4de2ee47f4
commit 24a415a8a6
4 changed files with 46 additions and 1 deletions

View File

@ -10,13 +10,20 @@ var view *template.Template
func startpage(w http.ResponseWriter, r *http.Request){
view.ExecuteTemplate(w, "index.html", nil)
}
func klientpage(w http.ResponseWriter, r *http.Request){
view.ExecuteTemplate(w, "panelklient.html", nil)
}
func wlaspage(w http.ResponseWriter, r *http.Request){
view.ExecuteTemplate(w, "panelwlas.html", nil)
}
func main() {
view = template.Must(template.ParseGlob("templates/*.html"))
http.Handle("/appearance/", http.StripPrefix("/appearance/", http.FileServer(http.Dir("appearance"))))
http.HandleFunc("/", startpage)
http.HandleFunc("/panelklient", klientpage)
http.HandleFunc("/panelwlas", wlaspage)
http.ListenAndServe(":8888", nil)
}

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Utwórz liste potrzebnych produktów</h1>
<a href="/panelklient"><button>Utwórz</button></a>
<h1>Panel właściciela</h1>
<form method="post" action="/panelwlas" name="zaloguj">
<input type="text" name="login" placeholder="Login">
<input type="password" name="password" placeholder="Password">
<input type="submit" value="Zaloguj" class="btn">
</form>
</body>
</html>

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
</head>
<body>
LISTA KLIENT
</body>
</html>

9
templates/panelwlas.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
</head>
<body>
LISTA WLAS
</body>
</html>