Compare commits
14 Commits
main
...
Jade-Front
Author | SHA1 | Date |
---|---|---|
|
ced39abea8 | 3 days ago |
|
0bbd984d79 | 5 days ago |
|
3b314f30e5 | 5 days ago |
|
ca6702ea60 | 5 days ago |
|
edc8730198 | 5 days ago |
|
e29f03a55f | 5 days ago |
![]() |
44309c2b9b | 1 week ago |
![]() |
36893c8bc8 | 1 week ago |
|
0eda4940bc | 1 week ago |
|
7b488dc14c | 1 week ago |
|
a12876480e | 1 week ago |
|
ecf9673e5d | 1 week ago |
|
60b3a1a445 | 1 week ago |
|
4baddf303b | 2 weeks ago |
@ -0,0 +1 @@
|
|||||||
|
8.3
|
@ -1,29 +0,0 @@
|
|||||||
framework:
|
|
||||||
messenger:
|
|
||||||
failure_transport: failed
|
|
||||||
|
|
||||||
transports:
|
|
||||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
|
||||||
async:
|
|
||||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
|
||||||
options:
|
|
||||||
use_notify: true
|
|
||||||
check_delayed_interval: 60000
|
|
||||||
retry_strategy:
|
|
||||||
max_retries: 3
|
|
||||||
multiplier: 2
|
|
||||||
failed: 'doctrine://default?queue_name=failed'
|
|
||||||
# sync: 'sync://'
|
|
||||||
|
|
||||||
default_bus: messenger.bus.default
|
|
||||||
|
|
||||||
buses:
|
|
||||||
messenger.bus.default: []
|
|
||||||
|
|
||||||
routing:
|
|
||||||
Symfony\Component\Mailer\Messenger\SendEmailMessage: async
|
|
||||||
Symfony\Component\Notifier\Message\ChatMessage: async
|
|
||||||
Symfony\Component\Notifier\Message\SmsMessage: async
|
|
||||||
|
|
||||||
# Route your messages to the transports
|
|
||||||
# 'App\Message\YourMessage': async
|
|
@ -0,0 +1,248 @@
|
|||||||
|
body {
|
||||||
|
background-color: #314e57;
|
||||||
|
font-family: 'Georgia', serif;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
text-shadow: 2px 2px 4px #000;
|
||||||
|
color: #f8b435;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 30px;
|
||||||
|
margin-bottom: 10rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card {
|
||||||
|
background: #f2e6c9;
|
||||||
|
width: 180px;
|
||||||
|
height: 220px;
|
||||||
|
border: 4px solid #000;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 0 20px rgba(0,0,0,0.5);
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
font-family: 'Georgia', serif;
|
||||||
|
position: relative;
|
||||||
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card:hover {
|
||||||
|
transform: translateY(-8px) scale(1.03);
|
||||||
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animation brillance pour rareté légendaire */
|
||||||
|
@keyframes shine {
|
||||||
|
0% { background-position: 0px; }
|
||||||
|
100% { background-position: 177px; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card.gold {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card.gold::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 1%;
|
||||||
|
width: 98%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
120deg,
|
||||||
|
rgba(255, 255, 255, 0) 0%,
|
||||||
|
rgba(255, 255, 255, 0.5) 50%,
|
||||||
|
rgba(255, 255, 255, 0) 100%
|
||||||
|
);
|
||||||
|
animation: shine 5s infinite;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card > * {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------------------*/
|
||||||
|
|
||||||
|
.emoji-card.gray { border-color: gray; }
|
||||||
|
|
||||||
|
@keyframes auraGlow {
|
||||||
|
0% { box-shadow: 0 0 10px 0 rgba(0,0,0,0.3); }
|
||||||
|
50% { box-shadow: 0 0 25px 8px currentColor; }
|
||||||
|
100% { box-shadow: 0 0 10px 0 rgba(0,0,0,0.3); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Applique une animation d'aura par rareté */
|
||||||
|
.emoji-card.green {
|
||||||
|
color: darkgreen;
|
||||||
|
animation: auraGlow 3s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card.purple {
|
||||||
|
color: purple;
|
||||||
|
animation: auraGlow 3s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card.red {
|
||||||
|
color: darkred;
|
||||||
|
animation: auraGlow 3s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-card.gold {
|
||||||
|
color: goldenrod;
|
||||||
|
animation: auraGlow 3s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Couleurs des noms selon rareté */
|
||||||
|
.emoji-name.green { color: darkgreen; }
|
||||||
|
.emoji-name.purple { color: purple; }
|
||||||
|
.emoji-name.red { color: darkred; }
|
||||||
|
.emoji-name.gold { color: goldenrod; }
|
||||||
|
.emoji-name.gray { color: gray; }
|
||||||
|
|
||||||
|
.emoji-card .emoji {
|
||||||
|
font-size: 50px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-name {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
margin-top: 5px;
|
||||||
|
color: purple;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-level {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #3c2f2f;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-buttons {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 60px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background: #f2e6c9;
|
||||||
|
border: 3px solid #000;
|
||||||
|
padding: 10px 25px;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.2s ease;
|
||||||
|
box-shadow: 3px 3px 0 #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
transform: scale(1.05);
|
||||||
|
background-color: #e5d6b8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
right: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup {
|
||||||
|
position: absolute;
|
||||||
|
top: 110%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
background: #fff8e1;
|
||||||
|
color: #000;
|
||||||
|
padding: 10px;
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
||||||
|
display: none;
|
||||||
|
z-index: 10;
|
||||||
|
width: 180px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Filtre et Tri*/
|
||||||
|
.filter-bar {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
color: #f8f5e0;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-bar select {
|
||||||
|
margin: 0 10px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 2px solid #000;
|
||||||
|
background: #f2e6c9;
|
||||||
|
font-family: 'Georgia', serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Champs de Recherche */
|
||||||
|
.filter-bar input[type="text"] {
|
||||||
|
padding: 5px 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 2px solid #000;
|
||||||
|
background: #f2e6c9;
|
||||||
|
font-family: 'Georgia', serif;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style séléction créature pour combat / accouplement */
|
||||||
|
|
||||||
|
/* Etat séléctionné */
|
||||||
|
.emoji-card.selected {
|
||||||
|
outline: 4px solid #f8b435;
|
||||||
|
outline-offset: -4px;
|
||||||
|
box-shadow: 0 0 30px 10px rgba(248, 180, 53, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
#selection-status {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #f9e8c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-visual {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 15px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.creature-tag {
|
||||||
|
padding: 8px 15px;
|
||||||
|
background: #f2e6c9;
|
||||||
|
border: 2px solid #000;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
box-shadow: 2px 2px 0 #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vs-text {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
After Width: | Height: | Size: 2.1 MiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 2.1 MiB |
After Width: | Height: | Size: 1.2 MiB |
@ -0,0 +1,54 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const left = document.querySelector('.left-emoji');
|
||||||
|
const right = document.querySelector('.right-emoji');
|
||||||
|
const winnerText = document.getElementById('winner-text');
|
||||||
|
|
||||||
|
const winnerSide = window.winnerSide;
|
||||||
|
const loserSide = window.loserSide;
|
||||||
|
|
||||||
|
function insertEmojiOrImage(el) {
|
||||||
|
const value = el.dataset.content;
|
||||||
|
if (/^https?:\/\//.test(value)) {
|
||||||
|
const img = document.createElement('img');
|
||||||
|
img.src = value;
|
||||||
|
img.className = 'emoji-img';
|
||||||
|
el.appendChild(img);
|
||||||
|
} else {
|
||||||
|
el.textContent = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
insertEmojiOrImage(left);
|
||||||
|
insertEmojiOrImage(right);
|
||||||
|
|
||||||
|
left.classList.add('slide-in-left');
|
||||||
|
right.classList.add('slide-in-right');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
left.style.left = '100px';
|
||||||
|
right.style.left = '300px';
|
||||||
|
|
||||||
|
left.classList.add('fight-animation');
|
||||||
|
right.classList.add('fight-animation');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
left.classList.remove('fight-animation');
|
||||||
|
right.classList.remove('fight-animation');
|
||||||
|
|
||||||
|
const loser = loserSide === 'left' ? left : right;
|
||||||
|
loser.classList.add('loser-fly-up');
|
||||||
|
const winner = winnerSide === 'left' ? left : right;
|
||||||
|
winner.classList.add('winner-center', 'winner-crown');
|
||||||
|
|
||||||
|
let name = winner.dataset.content;
|
||||||
|
//check if name is an image URL or an emoji
|
||||||
|
if (/^https?:\/\//.test(name)) {
|
||||||
|
winnerText.innerHTML = `<img src="${name}" style="width:64px">a gagné ! 🎉`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
winnerText.textContent = `${name} a gagné ! 🎉`;
|
||||||
|
}
|
||||||
|
winnerText.style.display = 'block';
|
||||||
|
}, 1500);
|
||||||
|
}, 3000);
|
||||||
|
});
|
@ -0,0 +1,52 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const left = document.querySelector('.left-emoji');
|
||||||
|
const right = document.querySelector('.right-emoji');
|
||||||
|
const childText = document.getElementById('child-text');
|
||||||
|
const heartGif = document.getElementById('heart-gif');
|
||||||
|
|
||||||
|
|
||||||
|
function insertEmojiOrImage(el) {
|
||||||
|
const value = el.dataset.content;
|
||||||
|
if (/^https?:\/\//.test(value)) {
|
||||||
|
const img = document.createElement('img');
|
||||||
|
img.src = value;
|
||||||
|
img.className = 'emoji-img';
|
||||||
|
el.appendChild(img);
|
||||||
|
} else {
|
||||||
|
el.textContent = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
insertEmojiOrImage(left);
|
||||||
|
insertEmojiOrImage(right);
|
||||||
|
|
||||||
|
left.classList.add('slide-in-left');
|
||||||
|
right.classList.add('slide-in-right');
|
||||||
|
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
|
||||||
|
|
||||||
|
if (/^https?:\/\//.test(child_emoji)) {
|
||||||
|
emojiHtml = `
|
||||||
|
<div class="emoji-glow-img">
|
||||||
|
<img src="${child_emoji}" style="width:64px; height:64px">
|
||||||
|
</div>`;
|
||||||
|
} else {
|
||||||
|
emojiHtml = `
|
||||||
|
<span class="emoji-glow-text" data-emoji="${child_emoji}">${child_emoji}</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
childText.innerHTML = `
|
||||||
|
<div class="emoji-wrapper">
|
||||||
|
${emojiHtml}
|
||||||
|
|
||||||
|
</div>`;
|
||||||
|
childText.classList.add('growing-animation');
|
||||||
|
childText.style.display = 'block';
|
||||||
|
heartGif.style.display = 'block';
|
||||||
|
heartGif.classList.add('fade-in');
|
||||||
|
|
||||||
|
|
||||||
|
}, 3000);
|
||||||
|
});
|
@ -0,0 +1,132 @@
|
|||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-image: url("../media/boxing_ring.jpg");
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arena {
|
||||||
|
position: relative;
|
||||||
|
width: 400px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
font-size: 5rem;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-img {
|
||||||
|
width: 5rem;
|
||||||
|
height: 5rem;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winner-center .emoji-img {
|
||||||
|
width: 6rem;
|
||||||
|
height: 6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loser-fly-up .emoji-img {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-emoji {
|
||||||
|
left: -100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-emoji {
|
||||||
|
left: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideInLeft {
|
||||||
|
to {
|
||||||
|
left: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideInRight {
|
||||||
|
to {
|
||||||
|
left: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-in-left {
|
||||||
|
animation: slideInLeft 3s forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-in-right {
|
||||||
|
animation: slideInRight 3s forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fightShake {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
transform: translate(-50%, -50%) translateX(0);
|
||||||
|
}
|
||||||
|
20%,
|
||||||
|
60% {
|
||||||
|
transform: translate(-50%, -50%) translateX(-15px);
|
||||||
|
}
|
||||||
|
40%,
|
||||||
|
80% {
|
||||||
|
transform: translate(-50%, -50%) translateX(15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fight-animation {
|
||||||
|
animation: fightShake 0.5s 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes flyUpFade {
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(-50%, calc(-150px - 50%));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.loser-fly-up {
|
||||||
|
animation: flyUpFade 3s forwards;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes moveToCenter {
|
||||||
|
to {
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.winner-center {
|
||||||
|
animation: moveToCenter 1s forwards;
|
||||||
|
position: absolute !important;
|
||||||
|
top: 50% !important;
|
||||||
|
font-size: 6rem;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winner-crown::after {
|
||||||
|
content: "👑";
|
||||||
|
position: absolute;
|
||||||
|
top: -1.5rem;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#winner-text {
|
||||||
|
margin-top: 1rem;
|
||||||
|
font-size: 2rem;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
@ -0,0 +1,154 @@
|
|||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-image: url("../media/champ_amour.webp");
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field {
|
||||||
|
position: relative;
|
||||||
|
width: 400px;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
font-size: 5rem;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-img {
|
||||||
|
width: 5rem;
|
||||||
|
height: 5rem;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-emoji {
|
||||||
|
left: -100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-emoji {
|
||||||
|
left: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideInLeft {
|
||||||
|
to {
|
||||||
|
left: 200px;
|
||||||
|
opacity:0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideInRight {
|
||||||
|
to {
|
||||||
|
left: 200px;
|
||||||
|
opacity:0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-in-left {
|
||||||
|
animation: slideInLeft 3s forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-in-right {
|
||||||
|
animation: slideInRight 3s forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes Fade {
|
||||||
|
to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fading-animation {
|
||||||
|
animation: Fade 3s forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes growing {
|
||||||
|
to {
|
||||||
|
transform: scale(5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.growing-animation {
|
||||||
|
animation: growing 5s forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
#child-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-glow-text {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-glow-text::before {
|
||||||
|
content: attr(data-emoji);
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
filter: blur(1px) brightness(10);
|
||||||
|
opacity: 0.9;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-glow-img {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji-glow-img::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
filter: blur(1px) brightness(10);
|
||||||
|
opacity: 0.9;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.birth-text{
|
||||||
|
font-size: 2rem;
|
||||||
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#heart-gif{
|
||||||
|
position: absolute;
|
||||||
|
display:none;
|
||||||
|
background-image: url("../media/hearts.gif");
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 30vw;
|
||||||
|
height: 50vh;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
|
class CombatController extends AbstractController
|
||||||
|
{
|
||||||
|
// Route designed for testing purposes
|
||||||
|
#[Route('/combat', name: 'app_combat')]
|
||||||
|
public function index(): Response
|
||||||
|
{
|
||||||
|
|
||||||
|
$leftEmoji = '🐱';
|
||||||
|
$rightEmoji = '🐶';
|
||||||
|
$winner = 'left'; // or 'right'
|
||||||
|
$loser = ($winner === 'left') ? 'right' : 'left';
|
||||||
|
|
||||||
|
return $this->render('combat/index.html.twig', [
|
||||||
|
'left_emoji' => $leftEmoji,
|
||||||
|
'right_emoji' => $rightEmoji,
|
||||||
|
'winner' => $winner,
|
||||||
|
'loser' => $loser,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function isEmoji(string $str): bool {
|
||||||
|
$emojiRegex = '/^\X$/u';
|
||||||
|
return preg_match($emojiRegex, $str) === 1 && mb_strlen($str, 'UTF-8') === 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('/combat-{leftEmoji}-{rightEmoji}-{winner}', name: 'app_combat_with_params', requirements: ['leftEmoji' => '.+', 'rightEmoji' => '.+'])]
|
||||||
|
public function combatWithParams(string $leftEmoji, string $rightEmoji, string $winner): Response
|
||||||
|
// Example : /combat-🐱-🐶-left
|
||||||
|
// or /combat-🐌_☀%EF%B8%8F-🐌_☀%EF%B8%8F-left
|
||||||
|
{
|
||||||
|
$loser = ($winner === 'left') ? 'right' : 'left';
|
||||||
|
// Validate emoji
|
||||||
|
|
||||||
|
if (!$this->isEmoji($leftEmoji)) {
|
||||||
|
$leftEmoji = 'https://emojik.vercel.app/s/' . $leftEmoji;
|
||||||
|
}
|
||||||
|
if (!$this->isEmoji($rightEmoji)) {
|
||||||
|
$rightEmoji = 'https://emojik.vercel.app/s/' . $rightEmoji;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->render('combat/index.html.twig', [
|
||||||
|
'left_emoji' => $leftEmoji,
|
||||||
|
'right_emoji' => $rightEmoji,
|
||||||
|
'winner' => $winner,
|
||||||
|
'loser' => $loser,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
|
class HomeController extends AbstractController
|
||||||
|
{
|
||||||
|
#[Route('/', name: 'home')]
|
||||||
|
public function index(): Response
|
||||||
|
{
|
||||||
|
$emojis = [
|
||||||
|
[
|
||||||
|
'id' => 1,
|
||||||
|
'nom' => 'Bob',
|
||||||
|
'code' => '😊',
|
||||||
|
'force' => 12.5,
|
||||||
|
'robustesse' => 9.3,
|
||||||
|
'intelligence' => 7.8,
|
||||||
|
'vitesse' => 10.0,
|
||||||
|
'nbCombatGagne' => 3,
|
||||||
|
'rarete' => 2, // épique
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 2,
|
||||||
|
'nom' => 'John',
|
||||||
|
'code' => '😭',
|
||||||
|
'force' => 5.1,
|
||||||
|
'robustesse' => 4.2,
|
||||||
|
'intelligence' => 3.3,
|
||||||
|
'vitesse' => 6.0,
|
||||||
|
'nbCombatGagne' => 1,
|
||||||
|
'rarete' => 1, // commun
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 3,
|
||||||
|
'nom' => 'Rodolph',
|
||||||
|
'code' => '😁',
|
||||||
|
'force' => 20.0,
|
||||||
|
'robustesse' => 15.0,
|
||||||
|
'intelligence' => 18.0,
|
||||||
|
'vitesse' => 17.0,
|
||||||
|
'nbCombatGagne' => 10,
|
||||||
|
'rarete' => 4, // légendaire
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
// Ajout de la couleur selon la rareté
|
||||||
|
foreach ($emojis as &$emoji) {
|
||||||
|
|
||||||
|
$emoji['color'] = match ($emoji['rarete']) {
|
||||||
|
1 => 'green', // commun
|
||||||
|
2 => 'purple', // épique
|
||||||
|
3 => 'red', // mythique
|
||||||
|
4 => 'gold', // légendaire
|
||||||
|
default => 'gray'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->render('home/index.html.twig', [
|
||||||
|
'emojis' => $emojis,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
|
class ReproductionController extends AbstractController
|
||||||
|
{
|
||||||
|
#[Route('/reproduction', name: 'app_reproduction')]
|
||||||
|
public function index(): Response
|
||||||
|
{
|
||||||
|
$leftEmoji = '🐶'; // Emoji de gauche
|
||||||
|
$rightEmoji = '🐱'; // Emoji de droite
|
||||||
|
$childEmoji = 'https://emojik.vercel.app/s/%F0%9F%90%88_%F0%9F%90%95'; // Emoji enfant
|
||||||
|
// $childEmoji = '🐱';
|
||||||
|
|
||||||
|
return $this->render('reproduction/index.html.twig', [
|
||||||
|
'left_emoji' => $leftEmoji,
|
||||||
|
'right_emoji' => $rightEmoji,
|
||||||
|
'child_emoji' => $childEmoji
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\RarityRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
#[ORM\Entity(repositoryClass: RarityRepository::class)]
|
||||||
|
class Rarity
|
||||||
|
{
|
||||||
|
#[ORM\Id]
|
||||||
|
#[ORM\GeneratedValue]
|
||||||
|
#[ORM\Column]
|
||||||
|
private ?int $id = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 50, unique: true)]
|
||||||
|
private string $name;
|
||||||
|
|
||||||
|
#[ORM\Column(type: 'float')]
|
||||||
|
private float $dropRate;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName(string $name): self
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDropRate(): float
|
||||||
|
{
|
||||||
|
return $this->dropRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDropRate(float $dropRate): self
|
||||||
|
{
|
||||||
|
$this->dropRate = $dropRate;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\Rarity;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends ServiceEntityRepository<Rarity>
|
||||||
|
*
|
||||||
|
* @method Rarity|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method Rarity|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method Rarity[] findAll()
|
||||||
|
* @method Rarity[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class RarityRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, Rarity::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return Rarity[] Returns an array of Rarity objects
|
||||||
|
// */
|
||||||
|
// public function findByExampleField($value): array
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('r')
|
||||||
|
// ->andWhere('r.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->orderBy('r.id', 'ASC')
|
||||||
|
// ->setMaxResults(10)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public function findOneBySomeField($value): ?Rarity
|
||||||
|
// {
|
||||||
|
// return $this->createQueryBuilder('r')
|
||||||
|
// ->andWhere('r.exampleField = :val')
|
||||||
|
// ->setParameter('val', $value)
|
||||||
|
// ->getQuery()
|
||||||
|
// ->getOneOrNullResult()
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<title>Emoji Fight</title>
|
||||||
|
<link rel="stylesheet" href="style/combat.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="arena">
|
||||||
|
<div class="emoji left-emoji" data-content="{{ left_emoji }}"></div>
|
||||||
|
<div class="emoji right-emoji" data-content="{{ right_emoji }}"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="winner-text"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.winnerSide = '{{ winner }}';
|
||||||
|
window.loserSide = '{{ loser }}';
|
||||||
|
</script>
|
||||||
|
<script src="script/combat.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<title>Emoji Reproduction</title>
|
||||||
|
<link rel="stylesheet" href="style/reproduction.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<div class="emoji left-emoji" data-content="{{ left_emoji }}"></div>
|
||||||
|
<div class="emoji right-emoji" data-content="{{ right_emoji }}"></div>
|
||||||
|
</div>
|
||||||
|
<div id="child-text"></div>
|
||||||
|
<div id="heart-gif"></div>
|
||||||
|
<script>
|
||||||
|
child_emoji = "{{child_emoji}}"
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="script/reproduction.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in new issue