import { getLang, initLangToggle } from './i18n.js'; const DATA = { ru: { heading: 'ls projects/', subheading: 'Пара вещей, которые я собрал сам, от идеи до продакшена.', projects: [ { name: 'home_automatization', description: 'В разработке: архитектура и ТЗ готовы, микросервисы на Go и Laravel собираются. Первая зона — гроубокс (полив, свет, климат), дальше — весь дом.', tags: ['в разработке', 'Go', 'Laravel', 'Docker', 'RabbitMQ', 'ClickHouse', 'gRPC', 'MQTT'], url: 'https://git.cactoz.su/cacto/home_automatization', linkLabel: 'открыть', }, { name: 'home_automatization_controllers', description: 'Прошивка ESP32 для зоны «Гроубокс»: датчик DHT22 и три реле-актуатора (свет, полив, вентиляция), общается с платформой по MQTT.', tags: ['C++', 'ESP32', 'Arduino', 'MQTT', 'DHT22'], url: 'https://git.cactoz.su/cacto/home_automatization_controllers', linkLabel: 'открыть', }, { name: 'cactoz.su', description: 'Личный сайт-визитка: резюме, проекты и мультиплеерная мини-игра про танки. Тема — Матрица.', tags: ['HTML/CSS/JS', 'C++', 'uWebSockets', 'Quintus.js', 'nginx', 'Docker'], url: 'https://git.cactoz.su/cacto/cactoz.su', linkLabel: 'открыть', }, ], }, en: { heading: 'ls projects/', subheading: 'A couple of things I built myself, start to finish.', projects: [ { name: 'home_automatization', description: 'Work in progress: architecture and spec are done, Go and Laravel microservices are being built. First zone is a grow box (watering, lighting, climate), the whole house comes next.', tags: ['in progress', 'Go', 'Laravel', 'Docker', 'RabbitMQ', 'ClickHouse', 'gRPC', 'MQTT'], url: 'https://git.cactoz.su/cacto/home_automatization', linkLabel: 'open', }, { name: 'home_automatization_controllers', description: 'ESP32 firmware for the grow-box zone: a DHT22 sensor and three relay actuators (light, watering, ventilation), talking to the platform over MQTT.', tags: ['C++', 'ESP32', 'Arduino', 'MQTT', 'DHT22'], url: 'https://git.cactoz.su/cacto/home_automatization_controllers', linkLabel: 'open', }, { name: 'cactoz.su', description: 'A personal portfolio site: résumé, projects and a small multiplayer tank game. Matrix theme throughout.', tags: ['HTML/CSS/JS', 'C++', 'uWebSockets', 'Quintus.js', 'nginx', 'Docker'], url: 'https://git.cactoz.su/cacto/cactoz.su', linkLabel: 'open', }, ], }, }; function render() { const t = DATA[getLang()]; document.title = `${t.heading} — cacto`; const heading = document.getElementById('projects-heading'); const subheading = document.getElementById('projects-subheading'); if (heading) heading.textContent = t.heading; if (subheading) subheading.textContent = t.subheading; const list = document.getElementById('project-list'); if (!list) return; list.innerHTML = t.projects .map( (p) => `
${p.description}