diff options
author | Emile <hanemile@protonmail.com> | 2019-02-25 23:56:29 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-02-25 23:56:29 +0100 |
commit | 23ecf18de76e8ef873acac89923232987366c7a9 (patch) | |
tree | eb890f3ab55ebaf84e1f4f494b723985168c4454 /src | |
parent | de59393dbd2043611de91f0612626bc858256d19 (diff) |
updated the file structure
Diffstat (limited to 'src')
-rw-r--r-- | src/go.mod | 2 | ||||
-rw-r--r-- | src/go.sum | 2 | ||||
-rw-r--r-- | src/main.go | 20 | ||||
-rw-r--r-- | src/static/.contact.html.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | src/static/about.html (renamed from src/about.html) | 0 | ||||
-rw-r--r-- | src/static/contact.html (renamed from src/contact.html) | 4 | ||||
-rw-r--r-- | src/static/css/bootstrap.min.css (renamed from src/css/bootstrap.min.css) | 0 | ||||
-rw-r--r-- | src/static/css/custom.css (renamed from src/css/custom.css) | 0 | ||||
-rw-r--r-- | src/static/css/small-business.css (renamed from src/css/small-business.css) | 0 | ||||
-rw-r--r-- | src/static/favicon.ico (renamed from src/favicon.ico) | bin | 1150 -> 1150 bytes | |||
-rw-r--r-- | src/static/images/barnes-hut-full.png (renamed from src/images/barnes-hut-full.png) | bin | 65060 -> 65060 bytes | |||
-rw-r--r-- | src/static/images/code_sample_200x250.png (renamed from src/images/code_sample_200x250.png) | bin | 17112 -> 17112 bytes | |||
-rw-r--r-- | src/static/images/database_sample_200x250.png (renamed from src/images/database_sample_200x250.png) | bin | 7005 -> 7005 bytes | |||
-rw-r--r-- | src/static/images/example_boxes_750x450.png (renamed from src/images/example_boxes_750x450.png) | bin | 22004 -> 22004 bytes | |||
-rw-r--r-- | src/static/images/example_image_cropped_200x250.png (renamed from src/images/example_image_cropped_200x250.png) | bin | 40376 -> 40376 bytes | |||
-rw-r--r-- | src/static/images/example_image_cropped_900x400.png (renamed from src/images/example_image_cropped_900x400.png) | bin | 313574 -> 313574 bytes | |||
-rw-r--r-- | src/static/images/generator_sample_200x250.png (renamed from src/images/generator_sample_200x250.png) | bin | 95263 -> 95263 bytes | |||
-rw-r--r-- | src/static/images/grafana_sample_200x250.png (renamed from src/images/grafana_sample_200x250.png) | bin | 8501 -> 8501 bytes | |||
-rw-r--r-- | src/static/images/manager_sample_200x250.png (renamed from src/images/manager_sample_200x250.png) | bin | 8050 -> 8050 bytes | |||
-rw-r--r-- | src/static/images/pointcloud_400x600.png (renamed from src/images/pointcloud_400x600.png) | bin | 136158 -> 136158 bytes | |||
-rw-r--r-- | src/static/images/pointcloud_400x800.png (renamed from src/images/pointcloud_400x800.png) | bin | 143246 -> 143246 bytes | |||
-rw-r--r-- | src/static/images/simulator_sample_200x250.png (renamed from src/images/simulator_sample_200x250.png) | bin | 13762 -> 13762 bytes | |||
-rw-r--r-- | src/static/images/traefik_sample_200x250.png (renamed from src/images/traefik_sample_200x250.png) | bin | 10344 -> 10344 bytes | |||
-rw-r--r-- | src/static/images/view_sample_200x250.png (renamed from src/images/view_sample_200x250.png) | bin | 41804 -> 41804 bytes | |||
-rw-r--r-- | src/static/images/writeup_sample_200x250.png (renamed from src/images/writeup_sample_200x250.png) | bin | 7609 -> 7609 bytes | |||
-rw-r--r-- | src/static/index.html (renamed from src/index.html) | 0 |
26 files changed, 24 insertions, 4 deletions
diff --git a/src/go.mod b/src/go.mod index 489c84a..e1581d6 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1 +1,3 @@ module frontpage + +require github.com/gorilla/mux v1.7.0 diff --git a/src/go.sum b/src/go.sum new file mode 100644 index 0000000..62d09fa --- /dev/null +++ b/src/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.7.0 h1:tOSd0UKHQd6urX6ApfOn4XdBMY6Sh1MfxV3kmaazO+U= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= diff --git a/src/main.go b/src/main.go index 0808608..ce4bb9f 100644 --- a/src/main.go +++ b/src/main.go @@ -1,7 +1,23 @@ package main -import "net/http" +import ( + "net/http" +) + func main() { - panic(http.ListenAndServe(":80", http.FileServer(http.Dir("./")))) + + // serve the index page + http.Handle("/", http.FileServer(http.Dir("./static"))) + + // serve the contact page + http.HandleFunc("/contact/", func(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, "static/contact.html") + }) + + // server the static css + http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static")))) + + // start listening to incomming connections and serve the appropriate files + panic(http.ListenAndServe(":80", nil)) } diff --git a/src/static/.contact.html.swp b/src/static/.contact.html.swp new file mode 100644 index 0000000..b77c810 --- /dev/null +++ b/src/static/.contact.html.swp Binary files differdiff --git a/src/about.html b/src/static/about.html index 2c674d2..2c674d2 100644 --- a/src/about.html +++ b/src/static/about.html diff --git a/src/contact.html b/src/static/contact.html index 04a48e7..ddda09d 100644 --- a/src/contact.html +++ b/src/static/contact.html @@ -11,10 +11,10 @@ <title>Galaxy Simulator</title> <!-- Bootstrap core CSS --> - <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> + <link href="/static/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom styles for this template --> - <link href="css/small-business.css" rel="stylesheet"> + <link href="/static/css/small-business.css" rel="stylesheet"> </head> diff --git a/src/css/bootstrap.min.css b/src/static/css/bootstrap.min.css index 6561b6f..6561b6f 100644 --- a/src/css/bootstrap.min.css +++ b/src/static/css/bootstrap.min.css diff --git a/src/css/custom.css b/src/static/css/custom.css index 8c0ce19..8c0ce19 100644 --- a/src/css/custom.css +++ b/src/static/css/custom.css diff --git a/src/css/small-business.css b/src/static/css/small-business.css index fbc36c8..fbc36c8 100644 --- a/src/css/small-business.css +++ b/src/static/css/small-business.css diff --git a/src/favicon.ico b/src/static/favicon.ico index 7641a5e..7641a5e 100644 --- a/src/favicon.ico +++ b/src/static/favicon.ico Binary files differdiff --git a/src/images/barnes-hut-full.png b/src/static/images/barnes-hut-full.png index b55be72..b55be72 100644 --- a/src/images/barnes-hut-full.png +++ b/src/static/images/barnes-hut-full.png Binary files differdiff --git a/src/images/code_sample_200x250.png b/src/static/images/code_sample_200x250.png index 8578b1f..8578b1f 100644 --- a/src/images/code_sample_200x250.png +++ b/src/static/images/code_sample_200x250.png Binary files differdiff --git a/src/images/database_sample_200x250.png b/src/static/images/database_sample_200x250.png index c51274b..c51274b 100644 --- a/src/images/database_sample_200x250.png +++ b/src/static/images/database_sample_200x250.png Binary files differdiff --git a/src/images/example_boxes_750x450.png b/src/static/images/example_boxes_750x450.png index 327ae43..327ae43 100644 --- a/src/images/example_boxes_750x450.png +++ b/src/static/images/example_boxes_750x450.png Binary files differdiff --git a/src/images/example_image_cropped_200x250.png b/src/static/images/example_image_cropped_200x250.png index 58515b5..58515b5 100644 --- a/src/images/example_image_cropped_200x250.png +++ b/src/static/images/example_image_cropped_200x250.png Binary files differdiff --git a/src/images/example_image_cropped_900x400.png b/src/static/images/example_image_cropped_900x400.png index 1006953..1006953 100644 --- a/src/images/example_image_cropped_900x400.png +++ b/src/static/images/example_image_cropped_900x400.png Binary files differdiff --git a/src/images/generator_sample_200x250.png b/src/static/images/generator_sample_200x250.png index 5d5498b..5d5498b 100644 --- a/src/images/generator_sample_200x250.png +++ b/src/static/images/generator_sample_200x250.png Binary files differdiff --git a/src/images/grafana_sample_200x250.png b/src/static/images/grafana_sample_200x250.png index 9e944ab..9e944ab 100644 --- a/src/images/grafana_sample_200x250.png +++ b/src/static/images/grafana_sample_200x250.png Binary files differdiff --git a/src/images/manager_sample_200x250.png b/src/static/images/manager_sample_200x250.png index 49764a0..49764a0 100644 --- a/src/images/manager_sample_200x250.png +++ b/src/static/images/manager_sample_200x250.png Binary files differdiff --git a/src/images/pointcloud_400x600.png b/src/static/images/pointcloud_400x600.png index 04ee73d..04ee73d 100644 --- a/src/images/pointcloud_400x600.png +++ b/src/static/images/pointcloud_400x600.png Binary files differdiff --git a/src/images/pointcloud_400x800.png b/src/static/images/pointcloud_400x800.png index 9d59ea8..9d59ea8 100644 --- a/src/images/pointcloud_400x800.png +++ b/src/static/images/pointcloud_400x800.png Binary files differdiff --git a/src/images/simulator_sample_200x250.png b/src/static/images/simulator_sample_200x250.png index c79a6e2..c79a6e2 100644 --- a/src/images/simulator_sample_200x250.png +++ b/src/static/images/simulator_sample_200x250.png Binary files differdiff --git a/src/images/traefik_sample_200x250.png b/src/static/images/traefik_sample_200x250.png index 4c8477f..4c8477f 100644 --- a/src/images/traefik_sample_200x250.png +++ b/src/static/images/traefik_sample_200x250.png Binary files differdiff --git a/src/images/view_sample_200x250.png b/src/static/images/view_sample_200x250.png index 38c5ac3..38c5ac3 100644 --- a/src/images/view_sample_200x250.png +++ b/src/static/images/view_sample_200x250.png Binary files differdiff --git a/src/images/writeup_sample_200x250.png b/src/static/images/writeup_sample_200x250.png index 2dd520d..2dd520d 100644 --- a/src/images/writeup_sample_200x250.png +++ b/src/static/images/writeup_sample_200x250.png Binary files differdiff --git a/src/index.html b/src/static/index.html index 5d3624b..5d3624b 100644 --- a/src/index.html +++ b/src/static/index.html |