diff --git a/index.php b/index.php index a665ee1..c30f63b 100644 --- a/index.php +++ b/index.php @@ -38,6 +38,20 @@ $uri_explode = explode('?', $uri_string); $path_raw = $uri_explode[0]; // `/foo/bar` $path = explode('/', $path_raw); + +if(isset($uri_explode[1])) { + $uri_string = $uri_explode[0]; + $uri_explode = explode('&', $uri_explode[1]); + $query = array(); + foreach($uri_explode as $string) { + $bits = explode('=', $string); + $query[$bits[0]] = $bits[1]; + } +} +else { + $query = array(); +} + // Remove trailing slashes if (str_ends_with($path_raw, '/') && $path_raw != '/') { http_response_code(308); @@ -53,7 +67,13 @@ $routes = [ if ($path[2] == 'signup') { require 'views/signup.php'; + exit; + } else if ($path[2] == 'login') { + require 'views/login.php'; + exit; } + + return 404; }, 'profile' => function () { global $path, $user, $profile_owner; // don't forget this lol diff --git a/styles/base.css b/styles/base.css index fe34949..75b412b 100644 --- a/styles/base.css +++ b/styles/base.css @@ -38,6 +38,10 @@ main { footer { flex: 0; + + text-align: center; + + margin: 16px; } #content { diff --git a/views/login.php b/views/login.php index e69de29..3ed2497 100644 --- a/views/login.php +++ b/views/login.php @@ -0,0 +1,45 @@ + + + + + + + + + + +
+

Sign up

+
+

+

+

+

+

+

+ + +
+
+ + + + \ No newline at end of file diff --git a/views/partials/footer.php b/views/partials/footer.php index df7e723..cbe5954 100644 --- a/views/partials/footer.php +++ b/views/partials/footer.php @@ -1,3 +1,4 @@ \ No newline at end of file diff --git a/views/partials/header.php b/views/partials/header.php index 742fcb8..81329b7 100644 --- a/views/partials/header.php +++ b/views/partials/header.php @@ -8,5 +8,6 @@
+