revert FEAT: Ajout d'un menu secondaire à dgauche vec liens Contact et À propos
This commit is contained in:
2025-10-08 17:48:06 +02:00
parent 87ebec0e5f
commit 12a449f64c
3 changed files with 11 additions and 122 deletions
-8
View File
@@ -98,12 +98,4 @@ function wp_theme_sen2_check_for_updates($transient) {
} }
return $transient; return $transient;
} }
function wp_theme_sen2_setup() {
register_nav_menus(array(
'primary' => 'Menu Principal',
'secondary' => 'Menu Secondaire' // Nouveau menu
));
add_theme_support('post-thumbnails');
add_theme_support('title-tag');
}
?> ?>
+10 -26
View File
@@ -9,31 +9,15 @@
</head> </head>
<body <?php body_class(); ?>> <body <?php body_class(); ?>>
<header class="container"> <header class="container">
<div class="site-header"> <div class="site-branding">
<!-- Menu secondaire à gauche --> <h1 class="site-title">
<nav class="secondary-navigation"> <a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
<?php <?php if (get_theme_mod('wp_theme_sen2_show_slogan', true)) : ?>
wp_nav_menu(array( <span class="site-slogan"><?php echo esc_html(get_theme_mod('wp_theme_sen2_slogan', 'Photographier l\'humain, révéler l\'essentiel.')); ?></span>
'theme_location' => 'secondary', <?php endif; ?>
'fallback_cb' => false, </h1>
'depth' => 1
));
?>
</nav>
<!-- Logo au centre -->
<div class="site-branding">
<h1 class="site-title">
<a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
<?php if (get_theme_mod('wp_theme_sen2_show_slogan', true)) : ?>
<span class="site-slogan"><?php echo esc_html(get_theme_mod('wp_theme_sen2_slogan', 'Photographier l\'humain, révéler l\'essentiel.')); ?></span>
<?php endif; ?>
</h1>
</div>
<!-- Menu principal à droite -->
<nav class="main-navigation">
<?php wp_nav_menu(array('theme_location' => 'primary')); ?>
</nav>
</div> </div>
<nav class="main-navigation">
<?php wp_nav_menu(array('theme_location' => 'primary')); ?>
</nav>
</header> </header>
+1 -88
View File
@@ -4,7 +4,7 @@ Theme URI: https://ton-site.com/wp-theme-sen2
Author: Nicolas Houzeau Author: Nicolas Houzeau
Author URI: https://ton-site.com Author URI: https://ton-site.com
Description: Un thème sobre et moderne pour portfolio photo, en blanc cassé. Compatible avec Envira Gallery et personnalisable via le Customizer. Description: Un thème sobre et moderne pour portfolio photo, en blanc cassé. Compatible avec Envira Gallery et personnalisable via le Customizer.
Version: 1.1.0 <!-- Ajout d'un menu à doite --> Version: 1.0.0
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
Text Domain: wp-theme-sen2 Text Domain: wp-theme-sen2
*/ */
@@ -87,79 +87,6 @@ header {
.main-navigation a:hover { .main-navigation a:hover {
color: #E1306C; color: #E1306C;
} }
/* Header et navigation */
.site-header {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
position: relative;
}
.site-branding {
position: absolute;
left: 50%;
transform: translateX(-50%);
text-align: center;
margin: 0 auto;
}
.main-navigation {
margin-left: auto; /* Pousse le menu principal à droite */
}
.secondary-navigation {
margin-right: auto; /* Pousse le menu secondaire à gauche */
}
/* Style des menus */
.secondary-navigation ul,
.main-navigation ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
gap: 20px;
}
.secondary-navigation a,
.main-navigation a {
font-family: 'Montserrat', sans-serif;
font-weight: 400;
color: #555555;
text-decoration: none;
transition: color 0.3s ease;
}
.secondary-navigation a:hover,
.main-navigation a:hover {
color: #E1306C;
}
/* Responsive */
@media (max-width: 768px) {
.site-header {
flex-direction: column;
gap: 15px;
position: relative;
}
.site-branding {
position: static;
transform: none;
order: 1;
}
.secondary-navigation {
order: 2;
margin-right: 0;
}
.main-navigation {
order: 3;
margin-left: 0;
}
}
/* Footer */ /* Footer */
footer { footer {
@@ -225,20 +152,6 @@ footer {
background-color: #E1306C; background-color: #E1306C;
} }
/* Responsive */
@media (max-width: 768px) {
.site-header {
flex-direction: column;
gap: 15px;
}
.secondary-navigation {
order: 3;
width: 100%;
justify-content: center;
}
}
/* Page À propos */ /* Page À propos */
.about-banner { .about-banner {
text-align: center; text-align: center;