Add LHB Engineering case study with reusable header/footer partials and scrollable hero screenshots

This commit is contained in:
Ovidiu U
2026-03-13 13:39:55 +00:00
parent f2d497db9a
commit 484066a80e
11 changed files with 328 additions and 107 deletions

12
includes/cs_footer.php Normal file
View File

@@ -0,0 +1,12 @@
<section class="section section-cta">
<div class="section-label"> Next</div>
<div class="section-content">
<a href="/portfolio" class="cs-back cs-back--lg"> Back to All Work</a>
<p class="large-text">Got a project in mind?</p>
<a href="mailto:hello@uovidiu.com" class="btn">Get in Touch </a>
</div>
</section>
<script src="/js/screenshot-scroll-hint.js"></script>
<?php require __DIR__ . '/footer.php'; ?>

38
includes/cs_header.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
/*
* Case Study Header Partial
* ─────────────────────────────────────────────────────────────────
* Requires the following variables set by the calling page BEFORE
* requiring this file:
*
* $cs_slug string Key into $projects, e.g. 'thompson'
*
* Everything else ($title, $description, hero content) is read from
* $projects[$cs_slug] in data/projects.php.
* ─────────────────────────────────────────────────────────────────
*/
$extra_css = '/css/portfolio.css';
require __DIR__ . '/../data/projects.php';
$p = $projects[$cs_slug];
$title = $p['page_title'];
$description = $p['page_desc'];
require __DIR__ . '/header.php';
?>
<div class="cs-breadcrumb">
<a href="/portfolio" class="cs-back">← All Work</a>
<span class="cs-breadcrumb-label">[<?= htmlspecialchars($p['num']) ?> / <?= htmlspecialchars($p['code']) ?>]</span>
</div>
<header class="hero">
<div class="hero-label">Case Study — <?= htmlspecialchars($p['num']) ?></div>
<h1><?= htmlspecialchars($p['h1'][0]) ?><br><span class="h1-sub"><?= htmlspecialchars($p['h1'][1]) ?></span></h1>
<p class="hero-sub"><?= htmlspecialchars($p['sub']) ?></p>
<ul class="cs-meta-bar">
<li><?= htmlspecialchars($p['stack']) ?></li>
<li><?= htmlspecialchars($p['location']) ?></li>
<li><?= htmlspecialchars($p['year']) ?></li>
</ul>
</header>

View File

@@ -17,7 +17,12 @@
<?php $current = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); ?>
<nav class="nav">
<a href="/" class="nav-logo">OU</a>
<div class="nav-left">
<a href="/" class="nav-logo">OU</a>
<?php if (str_starts_with($current, '/portfolio/')): ?>
<a href="/portfolio" class="nav-back">←(back)</a>
<?php endif; ?>
</div>
<div class="nav-links">
<a href="/#about">About</a>
<a href="/#services">Services</a>