From e0e11a5c0c50c7cc9e001803c785e9ae2897d622 Mon Sep 17 00:00:00 2001 From: Nicolas Houzeau Date: Wed, 8 Oct 2025 20:26:51 +0000 Subject: [PATCH] =?UTF-8?q?FEAT:=20Design=20final=20avec=20menu=20lat?= =?UTF-8?q?=C3=A9ral=20gauche=20et=20menu=20horizontal=20-=20v1.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 36 ++++------- header.php | 64 +++++++++++-------- style.css | 170 ++++++++++++++++++++++++++++++++------------------ 3 files changed, 158 insertions(+), 112 deletions(-) diff --git a/functions.php b/functions.php index c4602a1..98aed9b 100644 --- a/functions.php +++ b/functions.php @@ -3,7 +3,8 @@ function wp_theme_sen2_setup() { // Enregistrement des menus register_nav_menus(array( - 'sidebar' => __('Menu Latéral', 'wp-theme-sen2') // Menu latéral gauche + 'primary' => __('Menu Principal', 'wp-theme-sen2'), // Menu horizontal en haut + 'sidebar' => __('Menu Latéral', 'wp-theme-sen2') // Menu latéral gauche )); // Supports du thème @@ -11,39 +12,18 @@ function wp_theme_sen2_setup() { add_theme_support('title-tag'); add_theme_support('automatic-feed-links'); add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption')); - - // Largeur des images pour le thème - add_theme_support('align-wide'); } add_action('after_setup_theme', 'wp_theme_sen2_setup'); // Chargement des scripts et styles function wp_theme_sen2_scripts() { wp_enqueue_style('wp-theme-sen2-style', get_stylesheet_uri()); - wp_enqueue_style('wp-theme-sen2-google-fonts', 'https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap'); + wp_enqueue_style('wp-theme-sen2-google-fonts', 'https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap'); wp_enqueue_style('wp-theme-sen2-font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css'); - - // Script pour le menu latéral (si besoin) - wp_enqueue_script('wp-theme-sen2-script', get_template_directory_uri() . '/js/script.js', array(), '1.0.0', true); } add_action('wp_enqueue_scripts', 'wp_theme_sen2_scripts'); -// Custom Post Type pour Portfolio -function wp_theme_sen2_custom_post_type() { - register_post_type('portfolio', array( - 'labels' => array( - 'name' => __('Portfolio', 'wp-theme-sen2'), - 'singular_name' => __('Projet', 'wp-theme-sen2') - ), - 'public' => true, - 'has_archive' => true, - 'supports' => array('title', 'editor', 'thumbnail'), - 'rewrite' => array('slug' => 'portfolio'), - )); -} -add_action('init', 'wp_theme_sen2_custom_post_type'); - -// Personnalisation du slogan via Customizer +// Personnalisation du slogan function wp_theme_sen2_customize_register($wp_customize) { $wp_customize->add_section('wp_theme_sen2_slogan_section', array( 'title' => __('Slogan du site', 'wp-theme-sen2'), @@ -62,4 +42,10 @@ function wp_theme_sen2_customize_register($wp_customize) { )); } add_action('customize_register', 'wp_theme_sen2_customize_register'); -?> \ No newline at end of file + +// Supprimer le footer TurnKey Linux +function remove_turnkey_footer() { + remove_action('wp_footer', 'turnkey_footer_credit'); +} +add_action('init', 'remove_turnkey_footer'); +?> diff --git a/header.php b/header.php index 1778c04..dbd719c 100644 --- a/header.php +++ b/header.php @@ -3,37 +3,51 @@ - + > -
- - +
+ + - -
- -
\ No newline at end of file + + + + + + +
+
diff --git a/style.css b/style.css index 9ec2ab8..fe07cd2 100644 --- a/style.css +++ b/style.css @@ -1,15 +1,15 @@ /* Theme Name: WP Theme SEN2 -Version: 1.4.0 +Version: 1.5.0 */ -/* Réinitialisation et base */ :root { - --primary-color: #3498DB; - --secondary-color: #2C3E50; + --primary-color: #2C3E50; + --secondary-color: #3498DB; --text-color: #333333; --light-gray: #F9F9F9; --medium-gray: #E0E0E0; + --dark-gray: #7F8C8D; } body { @@ -22,59 +22,94 @@ body { } /* Structure globale */ -.site-container { - display: grid; - grid-template-columns: 200px 1fr; +.site-wrapper { min-height: 100vh; + display: flex; + flex-direction: column; +} + +.site-container { + display: flex; + flex: 1; } .sidebar { - background-color: #FFFFFF; - padding: 20px 0; + width: 250px; + background-color: white; + padding: 30px 20px; position: fixed; left: 0; - top: 0; + top: 60px; /* Espace pour le menu horizontal */ bottom: 0; - width: 200px; - z-index: 100; + overflow-y: auto; border-right: 1px solid var(--medium-gray); + z-index: 10; } .main-content { - margin-left: 200px; - padding: 20px; + margin-left: 250px; /* Même largeur que le sidebar */ + flex: 1; + padding: 30px; } -.site-header { - text-align: center; - padding: 20px 0; +.main-navigation { + position: fixed; + top: 0; + left: 0; + right: 0; + background-color: white; + padding: 15px 0; border-bottom: 1px solid var(--medium-gray); - margin-bottom: 30px; + z-index: 20; } -.site-title { +.main-navigation ul { + list-style: none; margin: 0; - font-size: 28px; + padding: 0; + display: flex; + justify-content: center; + gap: 30px; + flex-wrap: wrap; +} + +.main-navigation a { + color: var(--primary-color); + text-decoration: none; font-weight: 600; + font-size: 16px; + text-transform: uppercase; + letter-spacing: 0.5px; + transition: color 0.3s ease; +} + +.main-navigation a:hover { color: var(--secondary-color); } -.site-title a { - text-decoration: none; - color: inherit; +.sidebar-header { + margin-bottom: 30px; + text-align: center; +} + +.site-author { + margin: 0; + font-size: 24px; + font-weight: 700; + color: var(--primary-color); } .site-slogan { - display: block; + margin: 10px 0 0; + font-size: 14px; font-weight: 300; - font-size: 16px; - color: #7F8C8D; - margin-top: 10px; + color: var(--dark-gray); + font-style: italic; } /* Menu latéral */ .sidebar-navigation { - padding: 0 20px; + margin-bottom: 30px; } .sidebar-navigation ul { @@ -84,67 +119,78 @@ body { } .sidebar-navigation li { - margin-bottom: 10px; + margin-bottom: 15px; } .sidebar-navigation a { - display: block; color: var(--text-color); text-decoration: none; - padding: 8px 15px; - border-radius: 4px; - transition: all 0.3s ease; + font-weight: 500; + font-size: 16px; + display: block; + padding: 5px 0; + border-bottom: 1px solid var(--medium-gray); + transition: color 0.3s ease; } -.sidebar-navigation a:hover, -.sidebar-navigation .current-menu-item a { - background-color: var(--primary-color); - color: white; +.sidebar-navigation a:hover { + color: var(--secondary-color); +} + +/* Footer dans le sidebar */ +.sidebar-footer { + margin-top: auto; + text-align: center; + padding-top: 20px; + border-top: 1px solid var(--medium-gray); +} + +.instagram-icon { + color: var(--primary-color); + font-size: 20px; + margin-bottom: 10px; + display: block; +} + +.copyright { + margin: 0; + font-size: 12px; + color: var(--dark-gray); +} + +/* Contenu principal */ +.site-main { + padding: 20px 0; } /* Responsive */ @media (max-width: 768px) { .site-container { - grid-template-columns: 1fr; + flex-direction: column; } .sidebar { position: relative; width: 100%; + top: 60px; border-right: none; border-bottom: 1px solid var(--medium-gray); } .main-content { margin-left: 0; + padding: 20px; } - .sidebar-navigation ul { - display: flex; - justify-content: center; - gap: 20px; - padding: 0; - } - - .sidebar-navigation li { - margin-bottom: 0; + .main-navigation ul { + flex-direction: column; + gap: 15px; + text-align: center; } } -/* Galerie et contenu */ -.site-main { - padding: 20px 0; -} - +/* Galerie */ .envira-gallery-wrap { - margin-left: 0; /* Alignement avec le menu latéral */ -} - -/* Footer */ -.site-footer { - background-color: var(--light-gray); - padding: 30px 0; - text-align: center; - border-top: 1px solid var(--medium-gray); - margin-top: 40px; + margin: 0; + padding: 0; }