Website: Android screenshots first for a visitor on Android
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run

Seven phone screens one by one (home with a put-aside game, a database's
games, the Opera game, Stockfish, the play sheet, «Who to play», a game
against Rodent IV) open the gallery and the lightbox on Android, under «On
the phone», before «On the computer»; the hero shows the four phone screens.
Other visitors see the page as before. Nine languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-27 15:47:09 +03:00
parent 20d9d018bb
commit 12e4c7d5e9
59 changed files with 645 additions and 82 deletions

View file

@ -109,10 +109,16 @@ p { margin: 0 0 12px; }
.gallery a { border-radius: 8px; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery p { margin: 10px 0 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 899px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery.phones { grid-template-columns: repeat(4, 1fr); margin-bottom: 48px; }
.gallery.phones a { aspect-ratio: 9 / 20; border-radius: 12px; }
.gallery.phones p { font-size: 14px; -webkit-line-clamp: 3; }
.gallery-h { font-size: 18px; color: var(--text-2); margin: 0 0 16px; }
@media (max-width: 899px) { .gallery { grid-template-columns: repeat(2, 1fr); } .gallery.phones { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639px) {
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; }
.gallery li { flex: 0 0 85%; scroll-snap-align: start; }
.gallery.phones { margin-bottom: 32px; }
.gallery.phones li { flex: 0 0 44%; }
}
/* Features */

View file

@ -262,6 +262,32 @@
a.addEventListener("click", function () { remember(a.dataset.lang); });
});
// --- Android: the phone's screenshots first ---------------------------------------
// The phone screens open the gallery and the lightbox; the desktop ones follow, and
// the hero shows the four phone screens instead of the desktop window.
var phone = CP.phoneShots || [];
if (sys.os === "android" && phone.length) {
var desktop = CP.shots || [];
document.querySelectorAll("[data-shot]").forEach(function (a) {
a.dataset.shot = String(parseInt(a.dataset.shot, 10) + phone.length);
});
document.querySelectorAll("[data-phone]").forEach(function (a) { a.dataset.shot = a.dataset.phone; });
CP.shots = phone.concat(desktop);
$("phone-shots").hidden = false;
var both = -1;
desktop.forEach(function (s, i) { if (/06-android/.test(s.full)) both = i; });
var hero = document.querySelector(".hero-shot");
if (hero && both >= 0) {
var s = desktop[both], stem = s.full.replace(/\.png$/, "");
hero.querySelector("a").href = s.full;
hero.querySelector("a").dataset.shot = String(phone.length + both + 1);
hero.querySelector("source").srcset = stem + "-1280.webp 1280w, " + stem + "-1920.webp 1920w";
hero.querySelector("img").src = s.fallback;
hero.querySelector("img").alt = s.alt;
hero.querySelector("figcaption").textContent = s.caption;
}
}
// --- Lightbox --------------------------------------------------------------------
var lb = $("lightbox"), img = $("lb-img"), cap = $("lb-cap"), count = $("lb-count"), full = $("lb-full");
var shots = CP.shots || [], cur = 0, opener = null, viaHistory = false;

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB