@mblinkov/whats-missing 20.0.44 → 20.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/whats-missing.cjs.js +3 -3
- package/dist/whats-missing.es.js +228 -211
- package/package.json +1 -1
- package/src/Game.tsx +214 -53
package/src/Game.tsx
CHANGED
|
@@ -100,14 +100,22 @@ export default function Game({
|
|
|
100
100
|
const [scale, setScale] = useState(1);
|
|
101
101
|
const [containerSize, setContainerSize] = useState<number | null>(null);
|
|
102
102
|
const [isDesktopLayout, setIsDesktopLayout] = useState(false);
|
|
103
|
+
const [isIPadMiniPortrait, setIsIPadMiniPortrait] = useState(false);
|
|
104
|
+
const [isIPadMiniLandscape, setIsIPadMiniLandscape] = useState(false);
|
|
105
|
+
const [isIPadAirPortrait, setIsIPadAirPortrait] = useState(false);
|
|
106
|
+
const [isIPadAirLandscape, setIsIPadAirLandscape] = useState(false);
|
|
107
|
+
const [isSurfaceDuoPortrait, setIsSurfaceDuoPortrait] = useState(false);
|
|
108
|
+
const [isSurfaceDuoLandscape, setIsSurfaceDuoLandscape] = useState(false);
|
|
109
|
+
const [isIPadProPortrait, setIsIPadProPortrait] = useState(false);
|
|
110
|
+
const [isIPadProLandscape, setIsIPadProLandscape] = useState(false);
|
|
103
111
|
|
|
104
112
|
// ✅ адаптив под мобилки, планшеты и десктоп
|
|
105
113
|
useEffect(() => {
|
|
106
114
|
const resize = () => {
|
|
107
115
|
const width = screenWidth ?? window.innerWidth;
|
|
108
116
|
const height = screenHeight ?? window.innerHeight;
|
|
109
|
-
const mobile = width < 768;
|
|
110
|
-
const isLandscape = width > height && mobile;
|
|
117
|
+
const mobile = width < 768 || (width === 926 && height === 428) || (width === 932 && height === 430); // iPhone 14 Pro Max в landscape тоже считается мобильным
|
|
118
|
+
const isLandscape = (width > height && mobile) || (width === 926 && height === 428) || (width === 932 && height === 430); // iPhone 14 Pro Max в landscape
|
|
111
119
|
const isSmallHeight = height < 700; // Nest Hub, маленькие экраны
|
|
112
120
|
|
|
113
121
|
// Определяем iPhone до 14 Pro Max в landscape режиме
|
|
@@ -140,10 +148,38 @@ export default function Game({
|
|
|
140
148
|
// Разрешение 1440x900 - ноутбуки и небольшие десктопы
|
|
141
149
|
const is1440x900 = width === 1440 && height === 900;
|
|
142
150
|
|
|
151
|
+
// iPad Mini/Air размеры
|
|
152
|
+
// iPad Mini: 768x1024 (portrait), 1024x768 (landscape) - Chrome DevTools размеры
|
|
153
|
+
// iPad Air: 820x1180 (portrait), 1180x820 (landscape)
|
|
154
|
+
const isIPadMiniPortrait = width === 768 && height === 1024;
|
|
155
|
+
const isIPadMiniLandscape = width === 1024 && height === 768;
|
|
156
|
+
const isIPadAirPortrait = width === 820 && height === 1180;
|
|
157
|
+
const isIPadAirLandscape = width === 1180 && height === 820;
|
|
158
|
+
|
|
159
|
+
// Surface DUO размеры
|
|
160
|
+
// Surface DUO: 540x720 (portrait), 720x540 (landscape)
|
|
161
|
+
const isSurfaceDuoPortrait = width === 540 && height === 720;
|
|
162
|
+
const isSurfaceDuoLandscape = width === 720 && height === 540;
|
|
163
|
+
|
|
164
|
+
// iPad Pro размеры
|
|
165
|
+
// iPad Pro: 1024x1366 (portrait), 1366x1024 (landscape)
|
|
166
|
+
const isIPadProPortrait = width === 1024 && height === 1366;
|
|
167
|
+
const isIPadProLandscape = width === 1366 && height === 1024;
|
|
168
|
+
|
|
143
169
|
// Популярные разрешения для горизонтального расположения кнопки Check
|
|
144
170
|
const desktopLayout = width >= 1200 && height >= 600 && !mobile;
|
|
145
171
|
setIsDesktopLayout(desktopLayout);
|
|
146
172
|
|
|
173
|
+
// Установка состояний для iPad и Surface DUO
|
|
174
|
+
setIsIPadMiniPortrait(isIPadMiniPortrait);
|
|
175
|
+
setIsIPadMiniLandscape(isIPadMiniLandscape);
|
|
176
|
+
setIsIPadAirPortrait(isIPadAirPortrait);
|
|
177
|
+
setIsIPadAirLandscape(isIPadAirLandscape);
|
|
178
|
+
setIsSurfaceDuoPortrait(isSurfaceDuoPortrait);
|
|
179
|
+
setIsSurfaceDuoLandscape(isSurfaceDuoLandscape);
|
|
180
|
+
setIsIPadProPortrait(isIPadProPortrait);
|
|
181
|
+
setIsIPadProLandscape(isIPadProLandscape);
|
|
182
|
+
|
|
147
183
|
const isOldIPhoneLandscape = isLandscape && height <= 428; // до iPhone 14 Pro Max включительно
|
|
148
184
|
|
|
149
185
|
// treat only phones as "mobile" so tablets use the desktop (square/centered) layout
|
|
@@ -362,13 +398,13 @@ export default function Game({
|
|
|
362
398
|
<div style={styles.gmCenterScreen}>
|
|
363
399
|
<h1 style={styles.gmHeadline1}>WHAT'S MISSING?</h1>
|
|
364
400
|
<p style={styles.gmBodyM}>Select a theme:</p>
|
|
365
|
-
<div style={{ display: "flex", gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "8px" : "16px" }}>
|
|
401
|
+
<div style={{ display: "flex", gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "8px" : "16px" }}>
|
|
366
402
|
{["animals", "food", "toys"].map((t) => (
|
|
367
403
|
<button key={t} style={{
|
|
368
404
|
...styles.gmButton,
|
|
369
|
-
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "8px 12px" : "12px 24px",
|
|
370
|
-
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "12px" : "16px",
|
|
371
|
-
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "70px" : "auto"
|
|
405
|
+
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "8px 12px" : "12px 24px",
|
|
406
|
+
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "12px" : "16px",
|
|
407
|
+
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "70px" : "auto"
|
|
372
408
|
}} onClick={() => setTheme(t as Theme)}>
|
|
373
409
|
{t === "animals" ? "🐶 Animals" : t === "food" ? "🍎 Food" : "🧸 Toys"}
|
|
374
410
|
</button>
|
|
@@ -376,16 +412,16 @@ export default function Game({
|
|
|
376
412
|
</div>
|
|
377
413
|
<div style={{ marginTop: 24 }}>
|
|
378
414
|
<p style={styles.gmBodyS}>Choose number of rounds:</p>
|
|
379
|
-
<div style={{ display: "flex", gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "6px" : "12px", marginTop: 8 }}>
|
|
415
|
+
<div style={{ display: "flex", gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "6px" : "12px", marginTop: 8 }}>
|
|
380
416
|
{[3, 4, 5].map((n) => (
|
|
381
417
|
<button
|
|
382
418
|
key={n}
|
|
383
419
|
style={{
|
|
384
420
|
...styles.gmButton,
|
|
385
421
|
...(rounds === n ? styles.gmButtonActive : {}),
|
|
386
|
-
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "6px 10px" : "12px 24px",
|
|
387
|
-
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "12px" : "16px",
|
|
388
|
-
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "40px" : "auto"
|
|
422
|
+
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "6px 10px" : "12px 24px",
|
|
423
|
+
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "12px" : "16px",
|
|
424
|
+
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "40px" : "auto"
|
|
389
425
|
}}
|
|
390
426
|
onClick={() => setRounds(n)}
|
|
391
427
|
>
|
|
@@ -402,9 +438,9 @@ export default function Game({
|
|
|
402
438
|
<p style={styles.gmBodyM}>Rounds: {rounds}</p>
|
|
403
439
|
<button style={{
|
|
404
440
|
...styles.gmButton,
|
|
405
|
-
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "8px 16px" : "12px 24px",
|
|
406
|
-
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "14px" : "16px",
|
|
407
|
-
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "120px" : "auto"
|
|
441
|
+
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "8px 16px" : "12px 24px",
|
|
442
|
+
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "14px" : "16px",
|
|
443
|
+
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "120px" : "auto"
|
|
408
444
|
}} onClick={startGame}>
|
|
409
445
|
▶ Start game
|
|
410
446
|
</button>
|
|
@@ -412,12 +448,29 @@ export default function Game({
|
|
|
412
448
|
)}
|
|
413
449
|
{finished && (
|
|
414
450
|
<div style={styles.gmCenterScreen}>
|
|
415
|
-
<h1 style={
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
<
|
|
451
|
+
<h1 style={{
|
|
452
|
+
...styles.gmHeadline1,
|
|
453
|
+
marginTop: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "0px" : styles.gmHeadline1.marginTop,
|
|
454
|
+
marginBottom: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "2px" : styles.gmHeadline1.marginBottom
|
|
455
|
+
}}>Results</h1>
|
|
456
|
+
<h2 style={{
|
|
457
|
+
...styles.gmHeadline3,
|
|
458
|
+
marginTop: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "0px" : styles.gmHeadline3.marginTop,
|
|
459
|
+
marginBottom: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "2px" : styles.gmHeadline3.marginBottom
|
|
460
|
+
}}>
|
|
461
|
+
Your score: {score} / {rounds}
|
|
462
|
+
</h2>
|
|
463
|
+
<p style={{
|
|
464
|
+
...styles.gmBodyM,
|
|
465
|
+
color: "#10b981",
|
|
466
|
+
marginTop: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "0px" : "12px",
|
|
467
|
+
marginBottom: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "2px" : styles.gmBodyM.marginBottom
|
|
468
|
+
}}>Yahoo! You did it! 🍬✨</p>
|
|
469
|
+
<table style={{
|
|
470
|
+
...styles.gmTable,
|
|
471
|
+
marginTop: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "0px" : "20px",
|
|
472
|
+
marginBottom: (isMobile && window.innerWidth > window.innerHeight) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape ? "4px" : "32px"
|
|
473
|
+
}}>
|
|
421
474
|
<thead>
|
|
422
475
|
<tr>
|
|
423
476
|
<th>Round</th>
|
|
@@ -445,22 +498,22 @@ export default function Game({
|
|
|
445
498
|
</table>
|
|
446
499
|
<div style={{
|
|
447
500
|
display: "flex",
|
|
448
|
-
gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "6px" : "12px",
|
|
449
|
-
marginTop: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "2px" : (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isDesktopLayout ? "12px" : "24px"
|
|
501
|
+
gap: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "6px" : "12px",
|
|
502
|
+
marginTop: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "2px" : (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isDesktopLayout ? "12px" : "24px"
|
|
450
503
|
}}>
|
|
451
504
|
<button style={{
|
|
452
505
|
...styles.gmButton,
|
|
453
|
-
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "6px 10px" : "12px 24px",
|
|
454
|
-
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "12px" : "16px",
|
|
455
|
-
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "80px" : "auto"
|
|
506
|
+
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "6px 10px" : "12px 24px",
|
|
507
|
+
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "12px" : "16px",
|
|
508
|
+
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "80px" : "auto"
|
|
456
509
|
}} onClick={startGame}>
|
|
457
510
|
🔁 Play again
|
|
458
511
|
</button>
|
|
459
512
|
<button style={{
|
|
460
513
|
...styles.gmButton,
|
|
461
|
-
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "6px 10px" : "12px 24px",
|
|
462
|
-
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "12px" : "16px",
|
|
463
|
-
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) ? "80px" : "auto"
|
|
514
|
+
padding: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "6px 10px" : "12px 24px",
|
|
515
|
+
fontSize: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "12px" : "16px",
|
|
516
|
+
minWidth: (isMobile && window.innerWidth > window.innerHeight) || (isMobile && window.innerWidth <= 375 && window.innerHeight <= 667) || (window.innerWidth === 896 && window.innerHeight === 414) || (window.innerWidth === 844 && window.innerHeight === 390) || (window.innerWidth === 926 && window.innerHeight === 428) || (window.innerWidth === 932 && window.innerHeight === 430) ? "80px" : "auto"
|
|
464
517
|
}} onClick={exitGame}>
|
|
465
518
|
⬅️ Choose theme
|
|
466
519
|
</button>
|
|
@@ -474,11 +527,13 @@ export default function Game({
|
|
|
474
527
|
minHeight: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
475
528
|
? "45px" // iPhone SE: еще более компактная высота
|
|
476
529
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
477
|
-
? "
|
|
530
|
+
? "45px" // iPhone до 14 Pro Max в landscape: такая же компактная как SE
|
|
478
531
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
479
|
-
? "
|
|
532
|
+
? "45px" // iPhone XR в landscape: такая же компактная как SE
|
|
480
533
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
481
|
-
? "
|
|
534
|
+
? "45px" // iPhone 12 Pro в landscape: такая же компактная как SE
|
|
535
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
536
|
+
? "45px" // iPhone 14 Pro Max в landscape: такая же компактная как SE
|
|
482
537
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700
|
|
483
538
|
? "60px" // iPhone landscape и малые экраны: компактная высота
|
|
484
539
|
: "160px",
|
|
@@ -494,6 +549,8 @@ export default function Game({
|
|
|
494
549
|
? "8px" // iPhone XR в landscape: поднимаем еще выше
|
|
495
550
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
496
551
|
? "8px" // iPhone 12 Pro в landscape: поднимаем еще выше
|
|
552
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
553
|
+
? "8px" // iPhone 14 Pro Max в landscape: поднимаем еще выше
|
|
497
554
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700
|
|
498
555
|
? "15px" // iPhone landscape и малые экраны: поднимаем выше
|
|
499
556
|
: "40px"
|
|
@@ -531,6 +588,12 @@ export default function Game({
|
|
|
531
588
|
? "120px" // mobile landscape: меньшая высота
|
|
532
589
|
: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
533
590
|
? "100px" // iPhone SE: очень компактная высота
|
|
591
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
592
|
+
? "100px" // iPhone XR в landscape: такая же компактная как SE
|
|
593
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
594
|
+
? "100px" // iPhone 12 Pro в landscape: такая же компактная как SE
|
|
595
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
596
|
+
? "100px" // iPhone 14 Pro Max в landscape: такая же компактная как SE
|
|
534
597
|
: isMobile
|
|
535
598
|
? "150px" // mobile portrait: стандартная высота
|
|
536
599
|
: window.innerHeight < 700
|
|
@@ -538,15 +601,33 @@ export default function Game({
|
|
|
538
601
|
: "210px", // desktop: стандартная высота
|
|
539
602
|
gap: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
540
603
|
? "12px" // iPhone SE: больше отступов
|
|
604
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
605
|
+
? "12px" // iPhone XR в landscape: такие же отступы как SE
|
|
606
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
607
|
+
? "12px" // iPhone 12 Pro в landscape: такие же отступы как SE
|
|
608
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
609
|
+
? "12px" // iPhone 14 Pro Max в landscape: такие же отступы как SE
|
|
541
610
|
: isMobile || window.innerHeight < 700 ? "8px" : "20px",
|
|
542
611
|
justifyItems: "center",
|
|
543
612
|
maxWidth: isMobile && window.innerWidth > window.innerHeight
|
|
544
613
|
? "90%" // mobile landscape: используем больше ширины
|
|
545
614
|
: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
546
615
|
? "95%" // iPhone SE: используем почти всю ширину
|
|
616
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
617
|
+
? "95%" // iPhone XR в landscape: используем почти всю ширину как SE
|
|
618
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
619
|
+
? "95%" // iPhone 12 Pro в landscape: используем почти всю ширину как SE
|
|
620
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
621
|
+
? "95%" // iPhone 14 Pro Max в landscape: используем почти всю ширину как SE
|
|
547
622
|
: "100%",
|
|
548
623
|
padding: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
549
624
|
? "8px" // iPhone SE: минимальные внутренние отступы
|
|
625
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
626
|
+
? "8px" // iPhone XR в landscape: минимальные отступы как SE
|
|
627
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
628
|
+
? "8px" // iPhone 12 Pro в landscape: минимальные отступы как SE
|
|
629
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
630
|
+
? "8px" // iPhone 14 Pro Max в landscape: минимальные отступы как SE
|
|
550
631
|
: "16px",
|
|
551
632
|
}}
|
|
552
633
|
>
|
|
@@ -561,10 +642,22 @@ export default function Game({
|
|
|
561
642
|
height: "100%",
|
|
562
643
|
borderRadius: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
563
644
|
? "6px" // iPhone SE: меньшие скругления
|
|
645
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
646
|
+
? "6px" // iPhone XR в landscape: меньшие скругления как SE
|
|
647
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
648
|
+
? "6px" // iPhone 12 Pro в landscape: меньшие скругления как SE
|
|
649
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
650
|
+
? "6px" // iPhone 14 Pro Max в landscape: меньшие скругления как SE
|
|
564
651
|
: "12px",
|
|
565
652
|
overflow: "hidden",
|
|
566
653
|
boxShadow: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
567
654
|
? "0 1px 4px rgba(0,0,0,0.1)" // iPhone SE: меньшие тени
|
|
655
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
656
|
+
? "0 1px 4px rgba(0,0,0,0.1)" // iPhone XR в landscape: меньшие тени как SE
|
|
657
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
658
|
+
? "0 1px 4px rgba(0,0,0,0.1)" // iPhone 12 Pro в landscape: меньшие тени как SE
|
|
659
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
660
|
+
? "0 1px 4px rgba(0,0,0,0.1)" // iPhone 14 Pro Max в landscape: меньшие тени как SE
|
|
568
661
|
: "0 4px 12px rgba(0,0,0,0.15)",
|
|
569
662
|
transition: "all 0.3s ease",
|
|
570
663
|
cursor: "pointer",
|
|
@@ -572,6 +665,12 @@ export default function Game({
|
|
|
572
665
|
? {
|
|
573
666
|
boxShadow: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
574
667
|
? "0 0 15px #10b981"
|
|
668
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
669
|
+
? "0 0 15px #10b981" // iPhone XR в landscape: такие же тени как SE
|
|
670
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
671
|
+
? "0 0 15px #10b981" // iPhone 12 Pro в landscape: такие же тени как SE
|
|
672
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
673
|
+
? "0 0 15px #10b981" // iPhone 14 Pro Max в landscape: такие же тени как SE
|
|
575
674
|
: "0 0 20px #10b981",
|
|
576
675
|
transform: "scale(1.03)"
|
|
577
676
|
}
|
|
@@ -580,6 +679,12 @@ export default function Game({
|
|
|
580
679
|
? {
|
|
581
680
|
boxShadow: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
582
681
|
? "0 0 15px #ef4444"
|
|
682
|
+
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
683
|
+
? "0 0 15px #ef4444" // iPhone XR в landscape: такие же тени как SE
|
|
684
|
+
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
685
|
+
? "0 0 15px #ef4444" // iPhone 12 Pro в landscape: такие же тени как SE
|
|
686
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
687
|
+
? "0 0 15px #ef4444" // iPhone 14 Pro Max в landscape: такие же тени как SE
|
|
583
688
|
: "0 0 20px #ef4444",
|
|
584
689
|
transform: "scale(1.03)"
|
|
585
690
|
}
|
|
@@ -606,22 +711,26 @@ export default function Game({
|
|
|
606
711
|
marginTop: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
607
712
|
? "1px" // iPhone SE: еще более минимальный отступ
|
|
608
713
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
609
|
-
? "
|
|
714
|
+
? "1px" // iPhone до 14 Pro Max в landscape: такой же как SE
|
|
610
715
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
611
|
-
? "
|
|
716
|
+
? "1px" // iPhone XR в landscape: такой же как SE
|
|
612
717
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
613
|
-
? "
|
|
718
|
+
? "1px" // iPhone 12 Pro в landscape: такой же как SE
|
|
719
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
720
|
+
? "1px" // iPhone 14 Pro Max в landscape: такой же как SE
|
|
614
721
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700
|
|
615
722
|
? "4px" // iPhone landscape и малые экраны: минимальный отступ
|
|
616
723
|
: "16px",
|
|
617
724
|
height: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
618
725
|
? "40px" // iPhone SE: еще более компактная высота
|
|
619
726
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
620
|
-
? "
|
|
727
|
+
? "40px" // iPhone до 14 Pro Max в landscape: такая же как SE
|
|
621
728
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
622
|
-
? "
|
|
729
|
+
? "40px" // iPhone XR в landscape: такая же как SE
|
|
623
730
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
624
|
-
? "
|
|
731
|
+
? "40px" // iPhone 12 Pro в landscape: такая же как SE
|
|
732
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
733
|
+
? "40px" // iPhone 14 Pro Max в landscape: такая же как SE
|
|
625
734
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700
|
|
626
735
|
? "50px" // iPhone landscape и малые экраны: компактная высота
|
|
627
736
|
: "80px"
|
|
@@ -629,15 +738,17 @@ export default function Game({
|
|
|
629
738
|
{phase === "guess" && !answered && (
|
|
630
739
|
<div style={{
|
|
631
740
|
display: "flex",
|
|
632
|
-
flexDirection: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 || (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isDesktopLayout ? "row" : "column",
|
|
741
|
+
flexDirection: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 || (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape || isDesktopLayout ? "row" : "column",
|
|
633
742
|
gap: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
634
743
|
? "3px" // iPhone SE: еще более минимальный отступ
|
|
635
744
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
636
|
-
? "
|
|
745
|
+
? "3px" // iPhone до 14 Pro Max в landscape: такой же как SE
|
|
637
746
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
638
|
-
? "
|
|
747
|
+
? "3px" // iPhone XR в landscape: такой же как SE
|
|
639
748
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
640
|
-
? "
|
|
749
|
+
? "3px" // iPhone 12 Pro в landscape: такой же как SE
|
|
750
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
751
|
+
? "3px" // iPhone 14 Pro Max в landscape: такой же как SE
|
|
641
752
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
642
753
|
? "8px" // 1366x766: отступ между инпутом и кнопкой
|
|
643
754
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -648,6 +759,8 @@ export default function Game({
|
|
|
648
759
|
? "8px" // 1440x900: отступ между инпутом и кнопкой
|
|
649
760
|
: isDesktopLayout // Десктопные разрешения
|
|
650
761
|
? "8px" // Десктопные разрешения: отступ между инпутом и кнопкой
|
|
762
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
763
|
+
? "8px" // iPad и Surface DUO: отступ между инпутом и кнопкой
|
|
651
764
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "6px" : "12px",
|
|
652
765
|
alignItems: "center",
|
|
653
766
|
justifyContent: "center",
|
|
@@ -655,11 +768,13 @@ export default function Game({
|
|
|
655
768
|
maxWidth: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
656
769
|
? "270px" // iPhone SE: еще более компактная ширина
|
|
657
770
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
658
|
-
? "
|
|
771
|
+
? "270px" // iPhone до 14 Pro Max в landscape: такая же как SE
|
|
659
772
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
660
|
-
? "
|
|
773
|
+
? "270px" // iPhone XR в landscape: такая же как SE
|
|
661
774
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
662
|
-
? "
|
|
775
|
+
? "270px" // iPhone 12 Pro в landscape: такая же как SE
|
|
776
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
777
|
+
? "270px" // iPhone 14 Pro Max в landscape: такая же как SE
|
|
663
778
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
664
779
|
? "400px" // 1366x766: ширина контейнера
|
|
665
780
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -670,6 +785,8 @@ export default function Game({
|
|
|
670
785
|
? "400px" // 1440x900: ширина контейнера
|
|
671
786
|
: isDesktopLayout // Десктопные разрешения
|
|
672
787
|
? "400px" // Десктопные разрешения: ширина контейнера
|
|
788
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
789
|
+
? "400px" // iPad и Surface DUO: ширина контейнера
|
|
673
790
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "400px" : "300px"
|
|
674
791
|
}}>
|
|
675
792
|
<>
|
|
@@ -683,11 +800,13 @@ export default function Game({
|
|
|
683
800
|
width: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
684
801
|
? "170px" // iPhone SE: еще более компактная ширина
|
|
685
802
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
686
|
-
? "
|
|
803
|
+
? "170px" // iPhone до 14 Pro Max в landscape: такая же как SE
|
|
687
804
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
688
|
-
? "
|
|
805
|
+
? "170px" // iPhone XR в landscape: такая же как SE
|
|
689
806
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
690
|
-
? "
|
|
807
|
+
? "170px" // iPhone 12 Pro в landscape: такая же как SE
|
|
808
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
809
|
+
? "170px" // iPhone 14 Pro Max в landscape: такая же как SE
|
|
691
810
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
692
811
|
? "250px" // 1366x766: ширина инпута
|
|
693
812
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -698,15 +817,19 @@ export default function Game({
|
|
|
698
817
|
? "250px" // 1440x900: ширина инпута
|
|
699
818
|
: isDesktopLayout // Десктопные разрешения
|
|
700
819
|
? "250px" // Десктопные разрешения: ширина инпута
|
|
820
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
821
|
+
? "250px" // iPad и Surface DUO: ширина инпута
|
|
701
822
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "250px" : "auto",
|
|
702
823
|
padding: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
703
824
|
? "5px 6px" // iPhone SE: еще более компактный padding
|
|
704
825
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
705
|
-
? "6px
|
|
826
|
+
? "5px 6px" // iPhone до 14 Pro Max в landscape: такой же как SE
|
|
706
827
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
707
|
-
? "6px
|
|
828
|
+
? "5px 6px" // iPhone XR в landscape: такой же как SE
|
|
708
829
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
709
|
-
? "6px
|
|
830
|
+
? "5px 6px" // iPhone 12 Pro в landscape: такой же как SE
|
|
831
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
832
|
+
? "5px 6px" // iPhone 14 Pro Max в landscape: такой же как SE
|
|
710
833
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
711
834
|
? "10px 12px" // 1366x766: padding инпута
|
|
712
835
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -717,15 +840,19 @@ export default function Game({
|
|
|
717
840
|
? "10px 12px" // 1440x900: padding инпута
|
|
718
841
|
: isDesktopLayout // Десктопные разрешения
|
|
719
842
|
? "10px 12px" // Десктопные разрешения: padding инпута
|
|
843
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
844
|
+
? "10px 12px" // iPad и Surface DUO: padding инпута
|
|
720
845
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "10px 12px" : "12px 16px",
|
|
721
846
|
fontSize: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
722
847
|
? "10px" // iPhone SE: еще меньший шрифт
|
|
723
848
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
724
|
-
? "
|
|
849
|
+
? "10px" // iPhone до 14 Pro Max в landscape: такой же как SE
|
|
725
850
|
: (window.innerWidth === 896 && window.innerHeight === 414) // iPhone XR
|
|
726
851
|
? "11px" // iPhone XR в landscape: компактный шрифт
|
|
727
852
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
728
|
-
? "
|
|
853
|
+
? "10px" // iPhone 12 Pro в landscape: такой же как SE
|
|
854
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
855
|
+
? "10px" // iPhone 14 Pro Max в landscape: такой же как SE
|
|
729
856
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
730
857
|
? "14px" // 1366x766: размер шрифта инпута
|
|
731
858
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -736,14 +863,16 @@ export default function Game({
|
|
|
736
863
|
? "14px" // 1440x900: размер шрифта инпута
|
|
737
864
|
: isDesktopLayout // Десктопные разрешения
|
|
738
865
|
? "14px" // Десктопные разрешения: размер шрифта инпута
|
|
866
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
867
|
+
? "14px" // iPad и Surface DUO: размер шрифта инпута
|
|
739
868
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "14px" : "16px",
|
|
740
|
-
flex: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 || (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isDesktopLayout ? "1" : "none"
|
|
869
|
+
flex: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 || (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape || isDesktopLayout ? "1" : "none"
|
|
741
870
|
}}
|
|
742
871
|
/>
|
|
743
872
|
<button
|
|
744
873
|
style={{
|
|
745
874
|
...styles.gmButton,
|
|
746
|
-
marginLeft: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 || (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isDesktopLayout ? "8px" : "0",
|
|
875
|
+
marginLeft: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 || (window.innerWidth === 1366 && window.innerHeight === 766) || (window.innerWidth === 1366 && window.innerHeight === 768) || (window.innerWidth === 1280 && window.innerHeight === 720) || (window.innerWidth === 1440 && window.innerHeight === 900) || isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape || isDesktopLayout ? "8px" : "0",
|
|
747
876
|
padding: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
748
877
|
? "5px 8px" // iPhone SE: еще более компактный padding
|
|
749
878
|
: (isMobile && window.innerWidth > window.innerHeight && window.innerHeight <= 428)
|
|
@@ -752,6 +881,8 @@ export default function Game({
|
|
|
752
881
|
? "6px 10px" // iPhone XR в landscape: компактный padding
|
|
753
882
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
754
883
|
? "6px 10px" // iPhone 12 Pro в landscape: компактный padding
|
|
884
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
885
|
+
? "6px 10px" // iPhone 14 Pro Max в landscape: компактный padding
|
|
755
886
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
756
887
|
? "10px 16px" // 1366x766: padding кнопки Check
|
|
757
888
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -762,6 +893,8 @@ export default function Game({
|
|
|
762
893
|
? "10px 16px" // 1440x900: padding кнопки Check
|
|
763
894
|
: isDesktopLayout // Десктопные разрешения
|
|
764
895
|
? "10px 16px" // Десктопные разрешения: padding кнопки Check
|
|
896
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
897
|
+
? "10px 16px" // iPad и Surface DUO: padding кнопки Check
|
|
765
898
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
|
|
766
899
|
fontSize: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
767
900
|
? "10px" // iPhone SE: еще меньший шрифт
|
|
@@ -771,6 +904,8 @@ export default function Game({
|
|
|
771
904
|
? "11px" // iPhone XR в landscape: компактный шрифт
|
|
772
905
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
773
906
|
? "11px" // iPhone 12 Pro в landscape: компактный шрифт
|
|
907
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
908
|
+
? "11px" // iPhone 14 Pro Max в landscape: компактный шрифт
|
|
774
909
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
775
910
|
? "14px" // 1366x766: размер шрифта кнопки Check
|
|
776
911
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -781,6 +916,8 @@ export default function Game({
|
|
|
781
916
|
? "14px" // 1440x900: размер шрифта кнопки Check
|
|
782
917
|
: isDesktopLayout // Десктопные разрешения
|
|
783
918
|
? "14px" // Десктопные разрешения: размер шрифта кнопки Check
|
|
919
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
920
|
+
? "14px" // iPad и Surface DUO: размер шрифта кнопки Check
|
|
784
921
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "14px" : "16px",
|
|
785
922
|
minWidth: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
786
923
|
? "45px" // iPhone SE: еще более компактная ширина
|
|
@@ -790,6 +927,8 @@ export default function Game({
|
|
|
790
927
|
? "55px" // iPhone XR в landscape: компактная ширина
|
|
791
928
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
792
929
|
? "55px" // iPhone 12 Pro в landscape: компактная ширина
|
|
930
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
931
|
+
? "55px" // iPhone 14 Pro Max в landscape: компактная ширина
|
|
793
932
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
794
933
|
? "80px" // 1366x766: минимальная ширина кнопки Check
|
|
795
934
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
@@ -800,6 +939,8 @@ export default function Game({
|
|
|
800
939
|
? "80px" // 1440x900: минимальная ширина кнопки Check
|
|
801
940
|
: isDesktopLayout // Десктопные разрешения
|
|
802
941
|
? "80px" // Десктопные разрешения: минимальная ширина кнопки Check
|
|
942
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
943
|
+
? "80px" // iPad и Surface DUO: минимальная ширина кнопки Check
|
|
803
944
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "80px" : "100px",
|
|
804
945
|
flexShrink: 0
|
|
805
946
|
}}
|
|
@@ -822,10 +963,20 @@ export default function Game({
|
|
|
822
963
|
? "6px 10px" // iPhone XR в landscape: компактный padding
|
|
823
964
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
824
965
|
? "6px 10px" // iPhone 12 Pro в landscape: компактный padding
|
|
966
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
967
|
+
? "6px 10px" // iPhone 14 Pro Max в landscape: компактный padding
|
|
825
968
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
826
969
|
? "10px 16px" // 1366x766: padding кнопки Next round
|
|
827
970
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
828
971
|
? "10px 16px" // 1366x768: padding кнопки Next round
|
|
972
|
+
: (window.innerWidth === 1280 && window.innerHeight === 720) // 1280x720
|
|
973
|
+
? "10px 16px" // 1280x720: padding кнопки Next round
|
|
974
|
+
: (window.innerWidth === 1440 && window.innerHeight === 900) // 1440x900
|
|
975
|
+
? "10px 16px" // 1440x900: padding кнопки Next round
|
|
976
|
+
: isDesktopLayout // Десктопные разрешения
|
|
977
|
+
? "10px 16px" // Десктопные разрешения: padding кнопки Next round
|
|
978
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
979
|
+
? "10px 16px" // iPad и Surface DUO: padding кнопки Next round
|
|
829
980
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "10px 16px" : "12px 24px",
|
|
830
981
|
fontSize: isMobile && window.innerWidth <= 375 && window.innerHeight <= 667
|
|
831
982
|
? "10px" // iPhone SE: еще меньший шрифт
|
|
@@ -835,10 +986,20 @@ export default function Game({
|
|
|
835
986
|
? "11px" // iPhone XR в landscape: компактный шрифт
|
|
836
987
|
: (window.innerWidth === 844 && window.innerHeight === 390) // iPhone 12 Pro
|
|
837
988
|
? "11px" // iPhone 12 Pro в landscape: компактный шрифт
|
|
989
|
+
: (window.innerWidth === 926 && window.innerHeight === 428) // iPhone 14 Pro Max
|
|
990
|
+
? "11px" // iPhone 14 Pro Max в landscape: компактный шрифт
|
|
838
991
|
: (window.innerWidth === 1366 && window.innerHeight === 766) // 1366x766
|
|
839
992
|
? "14px" // 1366x766: размер шрифта кнопки Next round
|
|
840
993
|
: (window.innerWidth === 1366 && window.innerHeight === 768) // 1366x768
|
|
841
994
|
? "14px" // 1366x768: размер шрифта кнопки Next round
|
|
995
|
+
: (window.innerWidth === 1280 && window.innerHeight === 720) // 1280x720
|
|
996
|
+
? "14px" // 1280x720: размер шрифта кнопки Next round
|
|
997
|
+
: (window.innerWidth === 1440 && window.innerHeight === 900) // 1440x900
|
|
998
|
+
? "14px" // 1440x900: размер шрифта кнопки Next round
|
|
999
|
+
: isDesktopLayout // Десктопные разрешения
|
|
1000
|
+
? "14px" // Десктопные разрешения: размер шрифта кнопки Next round
|
|
1001
|
+
: isIPadMiniPortrait || isIPadMiniLandscape || isIPadAirPortrait || isIPadAirLandscape || isSurfaceDuoPortrait || isSurfaceDuoLandscape || isIPadProPortrait || isIPadProLandscape
|
|
1002
|
+
? "14px" // iPad и Surface DUO: размер шрифта кнопки Next round
|
|
842
1003
|
: (isMobile && window.innerWidth > window.innerHeight) || window.innerHeight < 700 ? "14px" : "16px"
|
|
843
1004
|
}} onClick={nextRound}>
|
|
844
1005
|
Next round
|