Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 68f13dce91 |
+3
-10
@@ -3,17 +3,14 @@
|
||||
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 principal en haut
|
||||
'secondary' => __('Menu Latéral', 'wp-theme-sen2') // Menu secondaire à gauche
|
||||
));
|
||||
|
||||
// Supports du thème
|
||||
add_theme_support('post-thumbnails');
|
||||
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');
|
||||
|
||||
@@ -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-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');
|
||||
|
||||
// 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');
|
||||
|
||||
@@ -38,7 +32,6 @@ function wp_theme_sen2_custom_post_type() {
|
||||
'public' => true,
|
||||
'has_archive' => true,
|
||||
'supports' => array('title', 'editor', 'thumbnail'),
|
||||
'rewrite' => array('slug' => 'portfolio'),
|
||||
));
|
||||
}
|
||||
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(
|
||||
'default' => 'Moins de bruit, plus d\'âme.',
|
||||
'default' => 'Photographier l\'humain, révéler l\'essentiel.',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
));
|
||||
|
||||
|
||||
+21
-20
@@ -8,32 +8,33 @@
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
<div class="site-container">
|
||||
<!-- Menu latéral gauche -->
|
||||
<aside class="sidebar">
|
||||
<nav class="sidebar-navigation">
|
||||
<header class="container">
|
||||
<!-- Menu principal centré en haut -->
|
||||
<nav class="main-navigation">
|
||||
<?php wp_nav_menu(array('theme_location' => 'primary')); ?>
|
||||
</nav>
|
||||
|
||||
<div class="header-content">
|
||||
<!-- Menu secondaire à gauche -->
|
||||
<nav class="secondary-navigation">
|
||||
<?php
|
||||
wp_nav_menu(array(
|
||||
'theme_location' => 'sidebar',
|
||||
'container' => false,
|
||||
'theme_location' => 'secondary',
|
||||
'fallback_cb' => false,
|
||||
'depth' => 1
|
||||
'depth' => 1,
|
||||
'container' => false
|
||||
));
|
||||
?>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<!-- Contenu principal -->
|
||||
<div class="main-content">
|
||||
<header class="site-header">
|
||||
<div class="site-branding">
|
||||
<h1 class="site-title">
|
||||
<a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
|
||||
</h1>
|
||||
<!-- Logo centré -->
|
||||
<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', '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; ?>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="site-main">
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -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
|
||||
Version: 1.4.0
|
||||
Version: 1.3.0
|
||||
*/
|
||||
|
||||
/* Réinitialisation et base */
|
||||
:root {
|
||||
--primary-color: #3498DB;
|
||||
--secondary-color: #2C3E50;
|
||||
--text-color: #333333;
|
||||
--light-gray: #F9F9F9;
|
||||
--medium-gray: #E0E0E0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
background-color: var(--light-gray);
|
||||
color: var(--text-color);
|
||||
background-color: #F9F9F9;
|
||||
color: #333333;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Structure globale */
|
||||
.site-container {
|
||||
display: grid;
|
||||
grid-template-columns: 200px 1fr;
|
||||
min-height: 100vh;
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color: #FFFFFF;
|
||||
/* Header et navigation */
|
||||
header {
|
||||
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 {
|
||||
margin-left: 200px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
.main-navigation {
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--medium-gray);
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
.main-navigation ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: var(--secondary-color);
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.site-title a {
|
||||
.main-navigation a {
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
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 {
|
||||
display: block;
|
||||
font-weight: 300;
|
||||
font-size: 16px;
|
||||
color: #7F8C8D;
|
||||
margin-top: 10px;
|
||||
color: #555555;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Menu latéral */
|
||||
.sidebar-navigation {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.sidebar-navigation ul {
|
||||
.secondary-navigation ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.sidebar-navigation li {
|
||||
margin-bottom: 10px;
|
||||
.secondary-navigation li {
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
}
|
||||
|
||||
.sidebar-navigation a {
|
||||
display: block;
|
||||
color: var(--text-color);
|
||||
.secondary-navigation a {
|
||||
font-size: 14px;
|
||||
color: #555555;
|
||||
text-decoration: none;
|
||||
padding: 8px 15px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s ease;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.sidebar-navigation a:hover,
|
||||
.sidebar-navigation .current-menu-item a {
|
||||
background-color: var(--primary-color);
|
||||
color: white;
|
||||
.secondary-navigation a:hover {
|
||||
color: #E1306C;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.site-container {
|
||||
grid-template-columns: 1fr;
|
||||
.header-content {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--medium-gray);
|
||||
.secondary-navigation {
|
||||
position: static;
|
||||
transform: none;
|
||||
writing-mode: horizontal-tb;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sidebar-navigation ul {
|
||||
display: flex;
|
||||
.secondary-navigation ul {
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidebar-navigation li {
|
||||
margin-bottom: 0;
|
||||
.secondary-navigation li {
|
||||
writing-mode: horizontal-tb;
|
||||
text-orientation: initial;
|
||||
}
|
||||
|
||||
.main-navigation ul {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
/* Galerie et contenu */
|
||||
.site-main {
|
||||
/* Footer et autres styles (à conserver) */
|
||||
footer {
|
||||
background-color: #F9F9F9;
|
||||
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;
|
||||
border-top: 1px solid var(--medium-gray);
|
||||
border-top: 1px solid #EEEEEE;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
/* Le reste de ton CSS existant... */
|
||||
Reference in New Issue
Block a user