Added: MVC structure, Router, Views and Controllers for home page and login/signup
This commit is contained in:
9
app/views/auth/signin.php
Normal file
9
app/views/auth/signin.php
Normal file
@ -0,0 +1,9 @@
|
||||
<section class="signin">
|
||||
<form>
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" id="username">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password">
|
||||
<input type="submit" value="Sign In" id="submit-signin">
|
||||
</form>
|
||||
</section>
|
11
app/views/auth/signup.php
Normal file
11
app/views/auth/signup.php
Normal file
@ -0,0 +1,11 @@
|
||||
<section class="signup">
|
||||
<form>
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" id="username">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password">
|
||||
<label for="password-2">Password again</label>
|
||||
<input type="password" name="password-2" id="password-2">
|
||||
<input type="submit" value="Sign Up" id="submit-signup">
|
||||
</form>
|
||||
</section>
|
0
app/views/dashboard/index.php
Normal file
0
app/views/dashboard/index.php
Normal file
13
app/views/errors/404.php
Normal file
13
app/views/errors/404.php
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Habit Tracker | Error 494</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Error 404 - Page not found</h1>
|
||||
<a href="/">Go back home</a>
|
||||
</body>
|
||||
</html>
|
0
app/views/habits/create.php
Normal file
0
app/views/habits/create.php
Normal file
0
app/views/habits/edit.php
Normal file
0
app/views/habits/edit.php
Normal file
4
app/views/home/index.php
Normal file
4
app/views/home/index.php
Normal file
@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<h1>Welcome to Habit Tracker!</h1>
|
||||
<p>Track your habits and achieve your goals.</p>
|
||||
</div>
|
16
app/views/layouts/base.php
Normal file
16
app/views/layouts/base.php
Normal file
@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Habit Tracker | <?= $data['title'] ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="/auth/signin">Log In</a>
|
||||
<a href="/auth/signup">Sign Up</a>
|
||||
</header>
|
||||
<section class="content">
|
||||
<?= $content ?>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
0
app/views/shared/footer.php
Normal file
0
app/views/shared/footer.php
Normal file
4
app/views/shared/header.php
Normal file
4
app/views/shared/header.php
Normal file
@ -0,0 +1,4 @@
|
||||
<header>
|
||||
<a href="/signin">Log In</a>
|
||||
<a href="/signup">Sign Up</a>
|
||||
</header>
|
Reference in New Issue
Block a user