import { getLang, initLangToggle } from './i18n.js'; const DATA = { ru: { heading: 'ls projects/', subheading: 'Пара вещей, которые я собрал сам, от идеи до продакшена.', projects: [ { name: 'home_automatization', title: 'Home Automation Platform', description: 'Микросервисная платформа умного дома на Go и Laravel. Первая зона — гроубокс (полив, свет, климат), дальше — весь дом.', tags: ['Go', 'Laravel', 'Docker', 'RabbitMQ', 'ClickHouse', 'gRPC', 'MQTT'], url: 'https://git.cactoz.su/cacto/home_automatization', linkLabel: 'открыть', }, { name: 'cactoz.su', title: 'cactoz.su — этот сайт', description: 'Личный сайт-визитка: резюме, проекты и мультиплеерный клон BattleCity. Тема — Матрица.', 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', title: 'Home Automation Platform', description: 'A microservice smart-home platform on Go and Laravel. First zone is a grow box (watering, lighting, climate), the whole house comes next.', tags: ['Go', 'Laravel', 'Docker', 'RabbitMQ', 'ClickHouse', 'gRPC', 'MQTT'], url: 'https://git.cactoz.su/cacto/home_automatization', linkLabel: 'open', }, { name: 'cactoz.su', title: 'cactoz.su — this site', description: 'A personal portfolio site: résumé, projects and a multiplayer BattleCity clone. 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) => `
  • drwxr-xr-x ${p.name}

    ${p.title}

    ${p.description}

    ${p.linkLabel}: ${p.url.replace('https://', '')}
  • ` ) .join(''); } render(); initLangToggle(render);