Sélecteur de fleurs à offrir : Suggestions florales personnalisées selon l’occasion et le mois
<style>
body {
background-color: #ffffff;
}
h2, h3 {
color: #4CAF50;
}
label {
font-weight: bold;
}
select {
padding: 5px;
margin-top: 5px;
}
.flower-card {
display: flex;
align-items: flex-start;
margin: 20px 0;
border-bottom: 1px solid #ddd;
padding-bottom: 15px;
}
.flower-card img {
width: 100px;
height: auto;
margin-right: 15px;
}
.flower-card div {
max-width: 700px;
}
.flower-card h4 {
margin: 0 0 5px 0;
}
.flower-card p {
margin: 2px 0;
}
</style>
<h2> Trouvez la fleur parfaite 🌸</h2>
<p> Choisissez une occasion et un mois pour découvrir des idées de bouquets symboliques pour votre être cher.</p>
<label for="occasion">Occasion:</label>
<select id="occasion" onchange="updateFlower()">
<option value="Birthday"> Anniversaire</option>
<option value="Anniversary"> Anniversaire</option>
<option value="Graduation"> Graduation</option>
<option value="Sympathy"> Sympathie</option>
<option value="Just Because"> Juste parce que</option>
</select>
<label for="month" style="margin-left:20px;">Mois:</label>
<select id="month" onchange="updateFlower()">
<option value="January"> Janvier</option>
<option value="February"> Février</option>
<option value="March"> Mars</option>
<option value="April"> Avril</option>
<option value="May"> Peut</option>
<option value="June"> Juin</option>
<option value="July"> Juillet</option>
<option value="August"> Août</option>
<option value="September"> Septembre</option>
<option value="October"> Octobre</option>
<option value="November"> Novembre</option>
<option value="December"> Décembre </option>
</select>
<div id="result" style="margin-top: 20px;"></div>
<hr style="margin: 30px 0;">
<div>
<h3> Vous cherchez le cadeau idéal pour une femme ?</h3>
<p>Si vous cherchez <strong>un cadeau unique que les femmes apprécient vraiment</strong> , les cadres de fleurs pressées sont une belle et durable expression d'amour et d'attention. Chaque cadre est confectionné à la main avec de vraies fleurs, soigneusement sélectionnées et préservées pour refléter l'émotion de l'occasion : un <strong>cadeau d'anniversaire</strong> , un <strong>souvenir d'anniversaire de mariage</strong> ou un <strong>présent significatif</strong> et vraiment unique.</p>
<p> Nos artisans préservent chaque fleur avec un soin et un savoir-faire exceptionnels, faisant de ces cadeaux non seulement de magnifiques présents, mais aussi profondément personnels. Pour celles et ceux qui recherchent <strong>un cadeau</strong> à la fois beau et touchant, un cadre de fleurs pressées est un choix intemporel.</p>
<p>
<br data-start="1001" data-end="1004">Découvrez <a href="https://driedpetalsgallery.com/collections/wall-art-pressed-flowers-frames" title="art des fleurs pressées"><strong data-start="1016" data-end="1078">des cadres artistiques ornés de véritables pétales de fleurs pressées</strong></a> , soigneusement agencés pour préserver à jamais leur charme délicat et leur beauté symbolique. </p>
<p><img src="https://cdn.shopify.com/s/files/1/0858/4328/0160/files/4b942df0-1f37-11f0-a5bc-03ccdef622ff.jpg?v=1745298651" alt="" width="414" height="414" style="display: block; margin-left: auto; margin-right: auto;"></p>
<p></p>
</div>
<script>
const flowerData = {"January": [{"name": "Carnation", "meaning": "The January Symbol of Love", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Carnation.png?v=1754416591", "description": "Carnations bloom in winter, offering color and cheer. They represent deep love, admiration, and fascination."}, {"name": "Snowdrop", "meaning": "The Sign of Hope", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Snowdrop.png?v=1754416591", "description": "Snowdrops are the first to bloom after snow, symbolizing rebirth, hope, and purity."}], "February": [{"name": "Violet", "meaning": "Faithfulness and Wisdom", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Violet.png?v=1754416591", "description": "Violets grow close to the earth, humble and wise. They symbolize loyalty, humility, and deep spiritual insight."}, {"name": "Primrose", "meaning": "The Flower of Protection", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Primrose.png?v=1754416591", "description": "Primroses are early spring bloomers, known to bring comfort and protect loved ones."}], "March": [{"name": "Daffodil", "meaning": "New Beginnings", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Daffodil.png?v=1754416609", "description": "Daffodils signal spring\u2019s arrival. They are a classic symbol of rebirth, renewal, and fresh starts."}, {"name": "Jonquil", "meaning": "The Flower of Affection", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Jonquil.png?v=1754416612", "description": "Jonquils are fragrant and delicate. They convey affection, desire, and warm sentiments."}], "April": [{"name": "Daisy", "meaning": "Innocence and Purity", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Daisy.png?v=1754416610", "description": "Daisies symbolize new beginnings and childlike joy. Their simple beauty reflects honesty and innocence."}, {"name": "Sweet Pea", "meaning": "Blissful Pleasure", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Sweet_Pea.png?v=1754416610", "description": "Sweet peas are fragrant climbers, evoking gentle memories and kind farewells."}], "May": [{"name": "Lily of the Valley", "meaning": "Return of Happiness", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Lily_of_the_Valley.png?v=1754416611", "description": "These tiny bell-shaped flowers bloom in shade and represent sweetness and renewed joy."}, {"name": "Hawthorn", "meaning": "Hope and Protection", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Hawthorn.png?v=1754416610", "description": "Hawthorn blossoms are often seen in hedgerows and symbolize hope, protection, and love."}], "June": [{"name": "Rose", "meaning": "Love and Passion", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Rose.png?v=1754416612", "description": "Roses are timeless symbols of love, with each color carrying a special message of affection and admiration."}, {"name": "Honeysuckle", "meaning": "Bonds of Affection", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Honeysuckle.png?v=1754416612", "description": "Honeysuckle vines emit sweet fragrance, representing devotion and lasting bonds."}], "July": [{"name": "Larkspur", "meaning": "Lightness and Fun", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Larkspur.png?v=1754416609", "description": "Larkspurs come in vibrant shades and reflect positivity, grace, and an open heart."}, {"name": "Water Lily", "meaning": "Purity of Heart", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Water_Lily.png?v=1754416612", "description": "Floating gently on still waters, water lilies symbolize peace, purity, and spiritual enlightenment."}], "August": [{"name": "Gladiolus", "meaning": "Strength of Character", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Gladiolus.png?v=1754416612", "description": "Tall and bold, gladiolus flowers represent honor, moral integrity, and determination."}, {"name": "Poppy", "meaning": "Remembrance", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Poppy.png?v=1754416612", "description": "Poppies bloom in bright colors and are often used to honor memories and peaceful rest."}], "September": [{"name": "Aster", "meaning": "Wisdom and Love", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Aster.png?v=1754416609", "description": "Asters are daisy-like perennials that symbolize knowledge, patience, and elegance."}, {"name": "Morning Glory", "meaning": "Affection", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Morning_Glory.png?v=1754416611", "description": "Blooming with the sunrise, morning glories express love in its early, hopeful stages."}], "October": [{"name": "Marigold", "meaning": "Warmth and Creativity", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Marigold.png?v=1754416611", "description": "Marigolds glow in rich golds and oranges, symbolizing passion, creativity, and warmth."}, {"name": "Cosmos", "meaning": "Order and Harmony", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Cosmos.png?v=1754416611", "description": "Cosmos flowers represent peace and balance, blooming in a palette of harmonious hues."}], "November": [{"name": "Chrysanthemum", "meaning": "Joy and Optimism", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Chrysanthemum.png?v=1754416591", "description": "Chrysanthemums are known for lasting beauty and cheer. They convey joy, optimism, and loyalty."}, {"name": "Peony", "meaning": "Compassion", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Peony.png?v=1754416611", "description": "Peonies bloom in lush, soft petals and symbolize compassion, prosperity, and romance."}], "December": [{"name": "Narcissus", "meaning": "Renewal and Forgiveness", "image": "https://cdn.shopify.com/s/files/1/0858/4328/0160/files/Narcissus.png?v=1754416612", "description": "Narcissus blooms in winter and reflects hope, inner peace, and the strength to start anew."}, {"name": "Holly", "meaning": "Protection and Defense", "image": "https://image.pollinations.ai/prompt/Holly%20flower", "description": "Holly\u2019s sharp leaves and red berries symbolize safeguarding the home and enduring spirit."}]};
const suggestions = {
"Birthday": "Celebrate her birth month with the flower that represents her essence.",
"Anniversary": "Mark a meaningful milestone with flowers that reflect time and devotion.",
"Graduation": "Honor her achievement with flowers symbolizing growth and new beginnings.",
"Sympathy": "Choose gentle, comforting blooms to express love and remembrance.",
"Just Because": "Delight her with spontaneous beauty that speaks from the heart."
};
function hashValue(str) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = (hash << 5) - hash + str.charCodeAt(i);
hash |= 0;
}
return hash;
}
function updateFlower() {
const month = document.getElementById("month").value;
const occasion = document.getElementById("occasion").value;
const result = document.getElementById("result");
const key = month + "_" + occasion;
const flowers = [...flowerData[month]];
// Sort flowers based on hash
flowers.sort((a, b) => {
return hashValue(a.name + key) - hashValue(b.name + key);
});
let html = `<p><strong>Occasion Tip:</strong> ${ suggestions[occasion] }</p>`;
flowers.forEach(flower => {
html += `
<div class="flower-card">
<img src="${flower.image}" alt="${flower.name}">
<div>
<h4>${flower.name} – ${flower.meaning}</h4>
<p>${flower.description}</p>
</div>
</div>
`;
});
result.innerHTML = html;
}
window.onload = updateFlower;
</script>