feat(web): add light client memory block and scroll animations
This commit is contained in:
parent
769e25a705
commit
e865df33a4
8 changed files with 311 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ Actual screenshots of [central.loki-code.dev](https://central.loki-code.dev), ca
|
||||||
|
|
||||||
- Responsive Russian/English project pages with the approved VNOX mark.
|
- Responsive Russian/English project pages with the approved VNOX mark.
|
||||||
- Interactive, clearly labelled layout illustration and a real native-client screenshot.
|
- Interactive, clearly labelled layout illustration and a real native-client screenshot.
|
||||||
|
- A "light client" block with measured memory use (sources in [docs/memory-sources.md](docs/memory-sources.md)), scroll reveal and a counter that respects `prefers-reduced-motion`.
|
||||||
- Account loading, signed-out, signed-in, unavailable and sign-out states.
|
- Account loading, signed-out, signed-in, unavailable and sign-out states.
|
||||||
- GitHub sign-in through VNOX Hub, same-origin cookies and CSRF-protected sign-out.
|
- GitHub sign-in through VNOX Hub, same-origin cookies and CSRF-protected sign-out.
|
||||||
- Explicit early-development status; no invented releases, people or download links.
|
- Explicit early-development status; no invented releases, people or download links.
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,5 @@ Central status Footer
|
||||||
```
|
```
|
||||||
|
|
||||||
Review: a giant neutral product screenshot alone would feel like any desktop-app page. The hero instead explains persistent voice while browsing text through an intentionally small, labelled diagram. Real native-client imagery appears where it supports the appearance/settings explanation. Sand is the approved V brand colour, not a secondary decorative accent.
|
Review: a giant neutral product screenshot alone would feel like any desktop-app page. The hero instead explains persistent voice while browsing text through an intentionally small, labelled diagram. Real native-client imagery appears where it supports the appearance/settings explanation. Sand is the approved V brand colour, not a secondary decorative accent.
|
||||||
|
|
||||||
|
Motion: sections fade in on scroll (IntersectionObserver), the hero enters once, the voice waveform and connection dots pulse softly, buttons and cards lift on hover. The memory block draws a short sand bar for VNOX against a long stone bar and counts up to 120 MB when it scrolls into view. All of it is plain CSS plus a small script, and it is switched off under `prefers-reduced-motion: reduce` (the final values are shown at once). Memory numbers and their sources: `docs/memory-sources.md`.
|
||||||
|
|
|
||||||
17
docs/memory-sources.md
Normal file
17
docs/memory-sources.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Memory figures on the site
|
||||||
|
|
||||||
|
Block "A light client" on the landing page. All numbers were measured on Linux with `/proc` (RSS and PSS summed over all processes of the app).
|
||||||
|
|
||||||
|
| App | State | RSS | PSS |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| VNOX client (Rust + Slint, release build) | idle, connection screen | 121 MB | 96 MB |
|
||||||
|
| Discord in the Vesktop Electron client, 8 processes | in use | 1333 MB | 1103 MB |
|
||||||
|
|
||||||
|
The site says "about 120 MB" for VNOX (RSS 121 MB, not rounded to 100) and "about 1.3 GB" for Discord by the same RSS metric; PSS is stated in the text. The states differ (idle vs in use), and the site says so. Bar length is 1.3 GB.
|
||||||
|
|
||||||
|
General statement "Electron clients often use from a few hundred MB to a gigabyte and more" rests on press reports, not on our measurement:
|
||||||
|
|
||||||
|
- PCWorld, 9 December 2025, https://www.pcworld.com/article/3005317/discord-admits-windows-11-app-hogs-ram-tries-solving-it-with-auto-restarts.html : Discord's memory use is typically around 1 GB; Discord tests an automatic restart above 4 GB.
|
||||||
|
- Windows Latest, 27 September 2026, https://www.windowslatest.com/2026/09/27/electron-is-one-of-windows-11s-biggest-ram-offenders-and-discords-game-mode-doesnt-fix-it/ : a Discord employee said normal usage should stay under 1 GB (December 2025). No measurement method is given there.
|
||||||
|
|
||||||
|
No other product is given a number. Electron apps vary widely, so no claim is made about them as a group beyond "often".
|
||||||
49
src/app.ts
49
src/app.ts
|
|
@ -67,7 +67,7 @@ const external = (href: string, key: MessageKey) =>
|
||||||
`<a class="text-link" href="${href}" target="_blank" rel="noopener noreferrer">${tr(key)}${icon("external", 15)}</a>`;
|
`<a class="text-link" href="${href}" target="_blank" rel="noopener noreferrer">${tr(key)}${icon("external", 15)}</a>`;
|
||||||
function landing() {
|
function landing() {
|
||||||
main.innerHTML = `
|
main.innerHTML = `
|
||||||
<section class="hero shell" aria-labelledby="hero-title">
|
<section class="hero shell enter" aria-labelledby="hero-title">
|
||||||
<div class="hero-copy"><p class="development">${tr("development")}</p>${tr("heroTitle", "h1", 'id="hero-title"')}${tr("heroText", "p", 'class="hero-description"')}
|
<div class="hero-copy"><p class="development">${tr("development")}</p>${tr("heroTitle", "h1", 'id="hero-title"')}${tr("heroText", "p", 'class="hero-description"')}
|
||||||
<div class="hero-actions"><a class="button primary" href="/account">${tr("openCentral")}</a><a class="button quiet" href="#project">${tr("explore")}</a></div>${tr("earlyNote", "p", 'class="small hero-note"')}</div>
|
<div class="hero-actions"><a class="button primary" href="/account">${tr("openCentral")}</a><a class="button quiet" href="#project">${tr("explore")}</a></div>${tr("earlyNote", "p", 'class="small hero-note"')}</div>
|
||||||
<div class="diagram-wrap"><div class="diagram-meta">${tr("diagramLabel")}<span class="diagram-dots" aria-hidden="true"><i></i><i></i><i></i></span></div>
|
<div class="diagram-wrap"><div class="diagram-meta">${tr("diagramLabel")}<span class="diagram-dots" aria-hidden="true"><i></i><i></i><i></i></span></div>
|
||||||
|
|
@ -76,12 +76,14 @@ function landing() {
|
||||||
<div class="diagram-tabs" role="tablist" aria-label="${t("preview")}" data-i18n-aria="preview"><button role="tab" aria-selected="true" aria-controls="diagram-content" id="tab-text" data-tab="text">${tr("textTab")}</button><button role="tab" aria-selected="false" aria-controls="diagram-content" id="tab-voice" data-tab="voice" tabindex="-1">${tr("voiceTab")}</button><button role="tab" aria-selected="false" aria-controls="diagram-content" id="tab-theme" data-tab="theme" tabindex="-1">${tr("themeTab")}</button></div>${tr("diagramNote", "p", 'class="small diagram-note"')}
|
<div class="diagram-tabs" role="tablist" aria-label="${t("preview")}" data-i18n-aria="preview"><button role="tab" aria-selected="true" aria-controls="diagram-content" id="tab-text" data-tab="text">${tr("textTab")}</button><button role="tab" aria-selected="false" aria-controls="diagram-content" id="tab-voice" data-tab="voice" tabindex="-1">${tr("voiceTab")}</button><button role="tab" aria-selected="false" aria-controls="diagram-content" id="tab-theme" data-tab="theme" tabindex="-1">${tr("themeTab")}</button></div>${tr("diagramNote", "p", 'class="small diagram-note"')}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="project-section shell" id="project" aria-labelledby="project-title"><div class="section-intro">${tr("projectTitle", "h2", 'id="project-title"')}${tr("projectText", "p")}<div class="source-links">${external("https://git.wihuk.pro/boba/VNOX-Client", "clientCode")}${external("https://git.wihuk.pro/boba/VNOX-Server", "serverCode")}</div></div><div class="project-points"><article><div class="point-icon">${icon("chat", 24)}</div><div>${tr("projectNative", "h3")}${tr("projectNativeText", "p")}</div></article><article><div class="point-icon">${icon("voice", 24)}</div><div>${tr("projectServer", "h3")}${tr("projectServerText", "p")}</div></article><article><img src="/assets/vnox-mark.svg" alt="" width="40" height="40"><div>${tr("projectCentral", "h3")}${tr("projectCentralText", "p")}</div></article></div></section>
|
<section class="project-section shell reveal" id="project" aria-labelledby="project-title"><div class="section-intro">${tr("projectTitle", "h2", 'id="project-title"')}${tr("projectText", "p")}<div class="source-links">${external("https://git.wihuk.pro/boba/VNOX-Client", "clientCode")}${external("https://git.wihuk.pro/boba/VNOX-Server", "serverCode")}</div></div><div class="project-points"><article><div class="point-icon">${icon("chat", 24)}</div><div>${tr("projectNative", "h3")}${tr("projectNativeText", "p")}</div></article><article><div class="point-icon">${icon("voice", 24)}</div><div>${tr("projectServer", "h3")}${tr("projectServerText", "p")}</div></article><article><img src="/assets/vnox-mark.svg" alt="" width="40" height="40"><div>${tr("projectCentral", "h3")}${tr("projectCentralText", "p")}</div></article></div></section>
|
||||||
<section class="client-section" id="client" aria-labelledby="client-title"><div class="shell"><div class="client-heading">${tr("clientTitle", "h2", 'id="client-title"')}${tr("clientText", "p")}</div><figure class="client-image"><img src="/assets/client-settings.png" width="1280" height="800" alt="${t("clientScreenshot")}" data-i18n-alt="clientScreenshot" loading="lazy">${tr("screenshotCaption", "figcaption")}</figure><div class="client-details"><article>${tr("appearanceTitle", "h3")}${tr("appearanceText", "p")}</article><article>${tr("identityTitle", "h3")}${tr("identityText", "p")}</article></div></div></section>
|
<section class="light-section shell reveal" id="light" aria-labelledby="light-title"><div class="light-intro">${tr("lightTitle", "h2", 'id="light-title"')}${tr("lightText", "p")}<div class="source-links"><a class="text-link" href="https://www.pcworld.com/article/3005317/discord-admits-windows-11-app-hogs-ram-tries-solving-it-with-auto-restarts.html" target="_blank" rel="noopener noreferrer">${tr("lightSource")}${icon("external", 15)}</a></div></div><div class="light-meters"><div class="meter vnox"><div class="meter-head">${tr("lightVnoxName")}<strong>${tr("lightAbout")} <span class="count" data-count="120">120</span> ${tr("lightUnit")}</strong></div><div class="meter-track" aria-hidden="true"><i style="--w: 9.1%"></i></div></div><div class="meter electron"><div class="meter-head">${tr("lightElectronName")}<strong>${tr("lightElectronValue")}</strong></div><div class="meter-track" aria-hidden="true"><i style="--w: 100%"></i></div>${tr("lightElectronNote", "p", 'class="meter-note"')}</div>${tr("lightCaption", "p", 'class="small light-caption"')}${tr("lightScale", "p", 'class="small light-caption"')}</div></section>
|
||||||
<section class="roadmap shell" id="roadmap" aria-labelledby="roadmap-title"><div class="roadmap-heading">${tr("roadmapTitle", "h2", 'id="roadmap-title"')}${tr("roadmapText", "p")}</div><div class="roadmap-columns"><article><h3><span class="connection-dot" aria-hidden="true"></span>${tr("available")}</h3><ul><li>${tr("availableOne")}</li><li>${tr("availableTwo")}</li><li>${tr("availableThree")}</li><li>${tr("availableFour")}</li><li>${tr("availableFive")}</li></ul></article><article><h3><span class="planned-dot" aria-hidden="true"></span>${tr("next")}</h3><ul><li>${tr("nextOne")}</li><li>${tr("nextTwo")}</li><li>${tr("nextThree")}</li></ul></article></div>${tr("downloadNote", "p", 'class="release-note"')}</section>
|
<section class="client-section reveal" id="client" aria-labelledby="client-title"><div class="shell"><div class="client-heading">${tr("clientTitle", "h2", 'id="client-title"')}${tr("clientText", "p")}</div><figure class="client-image"><img src="/assets/client-settings.png" width="1280" height="800" alt="${t("clientScreenshot")}" data-i18n-alt="clientScreenshot" loading="lazy">${tr("screenshotCaption", "figcaption")}</figure><div class="client-details"><article>${tr("appearanceTitle", "h3")}${tr("appearanceText", "p")}</article><article>${tr("identityTitle", "h3")}${tr("identityText", "p")}</article></div></div></section>
|
||||||
<section class="faq shell" aria-labelledby="faq-title">${tr("faqTitle", "h2", 'id="faq-title"')}<div>${(["Server", "Central", "Release"] as const).map((key) => `<details><summary>${tr(`faq${key}`)}<span aria-hidden="true">+</span></summary>${tr(`faq${key}Answer`, "p")}</details>`).join("")}</div></section>
|
<section class="roadmap shell reveal" id="roadmap" aria-labelledby="roadmap-title"><div class="roadmap-heading">${tr("roadmapTitle", "h2", 'id="roadmap-title"')}${tr("roadmapText", "p")}</div><div class="roadmap-columns"><article><h3><span class="connection-dot" aria-hidden="true"></span>${tr("available")}</h3><ul><li>${tr("availableOne")}</li><li>${tr("availableTwo")}</li><li>${tr("availableThree")}</li><li>${tr("availableFour")}</li><li>${tr("availableFive")}</li></ul></article><article><h3><span class="planned-dot" aria-hidden="true"></span>${tr("next")}</h3><ul><li>${tr("nextOne")}</li><li>${tr("nextTwo")}</li><li>${tr("nextThree")}</li></ul></article></div>${tr("downloadNote", "p", 'class="release-note"')}</section>
|
||||||
<section class="status-section shell" aria-label="${t("statusNote")}" data-i18n-aria="statusNote"><div><span id="service-dot" class="status-dot"></span><p id="service-status" role="status">${t("statusLoading")}</p></div><a href="/account" class="text-link">${tr("openCentral")}${icon("external", 15)}</a></section>`;
|
<section class="faq shell reveal" aria-labelledby="faq-title">${tr("faqTitle", "h2", 'id="faq-title"')}<div>${(["Server", "Central", "Release"] as const).map((key) => `<details><summary>${tr(`faq${key}`)}<span aria-hidden="true">+</span></summary>${tr(`faq${key}Answer`, "p")}</details>`).join("")}</div></section>
|
||||||
|
<section class="status-section shell reveal" aria-label="${t("statusNote")}" data-i18n-aria="statusNote"><div><span id="service-dot" class="status-dot"></span><p id="service-status" role="status">${t("statusLoading")}</p></div><a href="/account" class="text-link">${tr("openCentral")}${icon("external", 15)}</a></section>`;
|
||||||
renderDiagram();
|
renderDiagram();
|
||||||
|
initMotion();
|
||||||
main.querySelectorAll<HTMLElement>("[data-tab]").forEach((button) => {
|
main.querySelectorAll<HTMLElement>("[data-tab]").forEach((button) => {
|
||||||
button.addEventListener("click", () => {
|
button.addEventListener("click", () => {
|
||||||
activeTab = button.dataset.tab as Tab;
|
activeTab = button.dataset.tab as Tab;
|
||||||
|
|
@ -103,6 +105,41 @@ function landing() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** Scroll reveal and the memory counter. Skipped when motion is reduced. */
|
||||||
|
function initMotion() {
|
||||||
|
const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||||
|
if (reduced || !("IntersectionObserver" in window)) return;
|
||||||
|
const targets = main.querySelectorAll<HTMLElement>(".reveal");
|
||||||
|
const counters = main.querySelectorAll<HTMLElement>("[data-count]");
|
||||||
|
document.documentElement.classList.add("motion");
|
||||||
|
counters.forEach((counter) => (counter.textContent = "0"));
|
||||||
|
const count = (counter: HTMLElement) => {
|
||||||
|
const goal = Number(counter.dataset.count);
|
||||||
|
const start = performance.now();
|
||||||
|
const step = (now: number) => {
|
||||||
|
const progress = Math.min((now - start) / 1400, 1);
|
||||||
|
counter.textContent = String(
|
||||||
|
Math.round(goal * (1 - Math.pow(1 - progress, 3))),
|
||||||
|
);
|
||||||
|
if (progress < 1) requestAnimationFrame(step);
|
||||||
|
};
|
||||||
|
requestAnimationFrame(step);
|
||||||
|
};
|
||||||
|
const observer = new IntersectionObserver(
|
||||||
|
(entries) => {
|
||||||
|
for (const entry of entries) {
|
||||||
|
if (!entry.isIntersecting) continue;
|
||||||
|
entry.target.classList.add("in");
|
||||||
|
entry.target
|
||||||
|
.querySelectorAll<HTMLElement>("[data-count]")
|
||||||
|
.forEach(count);
|
||||||
|
observer.unobserve(entry.target);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ threshold: 0.2 },
|
||||||
|
);
|
||||||
|
targets.forEach((target) => observer.observe(target));
|
||||||
|
}
|
||||||
function renderDiagram() {
|
function renderDiagram() {
|
||||||
const content = document.querySelector("#diagram-content");
|
const content = document.querySelector("#diagram-content");
|
||||||
if (!content) return;
|
if (!content) return;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,21 @@ export const en = {
|
||||||
projectCentral: "Vnox Central",
|
projectCentral: "Vnox Central",
|
||||||
projectCentralText:
|
projectCentralText:
|
||||||
"A web account with GitHub sign-in. It is not linked to the desktop client key yet.",
|
"A web account with GitHub sign-in. It is not linked to the desktop client key yet.",
|
||||||
|
lightTitle: "A light client",
|
||||||
|
lightText:
|
||||||
|
"The Rust and Slint client does not carry a browser with it. It uses about 120 MB of memory when idle.",
|
||||||
|
lightAbout: "about",
|
||||||
|
lightUnit: "MB",
|
||||||
|
lightVnoxName: "VNOX",
|
||||||
|
lightElectronName: "Discord (Vesktop, Electron)",
|
||||||
|
lightElectronValue: "about 1.3 GB",
|
||||||
|
lightElectronNote:
|
||||||
|
"Discord in the Vesktop Electron client, 8 processes, in use: RSS 1333 MB, PSS 1103 MB (about 1.1 GB). Electron clients in general often use from a few hundred MB to a gigabyte and more.",
|
||||||
|
lightCaption:
|
||||||
|
"Measured on Linux. VNOX: connection screen, release build, RSS 121 MB, PSS 96 MB. Discord: in use.",
|
||||||
|
lightScale:
|
||||||
|
"These are two different states: VNOX idle, Discord under load. Bar length: 1.3 GB by RSS.",
|
||||||
|
lightSource: "On Electron in general: PCWorld, December 2025",
|
||||||
clientCode: "Client source",
|
clientCode: "Client source",
|
||||||
serverCode: "Server source",
|
serverCode: "Server source",
|
||||||
clientTitle: "Appearance settings",
|
clientTitle: "Appearance settings",
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,21 @@ export const ru: Catalog = {
|
||||||
projectCentral: "Vnox Central",
|
projectCentral: "Vnox Central",
|
||||||
projectCentralText:
|
projectCentralText:
|
||||||
"Веб-аккаунт с входом через GitHub. С ключом настольного клиента он пока не связан.",
|
"Веб-аккаунт с входом через GitHub. С ключом настольного клиента он пока не связан.",
|
||||||
|
lightTitle: "Лёгкий клиент",
|
||||||
|
lightText:
|
||||||
|
"Клиент на Rust и Slint не носит с собой браузер. В простое он занимает около 120 МБ памяти.",
|
||||||
|
lightAbout: "около",
|
||||||
|
lightUnit: "МБ",
|
||||||
|
lightVnoxName: "VNOX",
|
||||||
|
lightElectronName: "Discord (Vesktop, Electron)",
|
||||||
|
lightElectronValue: "около 1,3 ГБ",
|
||||||
|
lightElectronNote:
|
||||||
|
"Discord в клиенте Vesktop на Electron, 8 процессов, в работе: RSS 1333 МБ, PSS 1103 МБ (около 1,1 ГБ). Клиенты на Electron вообще часто занимают от нескольких сотен МБ до гигабайта и больше.",
|
||||||
|
lightCaption:
|
||||||
|
"Замер на Linux. VNOX: экран подключения, release-сборка, RSS 121 МБ, PSS 96 МБ. Discord: в работе.",
|
||||||
|
lightScale:
|
||||||
|
"Это два разных состояния: VNOX в простое, Discord под нагрузкой. Длина полосы: 1,3 ГБ по RSS.",
|
||||||
|
lightSource: "Про Electron в целом: PCWorld, декабрь 2025",
|
||||||
clientCode: "Код клиента",
|
clientCode: "Код клиента",
|
||||||
serverCode: "Код сервера",
|
serverCode: "Код сервера",
|
||||||
clientTitle: "Настройки внешнего вида",
|
clientTitle: "Настройки внешнего вида",
|
||||||
|
|
|
||||||
207
src/styles.css
207
src/styles.css
|
|
@ -1879,3 +1879,210 @@ p {
|
||||||
.waveform i:nth-child(11n + 11) {
|
.waveform i:nth-child(11n + 11) {
|
||||||
height: 24px;
|
height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lightweight client block */
|
||||||
|
.light-section {
|
||||||
|
padding-block: 85px 100px;
|
||||||
|
border-top: 1px solid var(--line);
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1.2fr;
|
||||||
|
gap: 110px;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
.light-intro > p {
|
||||||
|
margin-top: 25px;
|
||||||
|
max-width: 40ch;
|
||||||
|
}
|
||||||
|
.light-meters {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 30px;
|
||||||
|
}
|
||||||
|
.meter-head {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 16px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
.meter-head strong {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.meter.vnox .meter-head strong {
|
||||||
|
color: var(--sand);
|
||||||
|
}
|
||||||
|
.meter-track {
|
||||||
|
height: 14px;
|
||||||
|
background: var(--surface);
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.meter-track i {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
width: var(--w);
|
||||||
|
transform-origin: left;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.meter.vnox .meter-track i {
|
||||||
|
background: var(--sand);
|
||||||
|
}
|
||||||
|
.meter.electron .meter-track i {
|
||||||
|
background: #5a5752;
|
||||||
|
}
|
||||||
|
.meter-note {
|
||||||
|
font-size: 0.82rem;
|
||||||
|
margin-top: 12px;
|
||||||
|
max-width: 52ch;
|
||||||
|
}
|
||||||
|
.light-caption {
|
||||||
|
color: var(--muted);
|
||||||
|
margin: -10px 0 0;
|
||||||
|
}
|
||||||
|
@media (max-width: 1100px) {
|
||||||
|
.light-section {
|
||||||
|
gap: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.light-section {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 40px;
|
||||||
|
padding-block: 60px 70px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.meter-head {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 2px 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Motion: everything below is off when the visitor prefers reduced motion. */
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
.motion .reveal {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(22px);
|
||||||
|
transition:
|
||||||
|
opacity 0.7s ease,
|
||||||
|
transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
|
||||||
|
}
|
||||||
|
.motion .reveal.in {
|
||||||
|
opacity: 1;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
.motion .meter-track i {
|
||||||
|
transform: scaleX(0);
|
||||||
|
}
|
||||||
|
.motion .light-section.in .meter-track i {
|
||||||
|
transform: scaleX(1);
|
||||||
|
transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s;
|
||||||
|
}
|
||||||
|
.motion .light-section.in .meter.electron .meter-track i {
|
||||||
|
transition-duration: 2.2s;
|
||||||
|
}
|
||||||
|
.enter .hero-copy > * {
|
||||||
|
animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
|
||||||
|
}
|
||||||
|
.enter .hero-copy > :nth-child(2) {
|
||||||
|
animation-delay: 0.08s;
|
||||||
|
}
|
||||||
|
.enter .hero-copy > :nth-child(3) {
|
||||||
|
animation-delay: 0.16s;
|
||||||
|
}
|
||||||
|
.enter .hero-copy > :nth-child(4) {
|
||||||
|
animation-delay: 0.24s;
|
||||||
|
}
|
||||||
|
.enter .hero-copy > :nth-child(5) {
|
||||||
|
animation-delay: 0.32s;
|
||||||
|
}
|
||||||
|
.enter .diagram-wrap {
|
||||||
|
animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s backwards;
|
||||||
|
}
|
||||||
|
#diagram-content > * {
|
||||||
|
animation: fade 0.35s ease;
|
||||||
|
}
|
||||||
|
.diagram-call .connection-dot,
|
||||||
|
.person-dot {
|
||||||
|
animation: pulse 2.4s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
.person-dot.second {
|
||||||
|
animation-delay: 0.8s;
|
||||||
|
}
|
||||||
|
.waveform i {
|
||||||
|
animation: wave 1.2s ease-in-out infinite;
|
||||||
|
transform-origin: center;
|
||||||
|
}
|
||||||
|
.waveform i:nth-child(odd) {
|
||||||
|
animation-duration: 0.9s;
|
||||||
|
}
|
||||||
|
.waveform i:nth-child(3n) {
|
||||||
|
animation-delay: -0.4s;
|
||||||
|
}
|
||||||
|
.waveform i:nth-child(4n) {
|
||||||
|
animation-delay: -0.7s;
|
||||||
|
}
|
||||||
|
.button,
|
||||||
|
.point-icon,
|
||||||
|
.theme-option,
|
||||||
|
.client-image,
|
||||||
|
.faq summary span {
|
||||||
|
transition:
|
||||||
|
transform 0.2s ease,
|
||||||
|
background-color 0.2s ease,
|
||||||
|
border-color 0.2s ease;
|
||||||
|
}
|
||||||
|
.button:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
.button:active {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
.project-points article:hover .point-icon {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
background: #2e2d2b;
|
||||||
|
}
|
||||||
|
.theme-option:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
.client-image:hover {
|
||||||
|
border-color: #6b6559;
|
||||||
|
}
|
||||||
|
.roadmap-columns article {
|
||||||
|
transition: border-color 0.25s ease;
|
||||||
|
}
|
||||||
|
.roadmap-columns article:hover {
|
||||||
|
border-top-color: var(--sand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes rise {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(18px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes fade {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes pulse {
|
||||||
|
50% {
|
||||||
|
opacity: 0.35;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes wave {
|
||||||
|
50% {
|
||||||
|
transform: scaleY(0.45);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
* {
|
||||||
|
animation: none !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ with sync_playwright() as p:
|
||||||
page.locator('#service-status').filter(has_text='отвечает').wait_for()
|
page.locator('#service-status').filter(has_text='отвечает').wait_for()
|
||||||
page.screenshot(path=str(artifacts / 'desktop-hero.png'))
|
page.screenshot(path=str(artifacts / 'desktop-hero.png'))
|
||||||
page.screenshot(path=str(artifacts / 'desktop-full.png'), full_page=True)
|
page.screenshot(path=str(artifacts / 'desktop-full.png'), full_page=True)
|
||||||
|
page.locator('#light').scroll_into_view_if_needed()
|
||||||
|
page.wait_for_function("document.querySelector('.count').textContent === '120'")
|
||||||
page.locator('[data-tab="voice"]').click()
|
page.locator('[data-tab="voice"]').click()
|
||||||
assert page.locator('.voice-orbit').count() == 1
|
assert page.locator('.voice-orbit').count() == 1
|
||||||
page.locator('[data-tab="voice"]').press('ArrowRight')
|
page.locator('[data-tab="voice"]').press('ArrowRight')
|
||||||
|
|
@ -57,7 +59,16 @@ with sync_playwright() as p:
|
||||||
page.set_viewport_size({'width': width, 'height': 844})
|
page.set_viewport_size({'width': width, 'height': 844})
|
||||||
assert not page.evaluate('document.documentElement.scrollWidth > innerWidth'), (locale, width)
|
assert not page.evaluate('document.documentElement.scrollWidth > innerWidth'), (locale, width)
|
||||||
page.set_viewport_size({'width': 390, 'height': 844})
|
page.set_viewport_size({'width': 390, 'height': 844})
|
||||||
|
page.evaluate("document.querySelectorAll('.reveal').forEach(e => e.classList.add('in'))")
|
||||||
page.screenshot(path=str(artifacts / 'mobile-full.png'), full_page=True)
|
page.screenshot(path=str(artifacts / 'mobile-full.png'), full_page=True)
|
||||||
|
reduced = browser.new_context(viewport={'width': 390, 'height': 844}, reduced_motion='reduce')
|
||||||
|
rp = reduced.new_page()
|
||||||
|
rp.goto(args.url)
|
||||||
|
rp.locator('.light-section').wait_for()
|
||||||
|
assert not rp.evaluate("document.documentElement.classList.contains('motion')")
|
||||||
|
assert rp.locator('.count').inner_text() == '120'
|
||||||
|
assert rp.evaluate("getComputedStyle(document.querySelector('.reveal')).opacity") == '1'
|
||||||
|
reduced.close()
|
||||||
page.goto(args.url + '/account')
|
page.goto(args.url + '/account')
|
||||||
page.locator('.github-login[href="/v1/auth/github/start"]').wait_for()
|
page.locator('.github-login[href="/v1/auth/github/start"]').wait_for()
|
||||||
assert page.locator('.github-login').get_attribute('aria-disabled') is None
|
assert page.locator('.github-login').get_attribute('aria-disabled') is None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue