mirror of https://github.com/byecorps/id.git
I'll style this later
This commit is contained in:
parent
85fff100ae
commit
aa6f107ce4
|
@ -48,6 +48,13 @@ if (str_ends_with($path_raw, '/') && $path_raw != '/') {
|
||||||
$routes = [
|
$routes = [
|
||||||
'' => function () { require 'views/home.php'; },
|
'' => function () { require 'views/home.php'; },
|
||||||
'api' => function () { require 'api.php'; /* Handoff further routing to API script. */ },
|
'api' => function () { require 'api.php'; /* Handoff further routing to API script. */ },
|
||||||
|
'auth' => function () {
|
||||||
|
global $path;
|
||||||
|
|
||||||
|
if ($path[2] == 'signup') {
|
||||||
|
require 'views/signup.php';
|
||||||
|
}
|
||||||
|
},
|
||||||
'profile' => function () {
|
'profile' => function () {
|
||||||
global $path, $user, $profile_owner; // don't forget this lol
|
global $path, $user, $profile_owner; // don't forget this lol
|
||||||
|
|
||||||
|
|
|
@ -1 +1,34 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<?php include 'partials/head.php' ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php include 'partials/header.php' ?>
|
||||||
|
|
||||||
|
<main><?php
|
||||||
|
|
||||||
|
if ($_SESSION['auth']) {
|
||||||
|
$error_body = 'You\'re already logged in';
|
||||||
|
include 'partials/error.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<h1>Sign up</h1>
|
||||||
|
<form method="post">
|
||||||
|
<p><label for="email">Email</label>
|
||||||
|
<input type="email" name="email" id="email" /></p>
|
||||||
|
<p><label for="password">Password</label>
|
||||||
|
<input type="password" name="password" id="password" /></p>
|
||||||
|
<p><label for="repeat_password">Confirm password</label>
|
||||||
|
<input type="password" name="repeat_password" id="repeat_password" /></p>
|
||||||
|
|
||||||
|
<button type="submit">Submit</button>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<?php include 'partials/footer.php' ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue