From 8c86dbdfa87f3a7ae46ef3bf21baf89d560c0fa9 Mon Sep 17 00:00:00 2001 From: palo Date: Tue, 7 Nov 2023 20:31:15 +0100 Subject: [PATCH] Added (not much) CSS for the tables --- .gitignore | 1 + main.go | 2 ++ static/stylesheets/index.css | 0 static/stylesheets/ordered.css | 5 +++++ static/stylesheets/pizza.css | 5 +++++ templates/index.html | 2 +- templates/ordered.html | 2 +- templates/pizza.html | 2 +- 8 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 static/stylesheets/index.css create mode 100644 static/stylesheets/ordered.css create mode 100644 static/stylesheets/pizza.css diff --git a/.gitignore b/.gitignore index 18cce05..c64bb66 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Scontrini-Web-Client +tags diff --git a/main.go b/main.go index f96658b..4a55da1 100644 --- a/main.go +++ b/main.go @@ -134,6 +134,8 @@ func main() { mux.HandleFunc("/pizza", pizzaHandler) mux.HandleFunc("/order_pizzas", orderPizzasHandler) + mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static")))) + err := http.ListenAndServe(":8080", mux) if errors.Is(err, http.ErrServerClosed) { fmt.Println("Server closed") diff --git a/static/stylesheets/index.css b/static/stylesheets/index.css new file mode 100644 index 0000000..e69de29 diff --git a/static/stylesheets/ordered.css b/static/stylesheets/ordered.css new file mode 100644 index 0000000..281be35 --- /dev/null +++ b/static/stylesheets/ordered.css @@ -0,0 +1,5 @@ +table, th, td { + border: 1px solid; + border-collapse: collapse; + padding: 15px; +} diff --git a/static/stylesheets/pizza.css b/static/stylesheets/pizza.css new file mode 100644 index 0000000..281be35 --- /dev/null +++ b/static/stylesheets/pizza.css @@ -0,0 +1,5 @@ +table, th, td { + border: 1px solid; + border-collapse: collapse; + padding: 15px; +} diff --git a/templates/index.html b/templates/index.html index 452f745..c83a6e0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,7 +3,7 @@ Scontrini - + diff --git a/templates/ordered.html b/templates/ordered.html index 38f224e..94cca9c 100644 --- a/templates/ordered.html +++ b/templates/ordered.html @@ -3,7 +3,7 @@ Scontrini - + diff --git a/templates/pizza.html b/templates/pizza.html index 36569af..586a923 100644 --- a/templates/pizza.html +++ b/templates/pizza.html @@ -3,7 +3,7 @@ Scontrini - +