ceinture-culturelle/header.php
2025-01-10 15:06:39 +01:00

92 lines
2.7 KiB
PHP

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'bg-white text-gray-900 antialiased' ); ?>>
<?php do_action( 'tailpress_site_before' ); ?>
<div id="page" class="min-h-screen flex flex-col">
<?php do_action( 'tailpress_header' ); ?>
<header>
<div class="mx-auto container">
<div class="lg:flex lg:justify-between lg:items-center border-b py-6">
<div class="flex justify-between items-center">
<div>
<?php if ( has_custom_logo() ) { ?>
<?php the_custom_logo(); ?>
<?php } else { ?>
<a href="<?php echo get_bloginfo( 'url' ); ?>" class="font-extrabold text-lg uppercase">
<?php echo get_bloginfo( 'name' ); ?>
</a>
<p class="text-sm font-light text-gray-600">
<?php echo get_bloginfo( 'description' ); ?>
</p>
<?php } ?>
</div>
<div class="lg:hidden">
<a href="#" aria-label="Toggle navigation" id="primary-menu-toggle">
<svg viewBox="0 0 20 20" class="inline-block w-6 h-6" version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd">
<g id="icon-shape">
<path d="M0,3 L20,3 L20,5 L0,5 L0,3 Z M0,9 L20,9 L20,11 L0,11 L0,9 Z M0,15 L20,15 L20,17 L0,17 L0,15 Z"
id="Combined-Shape"></path>
</g>
</g>
</svg>
</a>
</div>
</div>
<div class="menuPart flex gap-4">
<?php
wp_nav_menu(
array(
'container_id' => 'primary-menu',
'container_class' => 'hidden bg-gray-100 mt-4 p-4 lg:mt-0 lg:p-0 lg:bg-transparent lg:block self-center',
'menu_class' => 'lg:flex lg:-mx-4',
'theme_location' => 'primary',
'li_class' => 'lg:mx-4',
'fallback_cb' => false,
)
);
?>
<?php
if (is_user_logged_in()):
$logout_url = wp_logout_url(home_url());
?>
<a href="<?php echo esc_url($logout_url); ?>" class="bg-primary px-4 py-2 rounded-md text-white">Se déconnecter</a>
<?php
else:
?>
<a href="#" class="add-event bg-primary px-4 py-2 rounded-md text-white" disabled>Se connecter</a>
<?php
endif;
?>
</div>
</div>
</div>
</header>
<div id="content" class="site-content flex-grow">
<?php do_action( 'tailpress_content_start' ); ?>
<main>