Minor bug corrected - Language in Reverse mode not sync. - Improved compatibility with mobile.
This commit is contained in:
parent
8a54aeadc5
commit
a2b304e24a
3 changed files with 8 additions and 3 deletions
|
|
@ -801,6 +801,7 @@ body.reverse-mode #countries-grid { display:grid; }
|
|||
color:var(--text); font-family:'Syne',sans-serif;
|
||||
font-size:0.88em; font-weight:600; cursor:pointer;
|
||||
transition:all 0.15s; text-align:left;
|
||||
overflow: hidden;
|
||||
}
|
||||
.country-btn:hover:not(:disabled) {
|
||||
border-color:#f5c842;
|
||||
|
|
@ -819,7 +820,6 @@ body.reverse-mode #countries-grid { display:grid; }
|
|||
.country-btn .cb-info { display:flex; flex-direction:column; min-width:0; }
|
||||
.country-btn .cb-name { font-size:0.82em; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
.country-btn .cb-cat-badge { font-size:0.62em; color:var(--muted); font-family:'DM Mono',monospace; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
|
||||
/* Btn reverse */
|
||||
.btn-reverse {
|
||||
display:block; width:100%; padding:14px 20px; border-radius:10px;
|
||||
|
|
@ -1102,7 +1102,6 @@ body.reverse-mode #countries-grid { display:grid; }
|
|||
MOBILE RESPONSIVE (max-width: 540px)
|
||||
═══════════════════════════════════════════════════════ */
|
||||
@media (max-width: 540px) {
|
||||
|
||||
/* ── Layout global ────────────────────────────────── */
|
||||
body {
|
||||
padding: calc(env(safe-area-inset-top, 8px) + 8px) 8px calc(env(safe-area-inset-bottom, 8px) + 8px) 8px;
|
||||
|
|
|
|||
|
|
@ -203,6 +203,10 @@ function rerenderCurrentTurn() {
|
|||
document.getElementById('reverse-cat-tooltip').textContent = catDesc(cat);
|
||||
document.getElementById('turn-label').textContent =
|
||||
t('reverseTurn') + ' ' + (currentStep + 1) + ' ' + t('of') + ' ' + gameCategories.length;
|
||||
|
||||
//FIX : re-render la grille pays (noms + badges de catégories assignées)
|
||||
renderCountryButtons();
|
||||
applyEmoji(document.getElementById('countries-grid'));
|
||||
}
|
||||
} else {
|
||||
if (currentStep < gameCountries.length) {
|
||||
|
|
@ -599,7 +603,8 @@ function showTurnReverse() {
|
|||
var newSortBtn = sortBtn.cloneNode(true);
|
||||
sortBtn.parentNode.replaceChild(newSortBtn, sortBtn);
|
||||
// reverse mode should use click-only tooltips to avoid hover activation
|
||||
if (gameMode === 'reverse') {
|
||||
var isReverseMode = (gameMode === 'reverse' || (gameMode === 'custom' && customSubMode === 'reverse'));
|
||||
if (isReverseMode) {
|
||||
_attachTooltipClickOnly(newSortBtn, 'sort-' + cat.id, showSortTooltip);
|
||||
} else {
|
||||
_attachTooltipTrigger(newSortBtn, 'sort-' + cat.id, showSortTooltip);
|
||||
|
|
|
|||
|
|
@ -719,6 +719,7 @@ function t(key) {
|
|||
|
||||
function setLang(lang) {
|
||||
currentLang = lang;
|
||||
//console.log('setLang', lang, 'gameCategories.length=', gameCategories.length);
|
||||
document.querySelectorAll('.lang-btn').forEach(function(b) {
|
||||
b.classList.toggle('active', b.textContent.trim() === lang.toUpperCase());
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue