site: add launcher showcase — auto-rotating non-interactive UI tour
This commit is contained in:
+137
-1
@@ -9,6 +9,7 @@
|
||||
'nav.highlights': 'Хайлайты',
|
||||
'nav.season': 'Сезон',
|
||||
'nav.features': 'Возможности',
|
||||
'nav.showcase': 'Лаунчер',
|
||||
'nav.download': 'Скачать',
|
||||
'nav.news': 'Новости',
|
||||
'nav.play': 'Играть сейчас',
|
||||
@@ -74,6 +75,41 @@
|
||||
'download.latest': 'Скачать актуальную версию',
|
||||
'download.mirrors': 'Зеркала',
|
||||
'download.note': 'Без платных подписок и рекламы. Просто лаунчер. Системные требования: Windows 10+, 4 ГБ ОЗУ.',
|
||||
'showcase.title': 'Показываем <span class="accent">лаунчер</span>',
|
||||
'showcase.sub': 'Никаких статичных скриншотов — живой тур по интерфейсу. Нужно просто наблюдать: лаунчер сам открывает свои экраны.',
|
||||
'preview.aria': 'ZernMC Launcher preview, auto-rotating screens',
|
||||
'preview.login': 'Вход',
|
||||
'preview.packs': 'Сборки',
|
||||
'preview.news': 'Новости',
|
||||
'preview.settings': 'Настройки',
|
||||
'preview.install': 'Установка',
|
||||
'preview.signIn': 'Вход',
|
||||
'preview.username': 'Логин',
|
||||
'preview.password': 'Пароль',
|
||||
'preview.nav.packs': 'Сборки',
|
||||
'preview.nav.news': 'Новости',
|
||||
'preview.nav.friends': 'Друзья',
|
||||
'preview.nav.settings': 'Настройки',
|
||||
'preview.serverPacks': 'Серверные сборки',
|
||||
'preview.localPacks': 'Локальные сборки',
|
||||
'preview.stat.loader': 'Загрузчик',
|
||||
'preview.stat.files': 'Файлы',
|
||||
'preview.stat.size': 'Размер',
|
||||
'preview.ready': 'Готов к запуску',
|
||||
'preview.play': 'Играть',
|
||||
'preview.news.update': 'Обновление',
|
||||
'preview.news.event': 'Событие',
|
||||
'preview.news1.title': 'Сезон Prologue запущен',
|
||||
'preview.news1.body': 'Небо принадлежит дирижаблям. Добро пожаловать в Prologue — 1.21.1 NeoForge, Create: Aeronautics.',
|
||||
'preview.news2.title': 'Война в Заре',
|
||||
'preview.news2.body': '«Феникс» атакует, «Ласточка» защищает. Жители выбирают сторону — или бунт.',
|
||||
'preview.settings.ram': 'Выделено ОЗУ',
|
||||
'preview.settings.resolution': 'Разрешение',
|
||||
'preview.settings.language': 'Язык',
|
||||
'preview.settings.server': 'Сервер',
|
||||
'preview.online': 'Онлайн',
|
||||
'preview.install.title': 'Установка сборки…',
|
||||
'preview.install.stage': 'Загрузка модов 130/130 · 1.8 ГБ',
|
||||
'news.title': 'Что <span class="accent">нового.</span>',
|
||||
'news.sub': 'Последние чейнджлоги и обновления команды Zern.',
|
||||
'news.empty': 'Новостей пока нет.',
|
||||
@@ -86,6 +122,7 @@
|
||||
'nav.highlights': 'Highlights',
|
||||
'nav.season': 'Season',
|
||||
'nav.features': 'Features',
|
||||
'nav.showcase': 'Launcher',
|
||||
'nav.download': 'Download',
|
||||
'nav.news': 'News',
|
||||
'nav.play': 'Play now',
|
||||
@@ -151,6 +188,41 @@
|
||||
'download.latest': 'Download latest',
|
||||
'download.mirrors': 'Mirrors',
|
||||
'download.note': 'No paywalls, no ads. Just a launcher. System requirements: Windows 10+, 4 GB RAM.',
|
||||
'showcase.title': 'Meet the <span class="accent">launcher</span>',
|
||||
'showcase.sub': 'No static screenshots — a live tour of the UI. Just watch: the launcher shows its screens on its own.',
|
||||
'preview.aria': 'ZernMC Launcher preview, auto-rotating screens',
|
||||
'preview.login': 'Sign in',
|
||||
'preview.packs': 'Packs',
|
||||
'preview.news': 'News',
|
||||
'preview.settings': 'Settings',
|
||||
'preview.install': 'Installing',
|
||||
'preview.signIn': 'Sign In',
|
||||
'preview.username': 'Username',
|
||||
'preview.password': 'Password',
|
||||
'preview.nav.packs': 'Packs',
|
||||
'preview.nav.news': 'News',
|
||||
'preview.nav.friends': 'Friends',
|
||||
'preview.nav.settings': 'Settings',
|
||||
'preview.serverPacks': 'Server Packs',
|
||||
'preview.localPacks': 'Local Packs',
|
||||
'preview.stat.loader': 'Loader',
|
||||
'preview.stat.files': 'Files',
|
||||
'preview.stat.size': 'Size',
|
||||
'preview.ready': 'Ready to launch',
|
||||
'preview.play': 'Play',
|
||||
'preview.news.update': 'Update',
|
||||
'preview.news.event': 'Event',
|
||||
'preview.news1.title': 'Season Prologue has launched',
|
||||
'preview.news1.body': 'The sky belongs to airships. Welcome to Prologue — 1.21.1 NeoForge, Create: Aeronautics.',
|
||||
'preview.news2.title': 'War in Zarya',
|
||||
'preview.news2.body': 'Fenix attacks, Lastochka defends. Citizens pick a side — or rise up.',
|
||||
'preview.settings.ram': 'Allocated RAM',
|
||||
'preview.settings.resolution': 'Resolution',
|
||||
'preview.settings.language': 'Language',
|
||||
'preview.settings.server': 'Server',
|
||||
'preview.online': 'Online',
|
||||
'preview.install.title': 'Installing pack…',
|
||||
'preview.install.stage': 'Downloading mods 130/130 · 1.8 GB',
|
||||
'news.title': 'What\'s <span class="accent">new.</span>',
|
||||
'news.sub': 'Latest changelogs and updates from the Zern team.',
|
||||
'news.empty': 'No news yet.',
|
||||
@@ -209,6 +281,11 @@
|
||||
if (statusValue && statusValue.dataset.state) {
|
||||
updateStatusUI(statusValue.dataset.state);
|
||||
}
|
||||
const caption = document.getElementById('previewCaption');
|
||||
if (caption && caption.dataset.screen) {
|
||||
const scene = SCENES.find((s) => s.key === caption.dataset.screen);
|
||||
caption.textContent = scene ? tr(scene.label) : '';
|
||||
}
|
||||
}
|
||||
|
||||
function toggleLang() {
|
||||
@@ -238,9 +315,11 @@
|
||||
const dlVersion = document.getElementById('download-version');
|
||||
const dlSize = document.getElementById('download-size');
|
||||
const dlBtn = document.getElementById('download-btn');
|
||||
const pvVersion = document.getElementById('preview-version');
|
||||
|
||||
if (heroVersion) heroVersion.textContent = version;
|
||||
if (dlVersion) dlVersion.textContent = version;
|
||||
if (pvVersion) pvVersion.textContent = 'v' + version;
|
||||
|
||||
if (data.files && data.files.zips && data.files.zips.length) {
|
||||
const latest = data.files.zips[0];
|
||||
@@ -497,8 +576,64 @@
|
||||
onScroll();
|
||||
}
|
||||
|
||||
const SCENES = [
|
||||
{ key: 'login', label: 'preview.login' },
|
||||
{ key: 'packs', label: 'preview.packs' },
|
||||
{ key: 'news', label: 'preview.news' },
|
||||
{ key: 'settings', label: 'preview.settings' },
|
||||
{ key: 'install', label: 'preview.install' },
|
||||
];
|
||||
|
||||
let sceneIndex = 0;
|
||||
let sceneTimer = null;
|
||||
|
||||
function showScene(i) {
|
||||
const body = document.getElementById('launcherPreviewBody');
|
||||
const dots = document.getElementById('previewDots');
|
||||
const caption = document.getElementById('previewCaption');
|
||||
if (!body) return;
|
||||
|
||||
sceneIndex = (i + SCENES.length) % SCENES.length;
|
||||
body.querySelectorAll('.preview-scene').forEach((el, k) => {
|
||||
el.classList.toggle('is-active', k === sceneIndex);
|
||||
});
|
||||
if (dots) {
|
||||
dots.querySelectorAll('.preview-dot').forEach((d, k) => {
|
||||
d.classList.toggle('active', k === sceneIndex);
|
||||
});
|
||||
}
|
||||
if (caption) {
|
||||
caption.textContent = tr(SCENES[sceneIndex].label);
|
||||
caption.dataset.screen = SCENES[sceneIndex].key;
|
||||
}
|
||||
}
|
||||
|
||||
function nextScene() { showScene(sceneIndex + 1); }
|
||||
|
||||
function startPreview() {
|
||||
if (!document.getElementById('launcherPreviewBody')) return;
|
||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
||||
if (sceneTimer) clearInterval(sceneTimer);
|
||||
sceneTimer = setInterval(nextScene, 4200);
|
||||
showScene(0);
|
||||
}
|
||||
|
||||
function initPreview() {
|
||||
const body = document.getElementById('launcherPreviewBody');
|
||||
const dots = document.getElementById('previewDots');
|
||||
if (!body || !dots) return;
|
||||
|
||||
SCENES.forEach((_, k) => {
|
||||
const d = document.createElement('span');
|
||||
d.className = 'preview-dot' + (k === 0 ? ' active' : '');
|
||||
dots.appendChild(d);
|
||||
});
|
||||
|
||||
startPreview();
|
||||
}
|
||||
|
||||
function initReveal() {
|
||||
const els = document.querySelectorAll('.section-head, .feature-card, .download-card, .news-card, .server-card, .theme-card, .carousel');
|
||||
const els = document.querySelectorAll('.section-head, .feature-card, .download-card, .news-card, .server-card, .theme-card, .carousel, .launcher-window');
|
||||
if (!('IntersectionObserver' in window)) {
|
||||
els.forEach((el) => el.classList.add('visible'));
|
||||
return;
|
||||
@@ -531,6 +666,7 @@
|
||||
loadServerStatus();
|
||||
setInterval(loadServerStatus, 15000);
|
||||
initCarousel();
|
||||
initPreview();
|
||||
initNav();
|
||||
initParallax();
|
||||
initReveal();
|
||||
|
||||
Reference in New Issue
Block a user