mirror of
https://github.com/myronblair/tomsjavajive-app
synced 2026-06-30 17:50:56 -05:00
v1.0.0 - Initial backup
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* Tom's Java Jive - Header Include
|
||||
*/
|
||||
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/db.php';
|
||||
require_once __DIR__ . '/../config/config.php';
|
||||
require_once __DIR__ . '/auth.php';
|
||||
|
||||
$cartCount = 0;
|
||||
$cart = $_SESSION['cart'] ?? [];
|
||||
foreach ($cart as $qty) {
|
||||
$cartCount += $qty;
|
||||
}
|
||||
|
||||
$isLoggedIn = CustomerAuth::isLoggedIn();
|
||||
$customerUser = $isLoggedIn ? CustomerAuth::getUser() : null;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $pageTitle ?? SITE_NAME ?></title>
|
||||
<meta name="description" content="Premium artisan coffee beans freshly roasted and delivered to your door. Shop single origin, blends, and specialty coffee from Tom's Java Jive.">
|
||||
|
||||
<!-- PWA Meta Tags -->
|
||||
<meta name="theme-color" content="#FF5E1A">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="apple-mobile-web-app-title" content="Java Jive">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/assets/icons/icon-192.png">
|
||||
|
||||
<!-- Fonts -->
|
||||
<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&family=Playfair+Display:wght@600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Icons -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="/assets/images/logo.png" type="image/png">
|
||||
|
||||
<?php if (strpos($_SERVER['REQUEST_URI'], 'payment') !== false || strpos($_SERVER['REQUEST_URI'], 'checkout') !== false): ?>
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($extraHead)) echo $extraHead; ?>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<nav class="nav container">
|
||||
<a href="/" class="logo">
|
||||
<img src="/assets/images/logo.png" alt="<?= SITE_NAME ?>" class="logo-img">
|
||||
</a>
|
||||
|
||||
<ul class="nav-links">
|
||||
<li><a href="/" class="<?= $_SERVER['REQUEST_URI'] === '/' ? 'active' : '' ?>">Home</a></li>
|
||||
<li><a href="/shop.php" class="<?= strpos($_SERVER['REQUEST_URI'], 'shop') !== false ? 'active' : '' ?>">Shop</a></li>
|
||||
<li><a href="/#about">About</a></li>
|
||||
<?php if ($isLoggedIn): ?>
|
||||
<li><a href="/account/" class="<?= strpos($_SERVER['REQUEST_URI'], 'account') !== false ? 'active' : '' ?>">Account</a></li>
|
||||
<?php else: ?>
|
||||
<li><a href="/login.php">Account</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<div class="nav-actions">
|
||||
<a href="/cart.php" class="cart-btn" title="Shopping Cart">
|
||||
<i class="fas fa-shopping-bag"></i>
|
||||
<?php if ($cartCount > 0): ?>
|
||||
<span class="cart-count"><?= $cartCount ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
Reference in New Issue
Block a user