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 | |
parent | de59393dbd2043611de91f0612626bc858256d19 (diff) |
updated the file structure
-rw-r--r-- | .idea/workspace.xml | 93 | ||||
-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 |
27 files changed, 64 insertions, 57 deletions
diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 37b33ed..9c6ccd0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ChangeListManager"> - <list default="true" id="a9164191-d370-492b-893b-7d5187d87f7c" name="Default Changelist" comment=""> + <list default="true" id="a9164191-d370-492b-893b-7d5187d87f7c" name="Default Changelist" comment="removed the footer in the twitter panel"> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/src/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/index.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/src/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.go" afterDir="false" /> </list> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="SHOW_DIALOG" value="false" /> @@ -13,17 +11,34 @@ <option name="LAST_RESOLUTION" value="IGNORE" /> </component> <component name="FileEditorManager"> - <leaf> - <file pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/src/index.html"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="525"> - <caret line="62" selection-start-line="62" selection-end-line="62" /> - </state> - </provider> - </entry> - </file> - </leaf> + <splitter split-orientation="horizontal" split-proportion="0.5"> + <split-first> + <leaf> + <file pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/index.html"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="480"> + <caret line="59" column="68" selection-start-line="59" selection-start-column="68" selection-end-line="59" selection-end-column="68" /> + </state> + </provider> + </entry> + </file> + </leaf> + </split-first> + <split-second> + <leaf> + <file pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/css/custom.css"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="375"> + <caret line="25" selection-start-line="25" selection-end-line="25" /> + </state> + </provider> + </entry> + </file> + </leaf> + </split-second> + </splitter> </component> <component name="GOROOT" path="/usr/lib/go-1.11" /> <component name="Git.Settings"> @@ -48,34 +63,7 @@ </navigator> <panes> <pane id="Scope" /> - <pane id="ProjectPane"> - <subPane> - <expand> - <path> - <item name="frontpage" type="b2602c69:ProjectViewProjectNode" /> - <item name="frontpage" type="462c0819:PsiDirectoryNode" /> - </path> - <path> - <item name="frontpage" type="b2602c69:ProjectViewProjectNode" /> - <item name="frontpage" type="462c0819:PsiDirectoryNode" /> - <item name="src" type="462c0819:PsiDirectoryNode" /> - </path> - <path> - <item name="frontpage" type="b2602c69:ProjectViewProjectNode" /> - <item name="frontpage" type="462c0819:PsiDirectoryNode" /> - <item name="src" type="462c0819:PsiDirectoryNode" /> - <item name="css" type="462c0819:PsiDirectoryNode" /> - </path> - <path> - <item name="frontpage" type="b2602c69:ProjectViewProjectNode" /> - <item name="frontpage" type="462c0819:PsiDirectoryNode" /> - <item name="src" type="462c0819:PsiDirectoryNode" /> - <item name="images" type="462c0819:PsiDirectoryNode" /> - </path> - </expand> - <select /> - </subPane> - </pane> + <pane id="ProjectPane" /> </panes> </component> <component name="PropertiesComponent"> @@ -84,7 +72,7 @@ <property name="go.gopath.indexing.explicitly.defined" value="true" /> <property name="go.sdk.automatically.set" value="true" /> <property name="go.vendoring.notification.had.been.shown" value="true" /> - <property name="last_opened_file_path" value="$PROJECT_DIR$" /> + <property name="last_opened_file_path" value="$USER_HOME$/go/src/git.darknebu.la/GalaxySimulator" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="settings.editor.selected.configurable" value="preferences.pluginManager" /> @@ -103,9 +91,8 @@ </component> <component name="ToolWindowManager"> <frame x="-2" y="0" width="1924" height="1063" extended-state="6" /> - <editor active="true" /> <layout> - <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21253985" /> + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14187035" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Favorites" order="2" side_tool="true" /> <window_info anchor="bottom" id="Message" order="0" /> @@ -152,24 +139,24 @@ <entry file="file://$PROJECT_DIR$/src/images/barnes-hut-full.png"> <provider selected="true" editor-type-id="images" /> </entry> - <entry file="file://$PROJECT_DIR$/src/css/custom.css"> + <entry file="file://$PROJECT_DIR$/src/main.go"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="375"> - <caret line="25" selection-start-line="25" selection-end-line="25" /> + <state relative-caret-position="105"> + <caret line="7" selection-start-line="7" selection-end-line="7" /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main.go"> + <entry file="file://$PROJECT_DIR$/src/css/custom.css"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="105"> - <caret line="7" selection-start-line="7" selection-end-line="7" /> + <state relative-caret-position="375"> + <caret line="25" selection-start-line="25" selection-end-line="25" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/index.html"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="525"> - <caret line="62" selection-start-line="62" selection-end-line="62" /> + <state relative-caret-position="480"> + <caret line="59" column="68" selection-start-line="59" selection-start-column="68" selection-end-line="59" selection-end-column="68" /> </state> </provider> </entry> 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 |