Refactor admin pages to use shared head and navigation components
- Created `admin-head.php` for consistent <head> markup across admin pages. - Created `admin-nav.php` for shared navigation bar, reducing duplication. - Updated all admin pages (account, hours, index, login, menu, users) to utilize the new components. - Added security headers to `auth.php` and `index.php` for improved security. - Introduced `security-headers.php` to manage security headers across the application. - Moved inline styles from admin pages to SCSS files to comply with Content Security Policy (CSP). - Normalized file permissions during build process to prevent permission issues on deployment.
This commit is contained in:
1 parent
3286bce6b1
commit
c7b836bcf2
21 files changed
+447
-231
No files matched your search
@@ -3,6 +3,8 @@ declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/config.php';
|
||||
require __DIR__ . '/inc/assets.php';
|
||||
require __DIR__ . '/inc/security-headers.php';
|
||||
send_security_headers();
|
||||
require __DIR__ . '/inc/announcements.php';
|
||||
require __DIR__ . '/inc/menu.php';
|
||||
require __DIR__ . '/inc/hours.php';
|
||||
@@ -94,24 +96,24 @@ $siteUrl = rtrim(SITE_URL, '/');
|
||||
<main id="main">
|
||||
|
||||
<section class="menu-page-header">
|
||||
<div class="container" style="text-align: center;">
|
||||
<div class="container menu-hero">
|
||||
<p class="eyebrow">The Old Fitz Public House</p>
|
||||
<h1 style="font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--gold-bright); margin-top: 0.5rem;">Pub Menu</h1>
|
||||
<div class="rule-row" style="margin-top: 1.5rem; margin-bottom: 1.5rem;">
|
||||
<h1 class="menu-hero-title">Pub Menu</h1>
|
||||
<div class="rule-row menu-hero-rule">
|
||||
<span class="line"></span>
|
||||
<img class="knot" src="./assets/knot.png" alt="">
|
||||
<span class="line"></span>
|
||||
</div>
|
||||
<p class="muted" style="max-width: 52ch; margin: 0 auto; font-size: 1.05rem;">
|
||||
<p class="muted menu-hero-intro">
|
||||
Traditional Irish staples, shareable plates, and comforting pub classics cooked fresh. Kitchen serves until 9:00 PM.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="menu-page-content" style="padding-top: 0;">
|
||||
<div class="container" style="max-width: 62rem;">
|
||||
<section class="menu-page-content">
|
||||
<div class="container menu-page-container">
|
||||
<?php if ($menuEnabled && !empty($menuCategories)): ?>
|
||||
<div class="menu-grid" style="margin-top: 0;">
|
||||
<div class="menu-grid menu-grid-flush">
|
||||
<?php foreach ($menuCategories as $category): ?>
|
||||
<?php if (!empty($category['items'])): ?>
|
||||
<div class="menu-category">
|
||||
@@ -144,17 +146,17 @@ $siteUrl = rtrim(SITE_URL, '/');
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="panel" style="text-align: center; padding: 3rem 1.5rem;">
|
||||
<div class="panel menu-empty">
|
||||
<p class="muted">Our kitchen menu is currently being refreshed. Please check our Facebook page for today's specials!</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Allergen / Food Safety Disclaimer from the original print menu -->
|
||||
<div class="menu-disclaimer" style="margin-top: 3.5rem; text-align: center; padding-top: 2rem; border-top: 1px solid var(--rule);">
|
||||
<p class="muted" style="font-size: 0.8rem; line-height: 1.6; max-width: 68ch; margin: 0 auto;">
|
||||
<div class="menu-disclaimer">
|
||||
<p class="muted menu-disclaimer-text">
|
||||
Consuming raw or undercooked meats, poultry, seafood, shellfish, or eggs may increase your risk of foodborne illness. Our kitchen handles a variety of ingredients, and our menu items may contain or come into contact with common allergens such as milk, eggs, wheat, soy, nuts, or shellfish.
|
||||
</p>
|
||||
<div class="hero-ctas" style="margin-top: 2rem; justify-content: center;">
|
||||
<div class="hero-ctas menu-disclaimer-ctas">
|
||||
<a class="btn btn-primary" href="https://www.facebook.com/profile.php?id=100086635646712" target="_blank" rel="noopener">See Daily Specials on Facebook</a>
|
||||
<a class="btn btn-outline" href="mailto:info@theoldfitzpub.com">Ask a Kitchen Question</a>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user