Sindbad~EG File Manager

Current Path : /home/j/u/l/julesbu/www/wp-content/themes/Jules_Belamy/
Upload File :
Current File : /home/j/u/l/julesbu/www/wp-content/themes/Jules_Belamy/header.php

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link rel="stylesheet" href="<?php echo get_template_directory_uri() . '/styles/global/normalize.css' ?> ">
    <link rel="stylesheet" href="<?php echo get_template_directory_uri() . '/styles/style.css' ?> ">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="<?php echo get_template_directory_uri() . '/styles/global/reset.css' ?> ">


    <title>
        <?php wp_title(); ?>
    </title>
    <?php wp_head(); ?>
</head>
<?php $header = get_field('header', 'options'); ?>

<body>
    <header class="header">
        <div class="header-container container">
            <div class="header-wrapper">
                <a href="/">

                    <div class="flex flex-row gap-8 items-center">
                        <div class="header_image">
                            <img src="<?php echo $header['image']; ?>" alt="logo" />
                        </div>
                        <div>
                            <p class="header_title">
                                <?php echo $header['title']; ?>
                            </p>
                            <p class="header_subtitle">
                                <?php echo $header['subtitle']; ?>
                            </p>
                        </div>
                    </div>
                </a>

                <?php $links = $header['links']; ?>
                <nav class="header_nav">
                    <ul class="header_links flex gap-40 items-center">
                        <?php foreach ($links as $link): ?>
                            <?php
                            global $wp;
                            $current_url = home_url(add_query_arg(array(), $wp->request));
                            $base_path = parse_url($current_url, PHP_URL_PATH); // Extrait le chemin
                        
                            // Vérifie si l'accueil est actif
                            if ($base_path === '/' || $base_path === '' || $base_path === parse_url(home_url(), PHP_URL_PATH)) {
                                $is_active = ($link['url'] === '/') ? 'active' : '';
                            } else {
                                $is_active = ($base_path === $link['url'] || untrailingslashit($base_path) === untrailingslashit($link['url'])) ? 'active' : '';
                            }
                            ?>
                            <li class="header_link">
                                <a href="<?php echo esc_url($link['url']); ?>"
                                    class="body-2 font-semibold h_animation <?php echo esc_attr($is_active); ?>">
                                    <?php echo esc_html($link['label']); ?>
                                </a>
                            </li>
                        <?php endforeach; ?>
                    </ul>

                </nav>
                <div class="header_desktop-cta">
                    <a href="<?php echo $header['cta']['link']; ?>" class="header_cta cta-button">
                        <?php echo $header['cta']['label']; ?>
                    </a>
                </div>
                <button class="header_burger">
                    <span></span>
                    <span></span>
                    <span></span>
                </button>
            </div>
        </div>
        <div class="header_mobile">

            <div class="header_mobile-container container">
                <div class="header_mobile-wrapper">
                    <div class="header_mobile-links">
                        <ul class="header_mobile-links-list">
                            <?php foreach ($links as $link): ?>
                                <?php
                                global $wp;
                                $current_url = home_url(add_query_arg(array(), $wp->request));
                                $base_path = parse_url($current_url, PHP_URL_PATH); // Extrait le chemin
                            
                                // Vérifie si l'accueil est actif
                                if ($base_path === '/' || $base_path === '' || $base_path === parse_url(home_url(), PHP_URL_PATH)) {
                                    $is_active = ($link['url'] === '/') ? 'active' : '';
                                } else {
                                    $is_active = ($base_path === $link['url'] || untrailingslashit($base_path) === untrailingslashit($link['url'])) ? 'active' : '';
                                }
                                ?>
                                <li class="header_mobile-link body-1 text-purple500">
                                    <a href="<?php echo esc_url($link['url']); ?>"
                                        class="body-2 font-semibold h_animation <?php echo esc_attr($is_active); ?>">
                                        <?php echo esc_html($link['label']); ?>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                    <div class="header_mobile-cta">
                        <a href="<?php echo $header['cta']['link']; ?>" class="header_cta cta-button">
                            <?php echo $header['cta']['label']; ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </header>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists