feature: Enhance footer with social media links and styling updates
Sync TODOs with Issues / sync_todos (push) Successful in 6s

This commit is contained in:
Keith Solomon
2026-08-23 16:05:31 -05:00
parent 0613e33411
commit e31ed29962
10 changed files with 299 additions and 191 deletions
+66 -19
View File
@@ -25,22 +25,26 @@ $footerNav = ! empty( $locations['footer_navigation'] )
<footer role="contentinfo" class="site-footer">
<div class="container mx-auto py-12">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
<div class="flex flex-col-reverse lg:flex-row justify-between gap-8">
<div class="site-footer__brand max-w-[40ch]">
<h2 class="site-footer__title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php if ( $footerLogo ) { ?>
<img src="<?php echo esc_url( $footerLogo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" />
<?php
} else {
echo esc_html( get_bloginfo( 'name' ) );
}
?>
<?php echo esc_html( get_bloginfo( 'name' ) ); ?>
</a>
</h2>
<?php if ( $footerDesc ) : ?>
<p class="site-footer__desc"><?php echo wp_kses_post( $footerDesc ); ?></p>
<?php endif; ?>
<div class="social-links">
<?php
get_template_part(
'views/partials/social-media',
null,
array(
'circle' => false,
'classes' => 'social-icons p-0 mr-1',
)
);
?>
</div>
</div>
<?php
@@ -57,15 +61,58 @@ $footerNav = ! empty( $locations['footer_navigation'] )
<?php if ( $footerNav ) : ?>
<nav class="site-footer__nav" aria-label="<?php echo esc_attr__( 'Footer navigation', 'ks-portfolio' ); ?>">
<h3><?php echo esc_html__( 'Navigation', 'ks-portfolio' ); ?></h3>
<h3><?php echo esc_html__( 'Quick Links', 'ks-portfolio' ); ?></h3>
<ul>
<?php foreach ( $footerNav as $item ) : ?>
<li>
<a href="<?php echo esc_url( $item->url ); ?>">
<?php echo esc_html( $item->title ); ?>
</a>
</li>
<?php endforeach; ?>
<?php
// Build a tree of parent -> children relationships
$menu_items_by_parent = array();
foreach ( $footerNav as $item ) {
$parent_id = (int) $item->menu_item_parent;
if ( ! isset( $menu_items_by_parent[ $parent_id ] ) ) {
$menu_items_by_parent[ $parent_id ] = array();
}
$menu_items_by_parent[ $parent_id ][] = $item;
}
// Display top-level items (parent = 0)
if ( isset( $menu_items_by_parent[0] ) ) {
foreach ( $menu_items_by_parent[0] as $item ) :
// Check if this is the contact link
$is_contact = false;
if ( function_exists( 'get_field' ) ) {
$contact_link = get_field( 'contact_info.email', 'option' );
if ( $contact_link && strpos( $item->url, 'contact' ) !== false ) {
$is_contact = true;
}
}
?>
<li<?php echo $is_contact ? ' class="site-footer__nav-contact"' : ''; ?>>
<a href="<?php echo esc_url( $item->url ); ?>" class="<?php echo $is_contact ? 'button button-primary' : ''; ?>">
<?php echo esc_html( $item->title ); ?>
</a>
<?php
// Check for child items
$item_id = (int) $item->ID;
if ( isset( $menu_items_by_parent[ $item_id ] ) ) {
?>
<ul class="site-footer__nav-submenu">
<?php foreach ( $menu_items_by_parent[ $item_id ] as $child_item ) : ?>
<li class="site-footer__nav-submenu-item">
<a href="<?php echo esc_url( $child_item->url ); ?>">
<?php echo esc_html( $child_item->title ); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php
}
?>
</li>
<?php
endforeach;
}
?>
</ul>
</nav>
<?php endif; ?>