Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68f13dce91 |
+3
-10
@@ -3,17 +3,14 @@
|
|||||||
function wp_theme_sen2_setup() {
|
function wp_theme_sen2_setup() {
|
||||||
// Enregistrement des menus
|
// Enregistrement des menus
|
||||||
register_nav_menus(array(
|
register_nav_menus(array(
|
||||||
'sidebar' => __('Menu Latéral', 'wp-theme-sen2') // Menu latéral gauche
|
'primary' => __('Menu Principal', 'wp-theme-sen2'), // Menu principal en haut
|
||||||
|
'secondary' => __('Menu Latéral', 'wp-theme-sen2') // Menu secondaire à gauche
|
||||||
));
|
));
|
||||||
|
|
||||||
// Supports du thème
|
// Supports du thème
|
||||||
add_theme_support('post-thumbnails');
|
add_theme_support('post-thumbnails');
|
||||||
add_theme_support('title-tag');
|
add_theme_support('title-tag');
|
||||||
add_theme_support('automatic-feed-links');
|
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');
|
add_action('after_setup_theme', 'wp_theme_sen2_setup');
|
||||||
|
|
||||||
@@ -22,9 +19,6 @@ function wp_theme_sen2_scripts() {
|
|||||||
wp_enqueue_style('wp-theme-sen2-style', get_stylesheet_uri());
|
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;500;600&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');
|
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');
|
add_action('wp_enqueue_scripts', 'wp_theme_sen2_scripts');
|
||||||
|
|
||||||
@@ -38,7 +32,6 @@ function wp_theme_sen2_custom_post_type() {
|
|||||||
'public' => true,
|
'public' => true,
|
||||||
'has_archive' => true,
|
'has_archive' => true,
|
||||||
'supports' => array('title', 'editor', 'thumbnail'),
|
'supports' => array('title', 'editor', 'thumbnail'),
|
||||||
'rewrite' => array('slug' => 'portfolio'),
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
add_action('init', 'wp_theme_sen2_custom_post_type');
|
add_action('init', 'wp_theme_sen2_custom_post_type');
|
||||||
@@ -51,7 +44,7 @@ function wp_theme_sen2_customize_register($wp_customize) {
|
|||||||
));
|
));
|
||||||
|
|
||||||
$wp_customize->add_setting('wp_theme_sen2_slogan', array(
|
$wp_customize->add_setting('wp_theme_sen2_slogan', array(
|
||||||
'default' => 'Moins de bruit, plus d\'âme.',
|
'default' => 'Photographier l\'humain, révéler l\'essentiel.',
|
||||||
'sanitize_callback' => 'sanitize_text_field',
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
+16
-15
@@ -8,32 +8,33 @@
|
|||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
<div class="site-container">
|
<header class="container">
|
||||||
<!-- Menu latéral gauche -->
|
<!-- Menu principal centré en haut -->
|
||||||
<aside class="sidebar">
|
<nav class="main-navigation">
|
||||||
<nav class="sidebar-navigation">
|
<?php wp_nav_menu(array('theme_location' => 'primary')); ?>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="header-content">
|
||||||
|
<!-- Menu secondaire à gauche -->
|
||||||
|
<nav class="secondary-navigation">
|
||||||
<?php
|
<?php
|
||||||
wp_nav_menu(array(
|
wp_nav_menu(array(
|
||||||
'theme_location' => 'sidebar',
|
'theme_location' => 'secondary',
|
||||||
'container' => false,
|
|
||||||
'fallback_cb' => false,
|
'fallback_cb' => false,
|
||||||
'depth' => 1
|
'depth' => 1,
|
||||||
|
'container' => false
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
|
||||||
|
|
||||||
<!-- Contenu principal -->
|
<!-- Logo centré -->
|
||||||
<div class="main-content">
|
|
||||||
<header class="site-header">
|
|
||||||
<div class="site-branding">
|
<div class="site-branding">
|
||||||
<h1 class="site-title">
|
<h1 class="site-title">
|
||||||
<a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
|
<a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
|
||||||
</h1>
|
|
||||||
<?php if (get_theme_mod('wp_theme_sen2_show_slogan', true)) : ?>
|
<?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', 'Moins de bruit, plus d\'âme.')); ?></span>
|
<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; ?>
|
<?php endif; ?>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="site-main">
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function() {
|
|
||||||
// Gestion du menu latéral en mobile si nécessaire
|
|
||||||
const sidebar = document.querySelector('.sidebar');
|
|
||||||
const mainContent = document.querySelector('.main-content');
|
|
||||||
|
|
||||||
// Ajoute une classe pour le mode mobile
|
|
||||||
function checkScreenSize() {
|
|
||||||
if (window.innerWidth <= 768) {
|
|
||||||
document.body.classList.add('mobile-view');
|
|
||||||
} else {
|
|
||||||
document.body.classList.remove('mobile-view');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exécute au chargement et au redimensionnement
|
|
||||||
checkScreenSize();
|
|
||||||
window.addEventListener('resize', checkScreenSize);
|
|
||||||
});
|
|
||||||
@@ -1,150 +1,143 @@
|
|||||||
/*
|
/*
|
||||||
Theme Name: WP Theme SEN2
|
Theme Name: WP Theme SEN2
|
||||||
Version: 1.4.0
|
Version: 1.3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Réinitialisation et base */
|
/* Réinitialisation et base */
|
||||||
:root {
|
|
||||||
--primary-color: #3498DB;
|
|
||||||
--secondary-color: #2C3E50;
|
|
||||||
--text-color: #333333;
|
|
||||||
--light-gray: #F9F9F9;
|
|
||||||
--medium-gray: #E0E0E0;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Montserrat', sans-serif;
|
font-family: 'Montserrat', sans-serif;
|
||||||
background-color: var(--light-gray);
|
background-color: #F9F9F9;
|
||||||
color: var(--text-color);
|
color: #333333;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Structure globale */
|
.container {
|
||||||
.site-container {
|
max-width: 1200px;
|
||||||
display: grid;
|
margin: 0 auto;
|
||||||
grid-template-columns: 200px 1fr;
|
padding: 0 20px;
|
||||||
min-height: 100vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
/* Header et navigation */
|
||||||
background-color: #FFFFFF;
|
header {
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 200px;
|
|
||||||
z-index: 100;
|
|
||||||
border-right: 1px solid var(--medium-gray);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-navigation {
|
||||||
margin-left: 200px;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-header {
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 20px 0;
|
margin-bottom: 20px;
|
||||||
border-bottom: 1px solid var(--medium-gray);
|
border-bottom: 1px solid #EEEEEE;
|
||||||
margin-bottom: 30px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-title {
|
.main-navigation ul {
|
||||||
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 28px;
|
padding: 0;
|
||||||
font-weight: 600;
|
display: flex;
|
||||||
color: var(--secondary-color);
|
justify-content: center;
|
||||||
|
gap: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-title a {
|
.main-navigation a {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
}
|
||||||
|
|
||||||
|
.main-navigation a:hover {
|
||||||
|
color: #E1306C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.secondary-navigation {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-branding {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-slogan {
|
.site-slogan {
|
||||||
display: block;
|
display: block;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #7F8C8D;
|
color: #555555;
|
||||||
margin-top: 10px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Menu latéral */
|
.secondary-navigation ul {
|
||||||
.sidebar-navigation {
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-navigation ul {
|
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-navigation li {
|
.secondary-navigation li {
|
||||||
margin-bottom: 10px;
|
writing-mode: vertical-rl;
|
||||||
|
text-orientation: mixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-navigation a {
|
.secondary-navigation a {
|
||||||
display: block;
|
font-size: 14px;
|
||||||
color: var(--text-color);
|
color: #555555;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 8px 15px;
|
transition: color 0.3s ease;
|
||||||
border-radius: 4px;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-navigation a:hover,
|
.secondary-navigation a:hover {
|
||||||
.sidebar-navigation .current-menu-item a {
|
color: #E1306C;
|
||||||
background-color: var(--primary-color);
|
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive */
|
/* Responsive */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.site-container {
|
.header-content {
|
||||||
grid-template-columns: 1fr;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.secondary-navigation {
|
||||||
position: relative;
|
position: static;
|
||||||
width: 100%;
|
transform: none;
|
||||||
border-right: none;
|
writing-mode: horizontal-tb;
|
||||||
border-bottom: 1px solid var(--medium-gray);
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.secondary-navigation ul {
|
||||||
margin-left: 0;
|
flex-direction: row;
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-navigation ul {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-navigation li {
|
.secondary-navigation li {
|
||||||
margin-bottom: 0;
|
writing-mode: horizontal-tb;
|
||||||
|
text-orientation: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul {
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Galerie et contenu */
|
/* Footer et autres styles (à conserver) */
|
||||||
.site-main {
|
footer {
|
||||||
|
background-color: #F9F9F9;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
text-align: center;
|
||||||
border-top: 1px solid var(--medium-gray);
|
border-top: 1px solid #EEEEEE;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Le reste de ton CSS existant... */
|
||||||
Reference in New Issue
Block a user