From 24a415a8a621aadd0196c6698410c466f993bf73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Wielgosz?= Date: Tue, 8 Jan 2019 22:29:33 +0100 Subject: [PATCH] startpage + panel k i w --- main.go | 9 ++++++++- templates/index.html | 20 ++++++++++++++++++++ templates/panelklient.html | 9 +++++++++ templates/panelwlas.html | 9 +++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 templates/panelklient.html create mode 100644 templates/panelwlas.html diff --git a/main.go b/main.go index ecca080..9070e0f 100644 --- a/main.go +++ b/main.go @@ -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) } diff --git a/templates/index.html b/templates/index.html index e69de29..f9ecdfa 100644 --- a/templates/index.html +++ b/templates/index.html @@ -0,0 +1,20 @@ + + + + + + + + +

Utwórz liste potrzebnych produktów

+ + + +

Panel właściciela

+
+ + + +
+ + \ No newline at end of file diff --git a/templates/panelklient.html b/templates/panelklient.html new file mode 100644 index 0000000..e68d421 --- /dev/null +++ b/templates/panelklient.html @@ -0,0 +1,9 @@ + + + + + + +LISTA KLIENT + + \ No newline at end of file diff --git a/templates/panelwlas.html b/templates/panelwlas.html new file mode 100644 index 0000000..3b8e336 --- /dev/null +++ b/templates/panelwlas.html @@ -0,0 +1,9 @@ + + + + + + +LISTA WLAS + + \ No newline at end of file