Add Android BLE mesh client and project website

This commit is contained in:
dom4k
2026-03-16 19:04:20 +00:00
parent 2ad5e03cb7
commit c833fd467d
27 changed files with 1539 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
:root {
--mesh-dark: #0f2a43;
--mesh-accent: #1f8a70;
--mesh-bg: #f4f8fb;
--mesh-text: #1d2630;
}
body {
background: radial-gradient(circle at top right, #d7f6eb 0%, #f4f8fb 40%, #eef3fa 100%);
color: var(--mesh-text);
}
.hero {
color: #fff;
background: linear-gradient(135deg, var(--mesh-dark), #144c72 50%, #196b95);
}
.status-card {
background: rgba(255, 255, 255, 0.14);
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(8px);
}
.feature {
background: #fff;
border: 1px solid #dbe4ef;
height: 100%;
}
footer {
border-top: 1px solid #dbe4ef;
}

50
website/assets/js/app.js Normal file
View File

@@ -0,0 +1,50 @@
document.addEventListener('DOMContentLoaded', () => {
const btn = document.getElementById('downloadBtn');
const versionBadge = document.getElementById('versionBadge');
const versionSummary = document.getElementById('versionSummary');
const downloadMeta = document.getElementById('downloadMeta');
if (!btn) return;
btn.addEventListener('click', (event) => {
if (!btn.getAttribute('href') || btn.getAttribute('href') === '#') {
event.preventDefault();
alert('APK пока не опубликован. Следите за обновлениями проекта.');
}
});
fetch('assets/meta/version.json', { cache: 'no-store' })
.then((response) => {
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return response.json();
})
.then((meta) => {
const sizeMb = (meta.apkSizeBytes / (1024 * 1024)).toFixed(1);
const builtAt = new Date(meta.buildDateUtc).toLocaleString('ru-RU', {
dateStyle: 'medium',
timeStyle: 'short'
});
if (versionBadge) {
versionBadge.textContent = `v${meta.versionName} (${meta.versionCode})`;
}
if (versionSummary) {
versionSummary.textContent = `Последняя сборка опубликована ${builtAt} UTC.`;
}
if (downloadMeta) {
downloadMeta.textContent = `Доступна debug-сборка v${meta.versionName}. Размер APK: ${sizeMb} MB.`;
}
if (meta.apkPath) {
btn.setAttribute('href', meta.apkPath);
}
})
.catch(() => {
if (versionBadge) {
versionBadge.textContent = 'Версия недоступна';
}
if (versionSummary) {
versionSummary.textContent = 'Не удалось загрузить метаданные сборки.';
}
});
});