From afa769b6c98ccff2f4c19467577fc064dd07f645 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Tue, 11 Apr 2023 10:46:10 -0400 Subject: [PATCH] update frontend --- server/src/main.rs | 2 +- web/index.html | 50 +++++++++++++++++++++++++++++------- web/static/css/index.css | 16 ++++++++++++ web/static/css/stylemain.css | 0 4 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 web/static/css/index.css delete mode 100644 web/static/css/stylemain.css diff --git a/server/src/main.rs b/server/src/main.rs index 8639ef273bb3a7a16d6837ba50651457ddf6adfe..e38980f69970550e4e73f38d982b99e9fa71b74e 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -98,7 +98,7 @@ async fn handle_request(mut request: Request, remote_addr: SocketAddr, mgr Ok(Response::builder().status(400).body(Body::from("Connection-Upgrade header missing")).unwrap()) }, ("/ping", false) => { - Ok(Response::builder().status(200).body(Body::from( + Ok(Response::builder().status(200).header("Access-Control-Allow-Origin", "*").body(Body::from( serde_json::to_string(&ServerPingResponse { version: ServerPingResponseVersion { name: env!("STK_VERSION_NAME").to_string(), // Set by build.rs diff --git a/web/index.html b/web/index.html index 1732ce5116f266bf1e17ea81214a20fa128f0974..5081e14a7733a2b2243b93d89387e77d29e5dbee 100644 --- a/web/index.html +++ b/web/index.html @@ -3,17 +3,49 @@ wasm testing + -
- - -
- - -
- -
+

StarKingdoms

+
+ Join Game +
+ + +
+ +
+ +
+ +
+
+ + \ No newline at end of file diff --git a/web/static/css/index.css b/web/static/css/index.css new file mode 100644 index 0000000000000000000000000000000000000000..405b74d0b8c9309dea57b7c398d5ddf443741a74 --- /dev/null +++ b/web/static/css/index.css @@ -0,0 +1,16 @@ +.joingamebox { + width: min-content; + padding: 10px; +} + +.m-5px { + margin: 5px; +} + +.w-full { + width: 100%; +} + +.w-90 { + width: 90%; +} \ No newline at end of file diff --git a/web/static/css/stylemain.css b/web/static/css/stylemain.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000