diff options
Diffstat (limited to 'src/app/Views')
| -rw-r--r-- | src/app/Views/home/index.php | 3 | ||||
| -rw-r--r-- | src/app/Views/layouts/main.php | 35 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/app/Views/home/index.php b/src/app/Views/home/index.php new file mode 100644 index 0000000..f5cde93 --- /dev/null +++ b/src/app/Views/home/index.php @@ -0,0 +1,3 @@ +<?php // Home page: displays a welcome message and database connection status.?> +<h1>Welcome to Camagru</h1> +<p>Database status: <?= htmlspecialchars($dbStatus) ?></p> diff --git a/src/app/Views/layouts/main.php b/src/app/Views/layouts/main.php new file mode 100644 index 0000000..b4c7dad --- /dev/null +++ b/src/app/Views/layouts/main.php @@ -0,0 +1,35 @@ +<?php // Base HTML layout: header with navigation, content slot, and footer.?> +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Camagru</title> + <link rel="stylesheet" href="/css/style.css"> +</head> +<body> + <header> + <nav> + <a href="/" class="logo">Camagru</a> + <div class="nav-links"> + <a href="/gallery">Gallery</a> + <?php if (isset($_SESSION['user_id'])): ?> + <a href="/editor">Editor</a> + <a href="/profile">Profile</a> + <a href="/logout">Logout</a> + <?php else: ?> + <a href="/login">Login</a> + <a href="/register">Register</a> + <?php endif; ?> + </div> + </nav> + </header> + <main> + <?php include $content; ?> + </main> + <footer> + <p>Camagru © <?= date('Y') ?></p> + </footer> + <script src="/js/app.js"></script> +</body> +</html> |
