INIT: Version de base du thème WP Theme SEN2 v1.0.0
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
<footer class="container">
|
||||||
|
<div class="social-icons">
|
||||||
|
<a href="https://www.instagram.com/sen2_fr/" target="_blank" rel="noopener noreferrer" class="instagram-icon">
|
||||||
|
<i class="fab fa-instagram"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<p>© <?php echo date('Y'); ?> <?php bloginfo('name'); ?></p>
|
||||||
|
</footer>
|
||||||
|
//<?php wp_footer(); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
// Configuration de base
|
||||||
|
function wp_theme_sen2_setup() {
|
||||||
|
// Enregistrement des menus
|
||||||
|
register_nav_menus(array(
|
||||||
|
'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
|
||||||
|
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');
|
||||||
|
|
||||||
|
// Chargement des scripts et styles
|
||||||
|
function wp_theme_sen2_scripts() {
|
||||||
|
// Chargement des polices Google
|
||||||
|
wp_enqueue_style('wp-theme-sen2-google-fonts', 'https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');
|
||||||
|
|
||||||
|
// Chargement de Font Awesome
|
||||||
|
wp_enqueue_style('wp-theme-sen2-font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');
|
||||||
|
|
||||||
|
// Chargement du style principal
|
||||||
|
wp_enqueue_style('wp-theme-sen2-style', get_stylesheet_uri());
|
||||||
|
}
|
||||||
|
add_action('wp_enqueue_scripts', 'wp_theme_sen2_scripts');
|
||||||
|
|
||||||
|
// Personnalisation du slogan via Customizer
|
||||||
|
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'),
|
||||||
|
'priority' => 30,
|
||||||
|
));
|
||||||
|
|
||||||
|
$wp_customize->add_setting('wp_theme_sen2_slogan', array(
|
||||||
|
'default' => 'Moins de bruit, plus d\'âme.',
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
));
|
||||||
|
|
||||||
|
$wp_customize->add_control('wp_theme_sen2_slogan_control', array(
|
||||||
|
'label' => __('Slogan', 'wp-theme-sen2'),
|
||||||
|
'section' => 'wp_theme_sen2_slogan_section',
|
||||||
|
'type' => 'text',
|
||||||
|
));
|
||||||
|
}
|
||||||
|
add_action('customize_register', 'wp_theme_sen2_customize_register');
|
||||||
|
|
||||||
|
// Supprimer le footer TurnKey Linux
|
||||||
|
function remove_turnkey_footer() {
|
||||||
|
remove_action('wp_footer', 'turnkey_footer_credit');
|
||||||
|
}
|
||||||
|
add_action('init', 'remove_turnkey_footer');
|
||||||
|
?>
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html <?php language_attributes(); ?>>
|
||||||
|
<head>
|
||||||
|
<meta charset="<?php bloginfo('charset'); ?>">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Montserrat:wght@300;400;600&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
||||||
|
<?php wp_head(); ?>
|
||||||
|
</head>
|
||||||
|
<body <?php body_class(); ?>>
|
||||||
|
<div class="site-wrapper">
|
||||||
|
<!-- Menu horizontal centré en haut -->
|
||||||
|
<nav class="main-navigation">
|
||||||
|
<?php
|
||||||
|
wp_nav_menu(array(
|
||||||
|
'theme_location' => 'primary',
|
||||||
|
'container' => false,
|
||||||
|
'fallback_cb' => false,
|
||||||
|
'depth' => 1
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="site-container">
|
||||||
|
<!-- Menu latéral gauche -->
|
||||||
|
<aside class="sidebar">
|
||||||
|
<header class="site-header">
|
||||||
|
<h1 class="site-title">
|
||||||
|
<a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a>
|
||||||
|
</h1>
|
||||||
|
<?php if (get_theme_mod('wp_theme_sen2_show_slogan', true)) : ?>
|
||||||
|
<p class="site-slogan"><?php echo esc_html(get_theme_mod('wp_theme_sen2_slogan', 'Moins de bruit, plus d\'âme.')); ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<nav class="sidebar-navigation">
|
||||||
|
<?php
|
||||||
|
wp_nav_menu(array(
|
||||||
|
'theme_location' => 'sidebar',
|
||||||
|
'container' => false,
|
||||||
|
'fallback_cb' => false,
|
||||||
|
'depth' => 1
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<footer class="site-footer">
|
||||||
|
<div class="social-icons">
|
||||||
|
<a href="#" class="instagram-icon"><i class="fab fa-instagram"></i></a>
|
||||||
|
</div>
|
||||||
|
<p class="copyright">© <?php echo date('Y'); ?> <?php bloginfo('name'); ?></p>
|
||||||
|
</footer>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Contenu principal -->
|
||||||
|
<main class="main-content">
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php get_header(); ?>
|
||||||
|
|
||||||
|
<div class="content-area">
|
||||||
|
<?php
|
||||||
|
if (have_posts()) :
|
||||||
|
while (have_posts()) : the_post();
|
||||||
|
the_content();
|
||||||
|
endwhile;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php get_footer(); ?>
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
/*
|
||||||
|
Theme Name: WP Theme SEN2 Minimalist
|
||||||
|
Theme URI: https://ton-site.com
|
||||||
|
Author: Nicolas Houzeau
|
||||||
|
Author URI: https://ton-site.com
|
||||||
|
Description: Thème minimaliste avec couleurs coquille d'œuf, police manuscrite et intégration Envira Gallery.
|
||||||
|
Version: 1.0.0
|
||||||
|
License: GNU General Public License v2 or later
|
||||||
|
Text Domain: wp-theme-sen2
|
||||||
|
*/
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--egg-shell: #F5F1E8;
|
||||||
|
--brown-primary: #5E3023;
|
||||||
|
--brown-secondary: #8D6E63;
|
||||||
|
--dark-text: #3E2723;
|
||||||
|
--light-gray: #E0E0E0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
background-color: var(--egg-shell);
|
||||||
|
color: var(--dark-text);
|
||||||
|
line-height: 1.6;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Police manuscrite pour le titre */
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');
|
||||||
|
|
||||||
|
.site-wrapper {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-container {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
min-height: calc(100vh - 120px); /* 60px menu + 60px footer */
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation {
|
||||||
|
background-color: var(--egg-shell);
|
||||||
|
padding: 15px 0;
|
||||||
|
border-bottom: 1px solid var(--light-gray);
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 30px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation a {
|
||||||
|
color: var(--brown-primary);
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation a:hover {
|
||||||
|
color: var(--brown-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-header {
|
||||||
|
padding: 80px 30px 30px; /* 80px pour éviter le chevauchement avec le menu */
|
||||||
|
background-color: var(--egg-shell);
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-title {
|
||||||
|
font-family: 'Dancing Script', cursive;
|
||||||
|
font-size: 48px;
|
||||||
|
color: var(--brown-primary);
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-slogan {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
color: var(--brown-secondary);
|
||||||
|
font-style: italic;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
width: 220px;
|
||||||
|
background-color: var(--egg-shell);
|
||||||
|
padding: 30px 20px;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 60px; /* Hauteur du menu horizontal */
|
||||||
|
bottom: 60px; /* Hauteur du footer */
|
||||||
|
overflow-y: auto;
|
||||||
|
border-right: 1px solid var(--light-gray);
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
margin-left: 220px; /* Largeur du sidebar */
|
||||||
|
flex: 1;
|
||||||
|
padding: 30px;
|
||||||
|
background-color: var(--egg-shell);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-navigation ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-navigation li {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-navigation a {
|
||||||
|
color: var(--dark-text);
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
display: block;
|
||||||
|
padding: 5px 0;
|
||||||
|
border-bottom: 1px solid var(--light-gray);
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-navigation a:hover {
|
||||||
|
color: var(--brown-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Intégration Envira Gallery */
|
||||||
|
.envira-gallery-wrap {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.envira-gallery-item {
|
||||||
|
border: 2px solid var(--egg-shell);
|
||||||
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.envira-gallery-item:hover {
|
||||||
|
transform: scale(1.02);
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
.site-footer {
|
||||||
|
background-color: var(--egg-shell);
|
||||||
|
padding: 20px 30px;
|
||||||
|
text-align: center;
|
||||||
|
border-top: 1px solid var(--light-gray);
|
||||||
|
margin-top: auto;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 220px; /* Aligné avec le sidebar */
|
||||||
|
right: 0;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-icons {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.instagram-icon {
|
||||||
|
color: var(--brown-primary);
|
||||||
|
font-size: 20px;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.instagram-icon:hover {
|
||||||
|
color: var(--brown-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyright {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--dark-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.site-container {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
top: 60px;
|
||||||
|
border-right: none;
|
||||||
|
border-bottom: 1px solid var(--light-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
margin-left: 0;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-navigation ul {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-footer {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user