first commit
This commit is contained in:
commit
392d55dfd9
37
.gitignore
vendored
Normal file
37
.gitignore
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# Ignorer les volumes Docker de données WordPress
|
||||
|
||||
/db\_data/
|
||||
/wp\_data/
|
||||
|
||||
# Fichiers de logs
|
||||
|
||||
\*.log
|
||||
|
||||
# Fichiers de configuration temporaires
|
||||
|
||||
\*.env
|
||||
|
||||
# OS
|
||||
|
||||
.DS\_Store
|
||||
Thumbs.db
|
||||
|
||||
# Dossiers d'IDE et éditeurs
|
||||
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# Dépendances gérées (si présentes)
|
||||
|
||||
node\_modules/
|
||||
vendor/
|
||||
|
||||
# Cache de SASS
|
||||
|
||||
.sass-cache/
|
||||
|
||||
# Autres fichiers générés
|
||||
|
||||
npm-debug.log\*
|
||||
yarn-debug.log\*
|
||||
yarn-error.log\*
|
||||
3
config/php.ini
Normal file
3
config/php.ini
Normal file
@ -0,0 +1,3 @@
|
||||
upload_max_filesize = 64M
|
||||
post_max_size = 64M
|
||||
memory_limit = 256M
|
||||
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_USER: wpuser
|
||||
WORDPRESS_DB_PASSWORD: wppass
|
||||
WORDPRESS_DB_NAME: wpdb
|
||||
volumes:
|
||||
- ./wp_data:/var/www/html
|
||||
- ./retro-candy-shop:/var/www/html/wp-content/themes/retro-candy-shop
|
||||
- ./config/php.ini:/usr/local/etc/php/conf.d/uploads.ini # Limites personnalisées
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: mariadb:10.11
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_DATABASE: wpdb
|
||||
MYSQL_USER: wpuser
|
||||
MYSQL_PASSWORD: wppass
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
volumes:
|
||||
- ./db_data:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
wp_data:
|
||||
db_data:
|
||||
16
wp-content/themes/retro-candy-shop/footer.php
Normal file
16
wp-content/themes/retro-candy-shop/footer.php
Normal file
@ -0,0 +1,16 @@
|
||||
<footer style="background-color:var(--rose-dragée);text-align:center;padding:2rem;">
|
||||
<p>© <?php echo date('Y'); ?> - <?php bloginfo('name'); ?></p>
|
||||
</footer>
|
||||
<?php wp_footer(); ?>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const toggle = document.querySelector('.nav-toggle');
|
||||
const nav = document.querySelector('.main-nav');
|
||||
toggle.addEventListener('click', function () {
|
||||
nav.classList.toggle('active');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
54
wp-content/themes/retro-candy-shop/front-page.php
Normal file
54
wp-content/themes/retro-candy-shop/front-page.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<!-- <section class="hero">
|
||||
<h2>Bienvenue au Rétro Candy Shop</h2>
|
||||
<p>Découvrez un univers doux et sucré, où gourmandises et convivialité se retrouvent.</p> -->
|
||||
<!-- </section> -->
|
||||
|
||||
<section>
|
||||
<div>
|
||||
<?php echo do_shortcode('[hbupro_banner id="70"]'); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-ui">
|
||||
<div class="sections-container">
|
||||
<?php
|
||||
$args = [
|
||||
'post_type' => 'post',
|
||||
'orderby' => 'menu_order',
|
||||
'order' => 'ASC',
|
||||
'posts_per_page' => -1,
|
||||
'category_name'=>'home'
|
||||
];
|
||||
$query = new WP_Query($args);
|
||||
if ($query->have_posts()) :
|
||||
while ($query->have_posts()) : $query->the_post(); ?>
|
||||
<section class="section-article">
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="section-article-image">
|
||||
<?php the_post_thumbnail('large'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="section-article-content">
|
||||
<h2 class="section-article-title"><?php the_title(); ?></h2>
|
||||
<div class="section-article-body">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-facebook-feed">
|
||||
<h2 style="font-family:var(--font-titre);text-align:center;">Notre actualité Facebook</h2>
|
||||
<div>
|
||||
<?php echo do_shortcode('[custom-facebook-feed]'); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
31
wp-content/themes/retro-candy-shop/functions.php
Normal file
31
wp-content/themes/retro-candy-shop/functions.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
function retro_candy_setup() {
|
||||
add_theme_support('title-tag');
|
||||
add_theme_support('woocommerce');
|
||||
add_theme_support('align-wide');
|
||||
add_theme_support('editor-styles');
|
||||
add_editor_style('style.css');
|
||||
register_nav_menus(['primary' => __('Menu principal', 'retro-candy-shop')]);
|
||||
}
|
||||
add_action('after_setup_theme', 'retro_candy_setup');
|
||||
|
||||
function retro_candy_scripts() {
|
||||
wp_enqueue_style('theme-style', get_stylesheet_uri());
|
||||
wp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css2?family=Great+Vibes&family=Quicksand:wght@400;600;700&display=swap', false);
|
||||
}
|
||||
// Rendre menu_order utilisable pour les articles (post)
|
||||
function add_page_attributes_to_posts() {
|
||||
add_post_type_support('post', 'page-attributes');
|
||||
}
|
||||
function retro_register_menus() {
|
||||
register_nav_menus([
|
||||
'primary' => __('Menu principal', 'retro-candy-shop'),
|
||||
]);
|
||||
}
|
||||
add_action('after_setup_theme', 'retro_register_menus');
|
||||
|
||||
|
||||
add_action('init', 'add_page_attributes_to_posts');
|
||||
|
||||
add_action('wp_enqueue_scripts', 'retro_candy_scripts');
|
||||
?>
|
||||
25
wp-content/themes/retro-candy-shop/header.php
Normal file
25
wp-content/themes/retro-candy-shop/header.php
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo('charset'); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<header class="site-header">
|
||||
<div class="header-top">
|
||||
<button class="nav-toggle" aria-label="Ouvrir le menu">☰</button>
|
||||
<h1 class="site-title"><?php bloginfo('name'); ?></h1>
|
||||
</div>
|
||||
|
||||
<nav class="main-nav">
|
||||
<?php
|
||||
wp_nav_menu([
|
||||
'theme_location' => 'primary',
|
||||
'container' => false,
|
||||
'menu_class' => 'nav-list',
|
||||
]);
|
||||
?>
|
||||
</nav>
|
||||
</header>
|
||||
8
wp-content/themes/retro-candy-shop/index.php
Normal file
8
wp-content/themes/retro-candy-shop/index.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php get_header(); ?>
|
||||
<main class="content">
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
<h2><?php the_title(); ?></h2>
|
||||
<?php the_content(); ?>
|
||||
<?php endwhile; endif; ?>
|
||||
</main>
|
||||
<?php get_footer(); ?>
|
||||
334
wp-content/themes/retro-candy-shop/style.css
Normal file
334
wp-content/themes/retro-candy-shop/style.css
Normal file
@ -0,0 +1,334 @@
|
||||
/*
|
||||
Theme Name: Retro Candy Shop
|
||||
Theme URI: https://example.com
|
||||
Author: Ton Nom
|
||||
Author URI: https://example.com
|
||||
Description: Thème WordPress UI friendly pour boutique de bonbons et salon de thé, compatible Gutenberg et WooCommerce.
|
||||
Version: 1.0
|
||||
Text Domain: retro-candy-shop
|
||||
*/
|
||||
|
||||
:root {
|
||||
--rose-dragée: #FADADD;
|
||||
--menthe-douce: #D5F4E6;
|
||||
--bleu-pastel: #A8D8EA;
|
||||
--jaune-vanille: #FFF5BA;
|
||||
--lavande: #E6E6FA;
|
||||
--blanc-cassé: #FDFCFB;
|
||||
--gris-doux: #A0A0A0;
|
||||
--chocolat-clair: #5C4033;
|
||||
--font-titre: 'Great Vibes', cursive;
|
||||
--font-texte: 'Quicksand', sans-serif;
|
||||
}
|
||||
body {margin:0; font-family:var(--font-texte); background-color:var(--blanc-cassé); color:var(--chocolat-clair);}
|
||||
header {background-color:var(--rose-dragée); text-align:center;}
|
||||
header h1 {font-family:var(--font-titre); font-size:3rem; margin:0; color:var(--chocolat-clair);}
|
||||
/* nav {background-color:var(--menthe-douce); display:flex; justify-content:center; gap:2rem; padding:1rem;}
|
||||
nav a {text-decoration:none; color:var(--chocolat-clair); font-weight:600;} */
|
||||
.hero {background-color:var(--lavande); padding:1rem 1rem; text-align:center;}
|
||||
.hero h2 {font-family:var(--font-titre); font-size:2.5rem; margin-bottom:1rem;}
|
||||
.hero p {max-width:600px; margin:auto; font-size:1.2rem;}
|
||||
.button {background-color:var(--menthe-douce); color:var(--chocolat-clair); border:none; padding:0.8em 1.2em; border-radius:8px; font-weight:bold; font-size:1rem; cursor:pointer; margin-top:2rem;}
|
||||
.button:hover {background-color:var(--bleu-pastel);}
|
||||
.section-ui {padding:2rem; text-align:center;}
|
||||
.woocommerce-wrapper {padding:2rem;}
|
||||
|
||||
/* Tablette : jusqu’à 768px */
|
||||
@media (max-width: 768px) {
|
||||
:root {
|
||||
/* Réduction générale des fontes */
|
||||
--font-titre-size: 2.2rem;
|
||||
--font-hero-size: 2rem;
|
||||
--font-text-size: 1rem;
|
||||
--font-button-size: 0.9rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: var(--font-titre-size);
|
||||
}
|
||||
.site-title{
|
||||
font-size: var(--font-titre-size);
|
||||
}
|
||||
|
||||
.hero h2 {
|
||||
font-size: var(--font-hero-size);
|
||||
}
|
||||
|
||||
.hero p,
|
||||
.section-ui p,
|
||||
.section-article-body {
|
||||
font-size: var(--font-text-size);
|
||||
}
|
||||
|
||||
.button,
|
||||
.nav-list a {
|
||||
font-size: var(--font-button-size);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile : jusqu’à 480px */
|
||||
@media (max-width: 480px) {
|
||||
:root {
|
||||
--font-titre-size: 1.8rem;
|
||||
--font-hero-size: 1.6rem;
|
||||
--font-text-size: 0.9rem;
|
||||
--font-button-size: 0.85rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: var(--font-titre-size);
|
||||
}
|
||||
.site-title{
|
||||
font-size: var(--font-titre-size)!important;
|
||||
}
|
||||
|
||||
.hero h2 {
|
||||
font-size: var(--font-hero-size);
|
||||
}
|
||||
|
||||
.hero p,
|
||||
.section-ui p,
|
||||
.section-article-body {
|
||||
font-size: var(--font-text-size);
|
||||
}
|
||||
|
||||
.button,
|
||||
.nav-list a {
|
||||
font-size: var(--font-button-size);
|
||||
}
|
||||
ul{
|
||||
padding: 0;
|
||||
}
|
||||
.nav-list li{
|
||||
display: block !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* === HEADER GENERAL === */
|
||||
.site-header {
|
||||
background-color: var(--menthe-douce);
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* Ligne du haut (burger + titre) */
|
||||
.header-top {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Bouton menu */
|
||||
.nav-toggle {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 2rem;
|
||||
color: var(--chocolat-clair);
|
||||
position: absolute;
|
||||
left: 1rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
cursor: pointer;
|
||||
display: none; /* visible que sur mobile */
|
||||
}
|
||||
|
||||
/* Titre principal */
|
||||
.site-title {
|
||||
font-family: var(--font-titre);
|
||||
font-size: 2.8rem;
|
||||
margin: 0;
|
||||
color: var(--chocolat-clair);
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Menu principal */
|
||||
.main-nav {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
gap: 2rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.nav-list li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.nav-list a {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: var(--chocolat-clair);
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 8px;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-list a:hover {
|
||||
background-color: var(--bleu-pastel);
|
||||
}
|
||||
|
||||
/* === Responsive mobile === */
|
||||
@media (max-width: 768px) {
|
||||
.nav-toggle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.main-nav {
|
||||
display: none;
|
||||
width: 100%;
|
||||
margin-top: 1rem;
|
||||
background-color: var(--rose-dragée);
|
||||
border-radius: 1rem;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.main-nav.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav-list {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.nav-list li {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav-list a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 0.8rem;
|
||||
background-color: var(--blanc-cassé);
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
|
||||
.nav-list a:hover {
|
||||
background-color: var(--bleu-pastel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.sections-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3rem;
|
||||
margin: 3rem auto;
|
||||
max-width: 1200px; /* élargit sur desktop */
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.section-article {
|
||||
background: var(--blanc-cassé);
|
||||
border-radius: 2rem;
|
||||
box-shadow: 0 4px 32px 0 rgba(140, 110, 85, 0.08);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: stretch;
|
||||
transition: box-shadow 0.18s, background 0.18s;
|
||||
min-height: 240px;
|
||||
border: 1.5px solid var(--rose-dragée);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.section-article:hover {
|
||||
box-shadow: 0 6px 48px 0 rgba(140, 110, 85, 0.14);
|
||||
background: var(--menthe-douce);
|
||||
}
|
||||
|
||||
.section-article-image {
|
||||
flex: 1 1 320px;
|
||||
min-width: 220px;
|
||||
max-width: 400px;
|
||||
background: var(--bleu-pastel);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.section-article-image img {
|
||||
max-width: 100%;
|
||||
max-height: 260px;
|
||||
object-fit: contain;
|
||||
border-radius: 1.3rem;
|
||||
box-shadow: 0 2px 12px #0001;
|
||||
}
|
||||
|
||||
.section-article-content {
|
||||
flex: 2 1 480px;
|
||||
padding: 2.5rem 3rem 2.5rem 2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-width: 250px;
|
||||
}
|
||||
|
||||
.section-article-title {
|
||||
font-family: var(--font-titre);
|
||||
font-size: 2.2rem;
|
||||
margin-bottom: 0.7rem;
|
||||
color: var(--chocolat-clair);
|
||||
}
|
||||
|
||||
.section-article-body {
|
||||
font-size: 1.16rem;
|
||||
line-height: 1.7;
|
||||
color: var(--chocolat-clair);
|
||||
}
|
||||
|
||||
/* --- Responsive mobile --- */
|
||||
@media (max-width: 800px) {
|
||||
.sections-container {
|
||||
max-width: 100vw;
|
||||
gap: 2rem;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.section-article {
|
||||
flex-direction: column;
|
||||
min-height: unset;
|
||||
box-shadow: 0 1px 8px 0 rgba(140,110,85,0.05);
|
||||
border-radius: 1rem;
|
||||
border: none;
|
||||
background: #fff;
|
||||
margin: 0 0.3rem;
|
||||
padding: 0.5rem 0 0.7rem 0;
|
||||
}
|
||||
.section-article-image {
|
||||
max-width: 100%;
|
||||
min-width: 100px;
|
||||
background: transparent;
|
||||
padding: 0.6rem 0 0 0;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.section-article-image img {
|
||||
max-width: 85vw;
|
||||
max-height: 170px;
|
||||
border-radius: 0.8rem;
|
||||
box-shadow: none;
|
||||
}
|
||||
.section-article-content {
|
||||
padding: 0.7rem 1.1rem 1.1rem 1rem;
|
||||
min-width: 0;
|
||||
}
|
||||
.section-article-title {
|
||||
font-size: 1.3rem;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.section-article-body {
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
}
|
||||
5
wp-content/themes/retro-candy-shop/woocommerce.php
Normal file
5
wp-content/themes/retro-candy-shop/woocommerce.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php get_header(); ?>
|
||||
<div class="woocommerce-wrapper">
|
||||
<?php woocommerce_content(); ?>
|
||||
</div>
|
||||
<?php get_footer(); ?>
|
||||
Loading…
Reference in New Issue
Block a user