56 lines
2.4 KiB
PHP
56 lines
2.4 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
session_start();
|
|
ini_set('display_errors', '1');
|
|
error_reporting(E_ALL);
|
|
|
|
// Read project preview data from environment
|
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
|
?>
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title><?= htmlspecialchars($pageTitle ?? 'CashTask') ?></title>
|
|
|
|
<?php if ($projectDescription): ?>
|
|
<!-- Meta description -->
|
|
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
|
<!-- Open Graph meta tags -->
|
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<!-- Twitter meta tags -->
|
|
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<?php endif; ?>
|
|
<?php if ($projectImageUrl): ?>
|
|
<!-- Open Graph image -->
|
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<!-- Twitter image -->
|
|
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<?php endif; ?>
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/assets/css/main.css?v=<?= time() ?>">
|
|
</head>
|
|
<body>
|
|
<header class="header">
|
|
<a href="/" class="logo">CashTask</a>
|
|
<div class="nav-buttons">
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<span class="welcome-message">Welcome, <?php echo htmlspecialchars($_SESSION['user_name']); ?>!</span>
|
|
<a href="/profile.php?id=<?php echo $_SESSION['user_id']; ?>" class="btn btn-secondary">My Profile</a>
|
|
<a href="/my-applications.php" class="btn btn-secondary">My Applications</a>
|
|
<a href="/manage-tasks.php" class="btn btn-secondary">Manage Tasks</a>
|
|
<a href="/post-task.php" class="btn btn-primary">Post a Task</a>
|
|
<a href="/logout.php" class="btn btn-secondary">Log Out</a>
|
|
<?php else: ?>
|
|
<a href="/login.php" class="btn btn-secondary">Log In</a>
|
|
<a href="/signup.php" class="btn btn-primary">Sign Up</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</header>
|
|
<main class="container">
|