97 lines
5.8 KiB
PHP
97 lines
5.8 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="<?php echo \App\Services\LanguageService::getLang(); ?>">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php echo $title ?? htmlspecialchars(get_setting('site_name', 'ApkNusa')); ?></title>
|
|
|
|
<meta name="description" content="<?php echo $meta_description ?? htmlspecialchars(get_setting('meta_description', __('meta_description_default'))); ?>">
|
|
<meta name="keywords" content="<?php echo $meta_keywords ?? htmlspecialchars(get_setting('meta_keywords', __('meta_keywords_default'))); ?>">
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
|
<link rel="icon" type="image/x-icon" href="/<?php echo get_setting('site_favicon'); ?>">
|
|
<link rel="stylesheet" href="/assets/css/custom.css">
|
|
<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;500;600;700&display=swap" rel="stylesheet">
|
|
|
|
<?php echo get_setting('head_js'); ?>
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom py-3 sticky-top">
|
|
<div class="container">
|
|
<a class="navbar-brand fw-bold text-success d-flex align-items-center" href="/">
|
|
<?php if (get_setting('site_icon')): ?>
|
|
<img src="/<?php echo get_setting('site_icon'); ?>" alt="Logo" class="me-2" style="height: 30px;">
|
|
<?php else: ?>
|
|
<i class="fas fa-robot"></i>
|
|
<?php endif; ?>
|
|
<?php echo htmlspecialchars(get_setting('site_name', 'ApkNusa')); ?>
|
|
</a>
|
|
|
|
<!-- Mobile search button -->
|
|
<button class="btn d-lg-none ms-auto me-2 text-muted" type="button" data-bs-toggle="collapse" data-bs-target="#headerSearchCollapse">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
|
|
<button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<!-- Search bar in navigation -->
|
|
<form action="/" method="GET" class="d-none d-lg-flex ms-lg-4 me-auto position-relative" style="max-width: 400px; width: 100%;">
|
|
<div class="input-group input-group-sm bg-light rounded-pill px-2">
|
|
<span class="input-group-text bg-transparent border-0"><i class="bi bi-search text-muted"></i></span>
|
|
<input type="text" name="search" class="form-control bg-transparent border-0 py-2" placeholder="<?php echo __('search', 'Search...'); ?>" value="<?php echo htmlspecialchars($_GET['search'] ?? ''); ?>">
|
|
</div>
|
|
</form>
|
|
|
|
<ul class="navbar-nav ms-auto align-items-center">
|
|
<li class="nav-item">
|
|
<a class="nav-link px-3" href="/"><?php echo __('home'); ?></a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link px-3" href="#"><?php echo __('categories'); ?></a>
|
|
</li>
|
|
|
|
<li class="nav-item dropdown px-3">
|
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
|
|
<i class="fas fa-globe me-1"></i> <?php echo \App\Services\LanguageService::getLang() == 'id' ? 'ID' : 'EN'; ?>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end shadow border-0">
|
|
<li><a class="dropdown-item" href="/lang/id">🇮🇩 Indonesia</a></li>
|
|
<li><a class="dropdown-item" href="/lang/en">🇺🇸 English</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<li class="nav-item ms-lg-3">
|
|
<a class="btn btn-outline-success rounded-pill px-4 d-flex align-items-center" href="/profile">
|
|
<i class="fas fa-user-circle me-2"></i> <?php echo __('profile'); ?>
|
|
</a>
|
|
</li>
|
|
<?php else: ?>
|
|
<li class="nav-item ms-lg-3">
|
|
<a class="btn btn-outline-dark rounded-pill px-4" href="/login"><?php echo __('login'); ?></a>
|
|
</li>
|
|
<li class="nav-item ms-lg-2">
|
|
<a class="btn btn-success rounded-pill px-4" href="/register"><?php echo __('register'); ?></a>
|
|
</li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- Mobile Search Collapse -->
|
|
<div class="collapse d-lg-none w-100 px-3 mt-2" id="headerSearchCollapse">
|
|
<form action="/" method="GET" class="pb-3">
|
|
<div class="input-group bg-light rounded-pill px-2">
|
|
<span class="input-group-text bg-transparent border-0"><i class="bi bi-search text-muted"></i></span>
|
|
<input type="text" name="search" class="form-control bg-transparent border-0 py-2" placeholder="<?php echo __('search', 'Search...'); ?>" value="<?php echo htmlspecialchars($_GET['search'] ?? ''); ?>">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</nav>
|
|
<main class="min-vh-100">
|