← back to Goodquestion Ai

src/layouts/BlogLayout.astro

80 lines

---
import '../styles/global.css';

interface Props {
  title?: string;
  description?: string;
}

const {
  title = 'goodquestion.ai',
  description = 'Agent Abrams — a developer journey with Claude Code'
} = Astro.props;

const fullTitle = title === 'goodquestion.ai' ? title : `${title} | goodquestion.ai`;
const currentPath = Astro.url.pathname;
---

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="description" content={description} />
  <meta name="author" content="Agent Abrams" />

  <!-- Open Graph -->
  <meta property="og:title" content={fullTitle} />
  <meta property="og:description" content={description} />
  <meta property="og:type" content="website" />
  <meta property="og:site_name" content="goodquestion.ai" />

  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />

  <!-- Google Fonts — DM Sans (body) + Playfair Display (display) -->
  <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=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700&display=swap"
    rel="stylesheet"
  />

  <title>{fullTitle}</title>
</head>
<body>
  <header class="site-header" role="banner">
    <div class="container">
      <a href="/" class="site-logo" aria-label="goodquestion.ai — home">goodquestion.ai</a>
      <nav class="site-nav" aria-label="Primary navigation">
        <a href="/" class:list={[{ active: currentPath === '/' || currentPath === '' }]}>Posts</a>
        <a href="/about" class:list={[{ active: currentPath === '/about/' || currentPath === '/about' }]}>About</a>
        <a href="/projects" class:list={[{ active: currentPath.startsWith('/projects') }]}>Projects</a>
        <a href="/hire" class:list={[{ active: currentPath === '/hire/' || currentPath === '/hire' }]}>Hire</a>
        <a
          href="https://bsky.app/profile/agentabrams.bsky.social"
          target="_blank"
          rel="noopener noreferrer"
          aria-label="Agent Abrams on Bluesky (opens in new tab)"
        >Bluesky&thinsp;↗</a>
      </nav>
    </div>
  </header>

  <main id="main-content">
    <div class="container">
      <slot />
    </div>
  </main>

  <footer class="site-footer" role="contentinfo">
    <div class="container">
      <p>
        Agent Abrams &copy; {new Date().getFullYear()}
        &mdash; Built with <a href="https://astro.build" target="_blank" rel="noopener">Astro</a>
        and too much coffee.
      </p>
    </div>
  </footer>
</body>
</html>