current progress

This commit is contained in:
prospect
2023-12-26 22:56:58 -05:00
commit 7843c7b084
99 changed files with 42808 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<!-- Page Header -->
<?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'); ?>

View File

@@ -0,0 +1,36 @@
<!-- Quick Links Section -->
<?php
$current_slug = get_post_field('post_name', get_post());
$pages = get_pages_as_array();
$subpages = getSubpagesForSlug($pages, $current_slug);
if (count($subpages) > 0) { ?>
<!-- Quick Links -->
<div class="px-2">
<ul role="list" class="max-w-7xl mx-auto text-blue-500 bg-white border-blue-500 border py-4 mb-4 rounded-md">
<li class="accordion">
<div class="flex px-2 rounded-md justify-between">
<div class="gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold flex items-center align-middle">
<p>Quick Links</p>
</div>
<button class="accordion-toggle">
<i class="fas fa-chevron-down items-center ml-auto rounded-md bg-gray-900 px-2.5 py-2 text-white ring-1 ring-inset ring-gray-700" aria-hidden="true"></i>
<i class="fas fa-times items-center ml-auto rounded-md bg-gray-900 px-3 py-2 text-white ring-1 ring-inset ring-gray-700" aria-hidden="true"></i>
</button>
</div>
<ul class="accordion-content space-y-2">
<?php
foreach ($subpages as $subpage) { ?>
<li class="p-2">
<a href="<?php echo get_site_url() . '/' . $pages[$subpage->post_parent]['page']->post_name . '/' . $subpage->post_name ?>" class="flex space-x-2 items-center"><i class="bi-caret-right-fill"></i>
<p><?php echo $subpage->post_title ?></p>
</a>
</li>
<?php } ?>
</ul>
</li>
</ul>
</div>
<?php }

View File

@@ -0,0 +1,47 @@
<!-- Quick Links Section -->
<?php
require(get_theme_file_path('/includes/front-end/menu_data.php'));
$current_slug = get_post_field('post_name', get_post());
$subcategories = getSubcategoriesBySlug($menuData, $current_slug);
if (count($subcategories) > 0) { ?>
<?php
foreach ($subcategories as $subcategory) {
$content = $subcategory['description'] ?? $subcategory['title']
?>
<div class="px-2">
<ul role="list" class="max-w-7xl mx-auto text-blue-500 bg-white border-blue-500 border py-4 mb-4 rounded-md">
<li class="accordion">
<div class="flex px-2 rounded-md justify-between">
<div class="gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold flex items-center align-middle">
<p><?php echo $subcategory['title']; ?></p>
</div>
<button class="accordion-toggle">
<i class="fas fa-chevron-down items-center ml-auto rounded-md bg-gray-900 px-2.5 py-2 text-white ring-1 ring-inset ring-gray-700" aria-hidden="true"></i>
<i class="fas fa-times items-center ml-auto rounded-md bg-gray-900 px-3 py-2 text-white ring-1 ring-inset ring-gray-700" aria-hidden="true"></i>
</button>
</div>
<ul class="accordion-content space-y-2">
<li class="p-2">
<a href="<?php echo get_site_url() . '/' . $current_slug . '/' . $subcategory['slug'] ?>" class="flex space-x-2 items-center"><i class="bi-caret-right-fill"></i>
<p><?php echo $content ?></p>
</a>
</li>
</ul>
</li>
</ul>
</div>
<?php }
}

View File

@@ -0,0 +1,38 @@
<!-- Quick Links Section -->
<?php
$current_slug = get_post_field('post_name', get_post());
$pages = get_pages_as_array();
$subpages = getSubpagesForSlug($pages, $current_slug);
if (count($subpages) > 0) { ?>
<!-- Sub Level Pages Section -->
<div class="p-4 lg:h-full">
<ul class="grid grid-cols-1 lg:grid-cols-2 gap-2 lg:h-full place-items-stretch">
<?php
foreach ($subpages as $subpage) {
$pageID = $subpage->ID;
?>
<li class="category-cards flex rounded-md shadow-md relative overflow-hidden w-full" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/bgs/<?php echo $subpage->post_name ?>.png');">
<a class="w-full py-8 px-8 space-y-2 lg:flex lg:flex-col lg:items-center lg:justify-center" href="<?php echo get_site_url() . '/' . $pages[$subpage->post_parent]['page']->post_name . '/' . $subpage->post_name ?>">
<h2 class="font-bold uppercase"><?php echo $subpage->post_title ?></h2>
<?php if (get_field('description', $pageID) != '') { ?>
<p class="lg:text-center"><?php echo get_field('description', $pageID); ?></p>
<?php } ?>
</a>
</li>
<?php } ?>
</ul>
</div>
<?php }