From 0042bb98707c1fcdc8d6d841b4a02c947997d83f Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Fri, 10 Jul 2026 15:36:48 +0200 Subject: [PATCH] feat(hub): add Downloads and Documentation landing pages Wire hub-downloads.js for stable OTA APK resolution, expand nav i18n, and add Session Studio download slot for alpha hub FR. Co-authored-by: Cursor --- assets/hub-downloads.js | 67 ++++++++++++++++++++++++++ assets/hub-landing.js | 2 +- assets/i18n/hub-en.json | 43 +++++++++++++---- assets/i18n/hub-ru.json | 43 +++++++++++++---- hub-landing.css | 56 ++++++++++++++++++++++ index.php | 21 ++++++--- landing-pages.inc.php | 102 +++++++++++++++++++++++++++++++++------- 7 files changed, 291 insertions(+), 43 deletions(-) create mode 100644 assets/hub-downloads.js diff --git a/assets/hub-downloads.js b/assets/hub-downloads.js new file mode 100644 index 0000000..0ef2aba --- /dev/null +++ b/assets/hub-downloads.js @@ -0,0 +1,67 @@ +(function () { + 'use strict'; + + function setStatus(msg) { + var el = document.getElementById('hub-download-apk-status'); + if (el) { + el.textContent = msg; + } + } + + function resolveStableApkUrl() { + return fetch('/v0/ota/channel/stable.json', { cache: 'no-store' }) + .then(function (r) { + if (!r.ok) { + throw new Error('stable channel HTTP ' + r.status); + } + return r.json(); + }) + .then(function (channel) { + var manifestUrl = channel && channel.manifestUrl; + if (!manifestUrl) { + throw new Error('stable.json missing manifestUrl'); + } + return fetch(manifestUrl, { cache: 'no-store' }).then(function (r) { + if (!r.ok) { + throw new Error('manifest HTTP ' + r.status); + } + return r.json(); + }); + }) + .then(function (manifest) { + var url = manifest && (manifest.apkUrl || manifest.bundleUrl); + if (!url) { + throw new Error('manifest missing apkUrl'); + } + return url; + }); + } + + function wireApkButton() { + var btn = document.getElementById('hub-download-apk'); + if (!btn) { + return; + } + btn.addEventListener('click', function () { + btn.disabled = true; + setStatus('Resolving stable OTA channel…'); + resolveStableApkUrl() + .then(function (url) { + setStatus('Downloading…'); + window.location.href = url; + }) + .catch(function (err) { + setStatus('APK unavailable — run builder OTA publish (stable). ' + (err.message || err)); + }) + .finally(function () { + btn.disabled = false; + }); + }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', wireApkButton); + } else { + wireApkButton(); + } +})(); diff --git a/assets/hub-landing.js b/assets/hub-landing.js index 70dfa77..10b76fc 100644 --- a/assets/hub-landing.js +++ b/assets/hub-landing.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - var PAGE_COUNT = 10; + var PAGE_COUNT = 13; var scrollEl = null; var railEl = null; var currentPage = 1; diff --git a/assets/i18n/hub-en.json b/assets/i18n/hub-en.json index 0c704f0..876543a 100644 --- a/assets/i18n/hub-en.json +++ b/assets/i18n/hub-en.json @@ -3,10 +3,14 @@ "nav.about": "About", "nav.why": "Why", "nav.tech": "Technologies", + "nav.documentation": "Documentation", "nav.resources": "Resources", "nav.people": "People", "nav.culture": "Culture", "nav.pricing": "Pricing", + "nav.downloads": "Downloads", + "nav.downloads_common": "Common", + "nav.downloads_others": "Others", "nav.contact": "Contact us", "nav.console": "Console", "nav.git": "Git", @@ -50,15 +54,34 @@ "page4.lead": "Built for teams who need reliability, observability, and control — not another black box.", "page5.title": "Technologies", "page5.lead": "WebRTC, Opus/Speex, WireGuard remote access, PHP consoles, and Docker CI pipelines.", - "page6.title": "Resources", - "page6.lead": "Documentation, deployment guides, and integration patterns for your environment.", - "page7.title": "People", - "page7.lead": "Engineers and operators shipping cast, crash, and build workflows every day.", - "page8.title": "Culture", - "page8.lead": "Open tooling, green master branches, and honest postmortems.", - "page9.title": "Pricing", - "page9.lead": "Self-hosted core; enterprise options for SLA, SSO, and dedicated builders.", - "page10.title": "Contact us", - "page10.lead": "Reach the maintainer for partnerships, support, or deployment help.", + "page6.title": "Documentation", + "page6.lead": "Project wiki, design reviews, specs, and operator guides.", + "page6.btn_wiki": "Project documentation", + "page6.btn_docs": "Other documents", + "page6.hint": "Wiki opens in Gitea; other documents lists ac-docs drafts, DRs, and specs.", + "page7.title": "Downloads", + "page7.lead": "Latest stable builds from the orchestration pipeline (next integration).", + "page7.btn_apk": "Android APK", + "page7.btn_studio": "Session Studio", + "page7.hint": "APK matches the stable OTA channel signature and version.", + "page8.title": "Resources", + "page8.lead": "Source control, consoles, and integration entry points.", + "page8.btn_git": "Git Access", + "page8.hint": "Same Gitea browser as the left shell Git link.", + "page9.title": "People", + "page9.lead": "Engineers and operators shipping cast, crash, and build workflows every day.", + "page10.title": "Culture", + "page10.lead": "Open tooling, green master branches, and honest postmortems.", + "page11.title": "Pricing", + "page11.lead": "Self-hosted core; enterprise options for SLA, SSO, and dedicated builders.", + "page12.title": "Contact us", + "page12.lead": "Reach the maintainer for partnerships, support, or deployment help.", + "page13.title": "Document catalog", + "page13.lead": "ac-docs index — drafts, design reviews, specs, and operator guides.", + "page13.cat_drs": "Design reviews (DRs)", + "page13.cat_specs": "Specifications", + "page13.cat_drafts": "Drafts", + "page13.cat_guides": "Guides & ops", + "page13.hint": "Browse full tree in Gitea under ac-docs; PDF builds live in _pdf_build/.", "footer.copyright": "© {holder}, {year}" } diff --git a/assets/i18n/hub-ru.json b/assets/i18n/hub-ru.json index dd291bc..70b6d32 100644 --- a/assets/i18n/hub-ru.json +++ b/assets/i18n/hub-ru.json @@ -3,10 +3,14 @@ "nav.about": "О проекте", "nav.why": "Зачем", "nav.tech": "Технологии", + "nav.documentation": "Документация", "nav.resources": "Ресурсы", "nav.people": "Люди", "nav.culture": "Культура", "nav.pricing": "Цены", + "nav.downloads": "Загрузки", + "nav.downloads_common": "Common", + "nav.downloads_others": "Others", "nav.contact": "Контакты", "nav.console": "Консоль", "nav.git": "Git", @@ -50,15 +54,34 @@ "page4.lead": "Для команд, которым нужны надёжность, наблюдаемость и контроль — не чёрный ящик.", "page5.title": "Технологии", "page5.lead": "WebRTC, Opus/Speex, WireGuard, PHP-консоли и Docker CI.", - "page6.title": "Ресурсы", - "page6.lead": "Документация, деплой и паттерны интеграции для вашей среды.", - "page7.title": "Люди", - "page7.lead": "Инженеры и операторы, которые каждый день развивают cast, crash и сборки.", - "page8.title": "Культура", - "page8.lead": "Открытые инструменты, зелёный master и честные postmortem.", - "page9.title": "Цены", - "page9.lead": "Self-hosted ядро; enterprise — SLA, SSO и выделенные builder-ы.", - "page10.title": "Контакты", - "page10.lead": "Связь с maintainer: партнёрство, поддержка, помощь с деплоем.", + "page6.title": "Документация", + "page6.lead": "Wiki проекта, DR, спецификации и руководства.", + "page6.btn_wiki": "Документация проекта", + "page6.btn_docs": "Прочие документы", + "page6.hint": "Wiki в Gitea; каталог — черновики ac-docs, DR и specs.", + "page7.title": "Загрузки", + "page7.lead": "Последние stable-сборки из orchestration (ветка next).", + "page7.btn_apk": "Android APK", + "page7.btn_studio": "Session Studio", + "page7.hint": "APK совпадает с stable OTA-каналом.", + "page8.title": "Ресурсы", + "page8.lead": "Исходники, консоли и точки интеграции.", + "page8.btn_git": "Git Access", + "page8.hint": "Тот же Gitea, что и ссылка Git в левой панели.", + "page9.title": "Люди", + "page9.lead": "Инженеры и операторы, которые каждый день развивают cast, crash и сборки.", + "page10.title": "Культура", + "page10.lead": "Открытые инструменты, зелёный master и честные postmortem.", + "page11.title": "Цены", + "page11.lead": "Self-hosted ядро; enterprise — SLA, SSO и выделенные builder-ы.", + "page12.title": "Контакты", + "page12.lead": "Связь с maintainer: партнёрство, поддержка, помощь с деплоем.", + "page13.title": "Каталог документов", + "page13.lead": "Индекс ac-docs — черновики, DR, specs и guides.", + "page13.cat_drs": "Design reviews (DRs)", + "page13.cat_specs": "Спецификации", + "page13.cat_drafts": "Черновики", + "page13.cat_guides": "Guides и ops", + "page13.hint": "Полное дерево в Gitea (ac-docs); PDF — _pdf_build/.", "footer.copyright": "© {holder}, {year}" } diff --git a/hub-landing.css b/hub-landing.css index 22b94b5..db993fc 100644 --- a/hub-landing.css +++ b/hub-landing.css @@ -474,3 +474,59 @@ .landing-scroll { scroll-behavior: auto; } .landing-rail { transition: none; } } + +/* Downloads / documentation big rounded CTAs */ +.landing-download-grid { + display: flex; + flex-wrap: wrap; + gap: 16px; + margin: 20px 0 12px; +} + +.landing-download-btn { + min-width: 200px; + min-height: 56px; + padding: 16px 28px; + border-radius: 999px; + font-size: 1.05rem; + font-weight: 600; + text-align: center; + text-decoration: none; + display: inline-flex; + align-items: center; + justify-content: center; + transition: box-shadow 0.2s ease, transform 0.15s ease; +} + +.landing-download-btn:hover, +.landing-download-btn:focus-visible { + transform: translateY(-1px); + box-shadow: 0 0 30px rgba(61, 139, 253, 0.45); +} + +.landing-download-hint { + margin-top: 8px; + font-size: 0.92rem; +} + +.landing-docs-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 16px; + margin-top: 16px; +} + +.landing-docs-card h3 { + margin: 0 0 10px; + font-size: 1rem; +} + +.landing-docs-list { + margin: 0; + padding-left: 1.1rem; + line-height: 1.65; +} + +.landing-docs-list a { + color: var(--accent, #3d8bfd); +} diff --git a/index.php b/index.php index 2ca0a2e..072e4dc 100644 --- a/index.php +++ b/index.php @@ -45,6 +45,7 @@ function hub_h(string $s): string { + @@ -99,17 +100,25 @@ function hub_h(string $s): string { About Why Technologies + Documentation
- +
- Pricing - Contact us + Pricing +
+ + +
+ Contact us
-
+
-

Resources

-

Documentation, deployment guides, and integration patterns for your environment.

-

Issues console Builder Git browser

+

Documentation

+

Project wiki, design reviews, specs, and operator guides.

+
+ Project documentation + +
+

Wiki opens in Gitea; other documents lists ac-docs drafts, DRs, and specs.

-
+
-

People

-

Engineers and operators shipping cast, crash, and build workflows every day.

+

Downloads

+

Latest stable builds from the orchestration pipeline (next integration).

+
+ + Session Studio +
+

APK matches the stable OTA channel signature and version.

+
+
+ +
+
+

Resources

+

Source control, consoles, and integration entry points.

+ +

Same Gitea browser as the left shell Git link.

+
+
+ +
+
+

People

+

Engineers and operators shipping cast, crash, and build workflows every day.

-
+
-

Culture

-

Open tooling, green master branches, and honest postmortems.

+

Culture

+

Open tooling, green master branches, and honest postmortems.

We ship on next, tag on master, and keep infra docs next to the code.

-
+
-

Pricing

-

Self-hosted core; enterprise options for SLA, SSO, and dedicated builders.

+

Pricing

+

Self-hosted core; enterprise options for SLA, SSO, and dedicated builders.

Community

@@ -116,10 +143,10 @@
-
+
-

Contact us

-

Reach the maintainer for partnerships, support, or deployment help.

+

Contact us

+

Reach the maintainer for partnerships, support, or deployment help.

@@ -128,3 +155,46 @@
+ +
+
+

Document catalog

+

ac-docs index — drafts, design reviews, specs, and operator guides (placeholder links).

+ +

Browse full tree in Gitea under the ac-docs submodule; PDF builds live in repo _pdf_build/.

+
+