Source Code for /public/inc/header.php

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="/css/style.css">
  <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
  <link rel="shortcut icon" href="/favicon.ico" />
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
  <meta name="apple-mobile-web-app-title" content="PHP Cookery Class" />
  <link rel="manifest" href="/manifest.json" />
  <style>
    <?php
    // Inject the source code highlighting stylesheet:
    echo \HighlightUtilities\getStyleSheet('atom-one-dark');
    ?>
  </style>
  <title><?php echo strip_tags($full_page_title); ?></title>
  <meta property="og:title" content="Dan Q's PHP Cookery Class" />
  <meta property="og:type" content="website" />
  <meta property="og:url" content="https://php.danq.dev/" />
  <meta property="og:image" content="https://php.danq.dev/og.png" />
  <meta property="og:description" content="Introductory lessons in PHP geared towards Web Revivalists." />
</head>
<body>
  <div class="page">
    <header>
      <a href="/">
        <?php
          /* The SITE_TITLE is a constant defined in functions.php
          * If we DON'T have an individual page title, we'll wrap it in a <h1> so that screen readers know that the site title IS the page title,
          * otherwise we'll just display it in a <p> tag.
          * Our CSS will make these both look the same anyway, but using the right one helps screen readers!
          */
          if( empty( $page_title ) ) {
            echo '<h1 class="title">' . SITE_TITLE . '</h1>';
          } else {
            echo '<p class="title">' . SITE_TITLE . '</p>';
          }
        ?>
        <p class="subtitle">
          An intro to PHP for Web Revivalists
        </p>
      </a>
    </header>

    <?php
    if( ! $hide_navbar ) {
      add_navbar(); /* Adds the <nav> section here! */
    }
    ?>

    <main>
      <?php
      // If we have a page title, display it as a heading here:
      if( ! empty( $page_title ) ) {
        echo '<h1>' . $page_title . '</h1>';
      }
      ?>

      <?php /* Note that we don't need to end the </body> or </html> tags here - that's done in the footer.php file. */ ?>