fix(web): translate the client screenshot and keep it within the viewport
This commit is contained in:
parent
4c32e479ac
commit
1fef52166a
7 changed files with 16 additions and 3 deletions
BIN
public/assets/client-settings-en.png
Normal file
BIN
public/assets/client-settings-en.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
public/assets/client-settings-ru.png
Normal file
BIN
public/assets/client-settings-ru.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB |
|
|
@ -118,7 +118,7 @@ function landing() {
|
|||
</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="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 data-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 data-w="100%"></i></div></div>${tr("lightCaption", "p", 'class="small light-caption"')}</div></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="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="${t("clientImage")}" data-i18n-src="clientImage" 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="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="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>`;
|
||||
|
|
@ -802,6 +802,11 @@ function setLanguage(next: Language) {
|
|||
(element) =>
|
||||
(element.textContent = t(element.dataset.i18n as MessageKey)),
|
||||
);
|
||||
document
|
||||
.querySelectorAll<HTMLImageElement>("[data-i18n-src]")
|
||||
.forEach((image) =>
|
||||
image.setAttribute("src", t(image.dataset.i18nSrc as MessageKey)),
|
||||
);
|
||||
for (const [attribute, dataKey] of [
|
||||
["aria-label", "i18nAria"],
|
||||
["alt", "i18nAlt"],
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ export const en = {
|
|||
clientTitle: "Appearance settings",
|
||||
clientText:
|
||||
"Four themes (light, dark, mega dark and custom), text size, audio and profile.",
|
||||
clientImage: "/assets/client-settings-en.png",
|
||||
clientScreenshot:
|
||||
"Appearance settings in the VNOX client: four themes and a text size slider.",
|
||||
screenshotCaption:
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ export const ru: Catalog = {
|
|||
clientTitle: "Настройки внешнего вида",
|
||||
clientText:
|
||||
"Четыре темы (светлая, тёмная, мега-тёмная и своя), размер текста, звук и профиль.",
|
||||
clientImage: "/assets/client-settings-ru.png",
|
||||
clientScreenshot:
|
||||
"Настройки внешнего вида в клиенте VNOX: четыре темы и размер текста.",
|
||||
screenshotCaption: "Настоящий снимок клиента. Интерфейс ещё меняется.",
|
||||
|
|
|
|||
|
|
@ -723,7 +723,9 @@ p {
|
|||
margin-bottom: 3px;
|
||||
}
|
||||
.client-image {
|
||||
margin: 0;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
background: #18181a;
|
||||
padding: 10px;
|
||||
border: 1px solid #46433f;
|
||||
|
|
@ -731,8 +733,12 @@ p {
|
|||
overflow: hidden;
|
||||
}
|
||||
.client-image img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
max-height: 72vh;
|
||||
height: auto;
|
||||
margin-inline: auto;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.client-image figcaption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue