<?php
/* Shared site header.
   $root  : path prefix to site root ('' for top-level pages, '../' inside /blogs/)
   $active : current page filename for nav highlighting, e.g. 'about.html'
   Public URLs stay .html; .htaccess serves the matching .php behind the scenes. */
if (!isset($root))   $root = '';
if (!isset($active)) $active = '';
function navlink($href, $label, $root, $active, $extra = '') {
    $cur = ($href === $active) ? ' aria-current="page"' : '';
    echo '<a href="' . $root . $href . '"' . $cur . ($extra ? ' class="' . $extra . '"' : '') . '>' . $label . '</a>';
}
?>
  <header id="hdr">
    <div class="wrap nav">
      <a href="<?php echo $root; ?>index.html" class="logo">TDL<span>.</span>com.my</a>
      <nav class="nav-links" id="navlinks" aria-label="Main navigation">
        <?php
          navlink('index.html','Home',$root,$active);
          navlink('welcome.html','Welcome',$root,$active);
          navlink('about.html','About',$root,$active);
          navlink('mission.html','Mission',$root,$active);
          navlink('philosophy.html','Philosophy',$root,$active);
          navlink('why-us.html','Why Us',$root,$active);
          navlink('blogs.html','Blog',$root,$active);
          navlink('resources.html','Resources',$root,$active);
          navlink('careers.html','Careers',$root,$active);
          navlink('contact-us.html','Contact Us',$root,$active,'nav-cta');
        ?>
      </nav>
      <button class="burger" id="burger" aria-label="Menu" aria-expanded="false">
        <span></span><span></span><span></span>
      </button>
    </div>
  </header>
