feat(sprint1-step6): polish, landing page, responsive, deploy config

- Landing.jsx : écran d'accueil "Entrer dans le Marais" sur /
- Home.jsx : jeu sur /jeu, click animation float-up, sidebar responsive
- formatNumber.ts : util partagé k/M/B/T (remplace 4 copies locales)
- home.scss : rewrite classes (game-cover, click-zone, tadpole-sprite, game-sidebar)
- Responsive : sidebar fixe desktop, drawer bottom mobile (<768px)
- navbar : wildCoin → resource-counter, auth-nav stylé, dead code supprimé
- GameSync.tsx : bridge useSaveSync ↔ Zustand (câblé dans App)
- tadpole.svg : asset renommé (SantaClause-bag → tadpole)
- deploy/ : Apache vhost SPA+proxy, deploy.sh, ecosystem.config.cjs PM2
- NavBarData : Jeu → /jeu
- Cleanup : dead imports, commentaires legacy
This commit is contained in:
2026-03-20 13:41:09 +01:00
parent 307feb711f
commit 95dca420a5
15 changed files with 2729 additions and 308 deletions

View File

@@ -274,7 +274,7 @@
}
}
.wildCoin {
.resource-counter {
display: flex;
align-items: center;
font-family: var(--font);
@@ -282,3 +282,33 @@
font-weight: 600;
color: var(--color-grey);
}
.auth-nav {
display: flex;
align-items: center;
gap: 0.6rem;
font-family: var(--font);
.auth-nickname {
font-size: 0.9rem;
font-weight: 500;
color: var(--color-grey);
}
.auth-btn {
padding: 0.3rem 0.8rem;
border: 1px solid var(--color-grey);
border-radius: 0.4rem;
background: none;
font-family: var(--font);
font-size: 0.8rem;
color: var(--color-grey);
cursor: pointer;
transition: all 0.15s ease;
&:hover {
background: var(--color-grey);
color: var(--color-white);
}
}
}

View File

@@ -1,58 +1,105 @@
.bghomecover {
background-image: url("/webp/bg-cover.webp");
background-size: cover;
background-repeat: no-repeat;
background-position: bottom;
width: 100%;
filter: blur(0px);
transition: filter 1s ease-in-out;
}
.santaposition {
display: flex;
justify-content: center;
align-items: end;
.santaclaus {
display: block;
position: absolute;
bottom: 5vh;
min-width: 320px;
width: 320px;
min-height: 320px;
height: 320px;
z-index: 1;
background: url("/svg/SantaClause-bag.svg");
background-repeat: no-repeat;
background-size: contain;
cursor: pointer;
&:active {
transform: rotate(2deg);
}
}
.pieces-particle {
width: 30px;
height: 30px;
position: absolute;
bottom: 0;
pointer-events: none;
animation: pieces-up 1.5s linear forwards;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
}
@keyframes pieces-up {
0% {
opacity: 1;
}
100% {
transform: rotate3d(0, 1, 0, 180deg);
opacity: 0;
bottom: 100%;
}
}
// home.scss — Game view styles
.game-cover {
background-image: url("/webp/bg-cover.webp");
background-size: cover;
background-repeat: no-repeat;
background-position: bottom;
width: 100%;
min-height: 92vh;
position: relative;
display: flex;
align-items: flex-end;
justify-content: center;
}
// --- Clicker zone ---
.click-zone {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
gap: 1rem;
padding-bottom: 2vh;
cursor: pointer;
flex: 1;
// Desktop: center
@media (min-width: 768px) {
padding-right: 22rem; // offset for sidebar
}
}
.tadpole-sprite {
width: 280px;
height: 280px;
background: url("/svg/tadpole.svg") no-repeat center / contain;
transition: transform 0.1s ease;
@media (min-width: 768px) {
width: 320px;
height: 320px;
}
.click-zone:active & {
transform: scale(0.95) rotate(2deg);
}
}
// --- Click feedback particle ---
.click-particle {
position: fixed;
pointer-events: none;
font-family: var(--font);
font-size: 1.2rem;
font-weight: 700;
color: #34d399;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
z-index: 100;
animation: float-up 0.8s ease-out forwards;
}
@keyframes float-up {
0% {
opacity: 1;
transform: translateY(0) scale(1);
}
100% {
opacity: 0;
transform: translateY(-60px) scale(1.3);
}
}
// --- Game sidebar ---
.game-sidebar {
position: fixed;
right: 0.75rem;
top: 5.5rem;
bottom: 0.75rem;
width: 20rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
overflow-y: auto;
z-index: 10;
padding-right: 0.25rem;
// Mobile: bottom drawer
@media (max-width: 767px) {
position: fixed;
right: 0;
left: 0;
top: auto;
bottom: 0;
width: 100%;
max-height: 45vh;
padding: 0.75rem;
background: rgba(0, 0, 0, 0.85);
backdrop-filter: blur(8px);
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
}
}