BS-004 Build approved homepage composition with explicit asset placeholders

This commit is contained in:
rob
2026-11-10 14:17:14 +00:00
parent 2a4ffe1b00
commit 4f3b75b2b4
14 changed files with 290 additions and 98 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import { useState } from "react";
import { FiMenu, FiX } from "react-icons/fi";
import { Container, Nav, Navbar } from "react-bootstrap";
import { NavLink } from "react-router-dom";
import Logo from "../Logo/Logo";
@@ -10,7 +11,9 @@ export default function Header() {
return <Navbar expand="md" expanded={expanded} onToggle={setExpanded} className={styles.header} aria-label="Main navigation">
<Container>
<Navbar.Brand as="div"><Logo /></Navbar.Brand>
<Navbar.Toggle aria-controls="main-navigation" aria-expanded={expanded} />
<Navbar.Toggle aria-controls="main-navigation" aria-expanded={expanded}>
{expanded ? <FiX aria-hidden="true" /> : <FiMenu aria-hidden="true" />}
</Navbar.Toggle>
<Navbar.Collapse id="main-navigation" className={styles.navbarCollapse}>
<Nav>
{["Services", "Projects", "About", "Contact"].map(label => (
@@ -5,7 +5,7 @@
:global(.navbar-brand) { margin: 0; }
:global(.nav-link) { color: var(--site-text); font-size: .9rem; padding: .75rem 1rem !important; }
:global(.nav-link:hover), :global(.nav-link.active) { color: var(--site-link); }
:global(.navbar-toggler) { border-color: var(--site-line); padding: .65rem; margin-left: auto; margin-right: .8rem; }
:global(.navbar-toggler) { border-color: var(--site-line); padding: .65rem; color: var(--site-text); line-height: 1; svg { width: 22px; height: 22px; } margin-left: auto; margin-right: .8rem; }
}
.navbarCollapse { justify-content: flex-end; margin-right: 1.25rem; }
@media (max-width: 767.98px) {
+87 -5
View File
@@ -1,8 +1,90 @@
import { Container } from "react-bootstrap";
import { Link } from "react-router-dom";
import { FiArrowRight, FiCode, FiLayers, FiMail, FiMonitor, FiServer, FiTarget, FiUsers, FiZap, FiImage } from "react-icons/fi";
import styles from "./Homepage.module.scss";
const services = [
{ title: "Website Development", description: "Clear, responsive websites for businesses, research projects and online services.", icon: <FiMonitor aria-hidden="true" /> },
{ title: "Custom Software", description: "Web applications and specialised tools shaped around the way you work.", icon: <FiLayers aria-hidden="true" /> },
{ title: "APIs & Integration", description: "Backend services and integrations that connect your data, systems and workflows.", icon: <FiCode aria-hidden="true" /> },
{ title: "Managed Hosting", description: "Hosting, maintenance and updates, with a level of support agreed for your project.", icon: <FiServer aria-hidden="true" /> },
];
const qualities = [
{ title: "End-to-end delivery", description: "A considered path from the first conversation to development and deployment.", icon: <FiZap aria-hidden="true" /> },
{ title: "Practical engineering", description: "Clear choices and maintainable software, focused on what your project needs.", icon: <FiTarget aria-hidden="true" /> },
{ title: "Ongoing support", description: "Hosting, maintenance and further development as your needs evolve.", icon: <FiUsers aria-hidden="true" /> },
];
export default function Homepage() {
return <Container className="routePlaceholder">
<p className="eyebrow">BortStack · Website in development</p>
<h1>Software development for real-world needs</h1>
<p>The approved BortStack homepage is being prepared.</p>
</Container>;
return <div className={styles.homepage}>
<Container>
<section className={styles.hero} aria-labelledby="hero-title">
<div className={styles.heroCopy}>
<p className="eyebrow">Software engineering <span aria-hidden="true">────</span></p>
<h1 id="hero-title">Software solutions<br />for <span>real-world use.</span></h1>
<p className={styles.intro}>Custom development, APIs, hosting and ongoing maintenance for businesses, research projects and online services.</p>
<Link to="/contact" className={`btn btn-primary btn-lg ${styles.primaryCta}`}>Discuss a Project <FiArrowRight aria-hidden="true" /></Link>
</div>
<div className={styles.illustration} aria-hidden="true">
<div className={styles.orbit} />
<div className={styles.diagram}>
<div className={styles.diagramTop}><i /><i /><i /><span /></div>
<div className={styles.diagramBody}>
<div className={styles.diagramSidebar}><span /><span /><span /><span /><span /></div>
<div className={styles.codeLines}>
{[72, 48, 85, 60, 36, 77, 54, 88, 46].map((width, i) => <span key={i} style={{ width: `${width}%` }} />)}
</div>
</div>
</div>
<div className={styles.diagramBase} />
<div className={styles.integration}><FiLayers /><span>Build. Connect. Maintain.</span></div>
<span className={styles.artCaption}>Decorative engineering illustration</span>
</div>
</section>
<section className={styles.services} aria-labelledby="services-title">
<h2 id="services-title" className={styles.sectionLabel}>What we do<span aria-hidden="true" /></h2>
<div className={styles.serviceGrid}>
{services.map(({ title, description, icon }) => <Link className={styles.service} to="/services" key={title}>
<div className={styles.serviceIcon}>{icon}</div>
<div><h3>{title}</h3><p>{description}</p></div>
<FiArrowRight className={styles.serviceArrow} aria-hidden="true" />
</Link>)}
</div>
</section>
<section className={styles.work} aria-labelledby="work-title">
<h2 id="work-title" className={styles.sectionLabel}>Featured project<span aria-hidden="true" /></h2>
<div className={styles.workGrid}>
<div className={styles.projectPlaceholder} role="img" aria-label="Placeholder: genuine featured-project screenshot awaiting approval">
<FiImage aria-hidden="true" />
<span>Genuine project screenshot</span>
<small>Awaiting approved imagery</small>
</div>
<div className={styles.workCopy}>
<p className={styles.pending}>Featured project pending</p>
<h3>A closer look<br />at the work.</h3>
<p>A selected project will be featured here once its details and genuine imagery are approved for publication.</p>
<Link to="/projects" className={styles.textLink}>Visit Projects <FiArrowRight aria-hidden="true" /></Link>
</div>
</div>
</section>
<section className={styles.why} aria-labelledby="why-title">
<h2 id="why-title" className={styles.sectionLabel}>Why BortStack<span aria-hidden="true" /></h2>
<div className={styles.qualityGrid}>
{qualities.map(({ title, description, icon }) => <div className={styles.quality} key={title}>
{icon}<div><h3>{title}</h3><p>{description}</p></div>
</div>)}
</div>
</section>
<section className={styles.contact} aria-labelledby="contact-title">
<p className="eyebrow">Let’s build something useful</p>
<h2 id="contact-title">Have a project in mind?</h2>
<p>Start with the idea. We’ll work through the possibilities.</p>
<Link to="/contact" className={`btn btn-primary btn-lg ${styles.primaryCta}`}><FiMail aria-hidden="true" /> Get in Touch</Link>
</section>
</Container>
</div>;
}
+61 -8
View File
@@ -1,9 +1,62 @@
.homepage {
display: grid;
place-items: center;
text-align: center;
section {
max-width: 44rem;
}
.homepage { overflow: clip; }
.hero {
display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; gap: 2rem;
padding-block: clamp(4rem, 7vw, 7rem) 5.5rem;
}
.heroCopy {
position: relative; z-index: 1;
:global(.eyebrow) { margin-bottom: 1.5rem; span { margin-left: .7rem; color: var(--site-line); } }
h1 { font-size: clamp(2.7rem, 4.6vw, 4.15rem); letter-spacing: -.05em; line-height: 1.08; margin-bottom: 1.65rem; span { color: var(--site-link); } }
}
.intro { font-size: 1.13rem; line-height: 1.65; color: var(--site-muted); max-width: 44ch; margin-bottom: 2rem; }
.primaryCta { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; border-radius: .4rem; padding: .85rem 1.3rem; font-size: 1rem; svg { font-size: 1.15rem; } }
.illustration { position: relative; min-height: 350px; perspective: 1000px; display: grid; align-items: center; isolation: isolate; }
.orbit { position: absolute; inset: -8% -12%; z-index: -1; background: radial-gradient(ellipse at 55% 55%, var(--site-glow), transparent 67%); }
.diagram { width: 94%; height: 254px; background: var(--site-surface); border: 1px solid var(--bs-steel-blue); border-radius: 13px; transform: rotateY(-16deg) rotateX(9deg) rotateZ(-6deg); box-shadow: 12px 28px 60px #00000030, inset 0 0 40px var(--site-glow); overflow: hidden; }
.diagramTop { display: flex; align-items: center; gap: 7px; height: 35px; border-bottom: 1px solid var(--site-line); padding-inline: 14px; i { width: 5px; height: 5px; border-radius: 50%; background: var(--bs-steel-blue); } span { width: 22%; height: 4px; border-radius: 2px; background: var(--site-line); margin-left: auto; } }
.diagramBody { display: grid; grid-template-columns: 22% 1fr; height: calc(100% - 35px); }
.diagramSidebar { padding: 20px 12px; border-right: 1px solid var(--site-line); display: flex; flex-direction: column; gap: 13px; span { height: 3px; border-radius: 2px; background: var(--site-line); } span:nth-child(2) { background: var(--site-link); width: 70%; } }
.codeLines { padding: 24px; display: flex; flex-direction: column; gap: 13px; span { height: 4px; border-radius: 3px; background: var(--site-line); } span:nth-child(3n) { background: var(--bs-steel-blue); margin-left: 13px; } span:nth-child(4n) { background: var(--site-link); } }
.diagramBase { width: 95%; height: 10px; background: var(--site-line); border: 1px solid var(--bs-steel-blue); transform: rotateZ(-6deg) skewX(-35deg); position: absolute; top: 85%; left: -1%; border-radius: 0 0 8px 8px; }
.integration { display: flex; align-items: center; gap: .75rem; position: absolute; right: -1%; bottom: 0; border: 1px solid var(--site-line); background: var(--site-surface); padding: .9rem 1.1rem; border-radius: .45rem; color: var(--site-muted); font-size: .75rem; svg { font-size: 1.5rem; color: var(--site-link); } }
.artCaption { position: absolute; bottom: -1.8rem; right: 0; color: var(--site-muted); font-size: .6rem; letter-spacing: .025em; }
.sectionLabel { display: flex; align-items: center; gap: 1.5rem; font-size: .85rem; font-weight: 700; color: var(--site-link); text-transform: uppercase; letter-spacing: .16em; margin-bottom: 2rem; span { flex: 1; height: 1px; background: linear-gradient(90deg, var(--bs-steel-blue), var(--site-line)); } }
.services, .work, .why { padding-block: 1.5rem 3.5rem; }
.serviceGrid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
.service { display: grid; grid-template-columns: 70px 1fr 16px; gap: 1.4rem; padding-block: 1.5rem; border-bottom: 1px solid var(--site-line); color: var(--site-text); text-decoration: none;
h3 { font-size: 1.2rem; letter-spacing: -.025em; margin-bottom: .5rem; }
p { color: var(--site-muted); font-size: .95rem; line-height: 1.6; margin: 0; }
&:nth-last-child(-n+2) { border-bottom: 0; }
&:hover h3 { color: var(--site-link); }
}
.serviceIcon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 15px; background: var(--site-surface); color: var(--site-link); svg { width: 32px; height: 32px; stroke-width: 1.4; } }
.serviceArrow { align-self: start; margin-top: .3rem; color: var(--site-muted); }
.workGrid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: center; }
.projectPlaceholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; aspect-ratio: 1.65; border: 1px dashed var(--bs-steel-blue); border-radius: .75rem; background: radial-gradient(ellipse at bottom left, var(--site-glow), transparent 70%), var(--site-surface); color: var(--site-muted); svg { font-size: 2rem; color: var(--site-link); margin-bottom: .5rem; } span { font-size: .9rem; } small { font-size: .75rem; } }
.workCopy { h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 1.2rem; } > p:not(.pending) { color: var(--site-muted); margin-bottom: 1.5rem; } }
.pending { display: inline-block; border: 1px solid var(--site-line); border-radius: 4px; padding: .25rem .55rem; color: var(--site-muted); font-size: .65rem; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 1rem; }
.textLink { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; font-size: .95rem; font-weight: 650; }
.qualityGrid { display: grid; grid-template-columns: repeat(3, 1fr); }
.quality { display: flex; align-items: start; gap: 1rem; padding-inline: 1.75rem; border-left: 1px solid var(--site-line); &:first-child { padding-left: 0; border: 0; } &:last-child { padding-right: 0; } > svg { flex-shrink: 0; width: 28px; height: 28px; color: var(--site-link); margin-top: .15rem; stroke-width: 1.5; } h3 { font-size: 1rem; margin-bottom: .5rem; } p { font-size: .87rem; color: var(--site-muted); line-height: 1.6; margin: 0; } }
.contact { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: 3.5rem 2rem; margin-block: 1rem 4.5rem; border: 1px solid var(--site-line); border-radius: 1rem; background: radial-gradient(ellipse at top right, var(--site-glow), transparent 65%), var(--site-surface);
&::after { content: ''; position: absolute; z-index: -1; inset: 60% -15% -80%; background: var(--site-glow); border-top: 1px solid var(--site-line); transform: rotate(-18deg); }
h2 { font-size: clamp(1.9rem, 3.7vw, 3rem); margin-bottom: .8rem; }
> p:not(:global(.eyebrow)) { color: var(--site-muted); margin-bottom: 1.8rem; }
}
@media (max-width: 991.98px) {
.hero { gap: 1rem; } .illustration { min-height: 300px; } .diagram { height: 220px; }
.serviceGrid { column-gap: 2rem; } .service { grid-template-columns: 55px 1fr; gap: 1rem; } .serviceIcon { width: 55px; height: 55px; } .serviceArrow { display: none; }
.workGrid { gap: 2rem; } .quality { padding-inline: 1rem; gap: .7rem; }
}
@media (max-width: 767.98px) {
.hero { grid-template-columns: 1fr; padding-block: 3.5rem 3rem; gap: 3rem; }
.heroCopy h1 { font-size: clamp(2.5rem, 8vw, 3.7rem); } .intro { max-width: 48ch; font-size: 1rem; }
.illustration { min-height: 280px; width: min(440px, 92%); margin: 0 auto 1rem; } .diagram { height: 220px; } .integration { bottom: 0; }
.serviceGrid, .workGrid, .qualityGrid { grid-template-columns: 1fr; }
.service { padding-block: 1.25rem; h3 { font-size: 1.1rem; } &:nth-last-child(2) { border-bottom: 1px solid var(--site-line); } }
.services, .work, .why { padding-block: 1.5rem 2rem; }
.sectionLabel { font-size: .75rem; gap: 1rem; margin-bottom: 1rem; }
.workGrid { gap: 1.5rem; } .workCopy h3 br { display: none; }
.quality { padding: 1.25rem 0; border-left: 0; border-bottom: 1px solid var(--site-line); &:first-child { border-bottom: 1px solid var(--site-line); } &:last-child { border-bottom: 0; } h3 { font-size: 1.05rem; } p { font-size: .95rem; } }
.contact { padding: 2.5rem 1.25rem; margin-block: .5rem 3rem; }
}
+22
View File
@@ -0,0 +1,22 @@
import { render, screen, within } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { describe, expect, it } from "vitest";
import Homepage from "./Homepage";
describe("approved homepage composition", () => {
it("offers a single hero action and four services without invented portfolio claims", () => {
render(<MemoryRouter><Homepage /></MemoryRouter>);
const hero = screen.getByRole("region", { name: /software solutions/i });
expect(within(hero).getAllByRole("link")).toHaveLength(1);
expect(within(hero).getByRole("link", { name: "Discuss a Project" })).toHaveAttribute("href", "/contact");
const services = screen.getByRole("region", { name: "What we do" });
expect(within(services).getAllByRole("link")).toHaveLength(4);
const work = screen.getByRole("region", { name: "Featured project" });
expect(within(work).getAllByRole("img")).toHaveLength(1);
expect(within(work).getByText("Featured project pending")).toBeInTheDocument();
expect(within(work).getByRole("link", { name: "Visit Projects" })).toHaveAttribute("href", "/projects");
expect(within(screen.getByRole("region", { name: "Why BortStack" })).getAllByRole("heading", { level: 3 })).toHaveLength(3);
expect(screen.getByRole("link", { name: "Get in Touch" })).toHaveAttribute("href", "/contact");
expect(screen.queryByText(/RouletteBuddy|PitchInvader|testimonial/i)).not.toBeInTheDocument();
});
});
+1 -1
View File
@@ -11,7 +11,7 @@ afterEach(() => vi.unstubAllGlobals());
describe("generic public pages", () => {
it("shows the marketing homepage shell", () => {
render(<MemoryRouter><Homepage /></MemoryRouter>);
expect(screen.getByRole("heading", { name: /software development for real-world needs/i })).toBeInTheDocument();
expect(screen.getByRole("heading", { name: /software solutions/i })).toBeInTheDocument();
});
it("marks legal pages as placeholders", () => {