61 lines
2.7 KiB
PHP
61 lines
2.7 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
ini_set('display_errors', '1');
|
|
error_reporting(E_ALL);
|
|
|
|
require_once __DIR__ . '/i18n.php';
|
|
|
|
// Read project preview data from environment
|
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
|
?>
|
|
<!doctype html>
|
|
<html lang="<?= get_lang() ?>" dir="<?= get_dir() ?>">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title><?= htmlspecialchars($pageTitle ?? __('app_title')) ?></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"><?= __('app_title') ?></a>
|
|
<div class="nav-buttons">
|
|
<div class="lang-switcher">
|
|
<a href="?lang=en" class="<?= get_lang() === 'en' ? 'active' : '' ?>"><?= __('english') ?></a>
|
|
|
|
|
<a href="?lang=ar" class="<?= get_lang() === 'ar' ? 'active' : '' ?>"><?= __('arabic') ?></a>
|
|
</div>
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<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_task') ?></a>
|
|
<a href="/logout.php" class="btn btn-secondary"><?= __('logout') ?></a>
|
|
<?php else: ?>
|
|
<a href="/login.php" class="btn btn-secondary"><?= __('login') ?></a>
|
|
<a href="/signup.php" class="btn btn-primary"><?= __('signup') ?></a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</header>
|
|
<main class="container">
|