implemented spaces, fixed login and signup, thought creation and space creation.

This commit is contained in:
2025-05-26 13:00:12 -06:00
parent 54a01f0f1f
commit d3fa1733f4
32 changed files with 1499 additions and 1132 deletions
-31
View File
@@ -1,31 +0,0 @@
<?php
function login_form($error_msg = '')
{
$form = '
<div class="form_card">
<h3 class="underline">Log In</h3>
<form method="post" id="login_form">
<input type="hidden" name="form_id" value="login_form">
<input type="hidden" name="password_hash" value="" id="password_hash">
<label for="username">Username / Email</label>
<input id="username" name="username" spellcheck="false" required autofocus>
<label for="password">Password</label>
<input id="password" name="password" type="password" spellcheck="false" required>
<label class="form_checkbox_container">Stay Logged In?
<input name="stay_logged_in" type="checkbox" value="true">
<span class="checkmark"></span>
</label>
<input class="button" type="submit" value="Log In">
' . $error_msg . '
</form>
<script src="js/login.js" defer></script>
</div>
';
return $form;
}
-50
View File
@@ -1,50 +0,0 @@
<?php
function signup_form($error_msg = '')
{
$form = '
<div class="form_card">
<h3 class="underline">Sign Up</h3>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="form_id" value="signup_form">
<input type="hidden" name="crop_x" value="" id="crop_x">
<input type="hidden" name="crop_y" value="" id="crop_y">
<input type="hidden" name="crop_width" value="" id="crop_width">
<input name="required_field" id="required_field" value="">
<label for="username">Username</label>
<input id="username" name="username" required>
<label for="email">Email Address</label>
<input id="email" name="email" required>
<label for="password">Password</label>
<input id="password" name="password" type="password" required>
<label for="verify_password">Verify Password</label>
<input id="verify_password" name="verify_password" type="password" required>
<label for="profile_picture_input" class="upload_button modal_button" id="profile_cropper_button">Upload a Profile Picture</label>
<input id="profile_picture_input" class="file_input" name="profile_picture" type="file" accept="image/png, image/jpeg, image/jpg">
<small class="file_input_feedback">No file selected.</small>
<label class="form_checkbox_container">Stay Logged In?
<input name="stay_logged_in" type="checkbox" value="true">
<span class="checkmark"></span>
</label>
<input class="button" type="submit" value="Sign Up">
' . $error_msg . '
</form>
<div id="modal" class="modal">
<div id="display_modal"></div>
</div>
<div style="display: none;">
<div id="profile_cropper" class="modal_form">' . profile_cropper() . '</div>
</div>
</div>
';
return $form;
}