<?php

function getHeader($pagetitle, $navselect)
{
    include "config.php";
    include "menu.php";

    $menu = getMenu($navselect);
    if (strpos($_SERVER['HTTP_HOST'], '.onion') !== false) {
        $trackURL = $trackURLTor;
    } else {
        $trackURL = $trackURLNormal;
    }

    echo(<<<EOF
    <!DOCTYPE html >
    <html lang = "de" >
    <html >
    <head >
        <meta charset = "UTF-8" >
        <meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
        <title > $pagetitle - Jonas Leder </title >
    
        <link href = "/css/style.css" rel = "stylesheet" >
        <link href = "/css/fas.css" rel = "stylesheet" >
    </head >
    <body >
    <header >
        <div class="header-wrapper" >
            <div class="header-homepage  color-overlay" data - parallax - depth = "20" >
                <div class="header-description gridContainer content-on-center" >
                    <div class="row header-description-row" >
                        <div class="header-content header-content-centered" >
                            <div class="align-holder" >
                                <h1 class="heading8" >$pagetitle</h1 >
                                <p class="header-subtitle" > </p >
                                <div class="header-buttons-wrapper" ></div >
                            </div >
                        </div >
                    </div >
                </div >
            </div >
            <div class="header-separator header-separator-bottom " >
                <svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 1000 100" preserveAspectRatio = "none" >
                    <path class="svg-white-bg" d = "M737.9,94.7L0,0v100h1000V0L737.9,94.7z" ></path >
                </svg >
            </div >
        </div >
        <div id = "mainMenu">$menu</div >
    </header >
    <div id = "content" >
    <!--Matomo Image Tracker -->
    <img src = "$trackURL" style = "border:0" alt = "" />
    <!--End Matomo -->
EOF);
}