<?php 
$current_slug = get_post_field('post_name', get_post());

$pages = get_pages_as_array();
$page = getPageForSlug($pages, $current_slug);
$pageID = $page->ID;
$pageTitle = $page->post_title;
$pageSlug = $page->post_name;

if ($page->post_parent !== 0) {
  $parent_page = $pages[$page->post_parent]['page'];
  $pageBG = $parent_page->post_name . '.png';
} else {
  $pageBG = $page->post_name . '.png';
}

?>
<!-- Header Banner -->
<div id="header-banner" class="relative h-24 md:h-56 lg:h-1/3 flex items-center md:justify-center">
  <h1 class="shadow-md px-4 py-2 bg-white bg-opacity-40 text-blue-800 font-medium relative z-20 text-xl md:text-2xl lg:text-center"><?php echo $pageTitle ?></h1>
  <img class="absolute top-0 h-full w-full object-cover" src="<?php echo get_template_directory_uri(); ?>/assets/images/bgs/<?php echo $pageBG; ?>" alt="header-banner">
</div>


<h1 class="max-w-7xl mx-auto font-serif text-2xl text-cadet-900 px-4 lg:px-0 lg:text-4xl my-4"><?php echo $pageTitle ?></h1>

<?php get_template_part('/templates/partials/quick_links'); ?>