diff --git a/app/[lang]/(marketing)/layout.tsx b/app/[lang]/(marketing)/layout.tsx index 9aeafdd..313da79 100644 --- a/app/[lang]/(marketing)/layout.tsx +++ b/app/[lang]/(marketing)/layout.tsx @@ -4,7 +4,7 @@ import { HomeLayout } from 'fumadocs-ui/layouts/home' import { baseOptions } from '@/lib/layout.shared' import { isAppLocale } from '@/lib/i18n' -/** Standalone pages outside the docs tree (/plugins, /roadmap), in both languages. */ +/** Standalone pages outside the docs tree (/plugins, /roadmap, /privacy), in both languages. */ export default async function MarketingLayout({ children, params, diff --git a/app/[lang]/(marketing)/privacy/page.tsx b/app/[lang]/(marketing)/privacy/page.tsx new file mode 100644 index 0000000..d53409d --- /dev/null +++ b/app/[lang]/(marketing)/privacy/page.tsx @@ -0,0 +1,125 @@ +import type { Metadata } from 'next' +import { notFound } from 'next/navigation' +import { isAppLocale, type AppLocale } from '@/lib/i18n' +import { OptOut } from '@/components/analytics-opt-out' + +type Props = { params: Promise<{ lang: string }> } + +type Copy = { + metaTitle: string + title: string + intro: string + sections: Array<{ title: string; items: string[] }> + optOut: { title: string; body: string; off: string; on: string; disabled: string; enabled: string } + contact: string +} + +const copy: Record = { + en: { + metaTitle: 'Privacy', + title: 'Privacy', + intro: + 'easyp.tech counts visits with Umami, an open-source analytics tool that we run on our own server (pulse.sipki.tech). No cookies, no advertising networks, nothing is sold or shared.', + sections: [ + { + title: 'What is collected', + items: [ + 'Pages you open, the site you came from and UTM tags in the link.', + 'Browser, operating system, device type, screen size, language, and country and city derived from the IP address. The IP address itself is not stored.', + 'Clicks on a few buttons: copying the install command, code examples and plugin settings, switching language, opening search, links to other sites.', + 'What you type into the plugin catalog search, so we can see which plugins people look for.', + 'How fast pages load (Web Vitals) and JavaScript errors in your browser.', + 'A recording of how you move around a page (scrolls, clicks, what is on the screen), used to find places where the docs are confusing. Input fields are hidden in the recording.', + ], + }, + { + title: 'What is not collected', + items: [ + 'Names, emails or accounts: the site has no sign-in.', + 'Anything that follows you to other sites.', + ], + }, + ], + optOut: { + title: 'Turning it off', + body: 'The switch below is remembered in this browser and stops both counting and recording.', + off: 'Turn off analytics in this browser', + on: 'Turn analytics back on', + disabled: 'Analytics is off in this browser.', + enabled: 'Analytics is on in this browser.', + }, + contact: + 'Questions, or want your data removed? Write to us in Telegram (t.me/easyptech) or open an issue on GitHub (github.com/easyp-tech/easyp).', + }, + ru: { + metaTitle: 'Приватность', + title: 'Приватность', + intro: + 'easyp.tech считает посещения с помощью Umami — открытой системы аналитики, которая работает на нашем собственном сервере (pulse.sipki.tech). Без cookie и рекламных сетей, данные никому не продаются и не передаются.', + sections: [ + { + title: 'Что собирается', + items: [ + 'Какие страницы вы открываете, с какого сайта пришли и UTM-метки в ссылке.', + 'Браузер, операционная система, тип устройства, размер экрана, язык, а также страна и город, определённые по IP-адресу. Сам IP-адрес не сохраняется.', + 'Нажатия на несколько кнопок: копирование команды установки, примеров кода и настроек плагинов, смена языка, открытие поиска, ссылки на другие сайты.', + 'Что вы ищете в каталоге плагинов, чтобы видеть, каких плагинов не хватает.', + 'Скорость загрузки страниц (Web Vitals) и ошибки JavaScript в браузере.', + 'Запись того, как вы двигаетесь по странице (прокрутка, нажатия, что на экране), чтобы находить места, где документация непонятна. Поля ввода в записи скрыты.', + ], + }, + { + title: 'Что не собирается', + items: [ + 'Имена, почта и учётные записи: входа на сайте нет.', + 'Ничего, что следило бы за вами на других сайтах.', + ], + }, + ], + optOut: { + title: 'Как отключить', + body: 'Переключатель ниже запоминается в этом браузере и выключает и подсчёт, и запись.', + off: 'Отключить аналитику в этом браузере', + on: 'Включить аналитику обратно', + disabled: 'Аналитика в этом браузере выключена.', + enabled: 'Аналитика в этом браузере включена.', + }, + contact: + 'Вопросы или хотите, чтобы мы удалили ваши данные? Напишите нам в Telegram (t.me/easyptech) или в issue на GitHub (github.com/easyp-tech/easyp).', + }, +} + +export async function generateMetadata({ params }: Props): Promise { + const { lang } = await params + if (!isAppLocale(lang)) notFound() + return { title: copy[lang].metaTitle } +} + +export default async function PrivacyPage({ params }: Props) { + const { lang } = await params + if (!isAppLocale(lang)) notFound() + const c = copy[lang] + + return ( +
+

{c.title}

+

{c.intro}

+ {c.sections.map((section) => ( +
+

{section.title}

+
    + {section.items.map((item) => ( +
  • {item}
  • + ))} +
+
+ ))} +
+

{c.optOut.title}

+

{c.optOut.body}

+ +
+

{c.contact}

+
+ ) +} diff --git a/app/[lang]/docs/[[...slug]]/page.tsx b/app/[lang]/docs/[[...slug]]/page.tsx index 3316839..13cc54b 100644 --- a/app/[lang]/docs/[[...slug]]/page.tsx +++ b/app/[lang]/docs/[[...slug]]/page.tsx @@ -33,7 +33,7 @@ export default async function Page({ {page.data.title} {page.data.description} -
+
{children} {/* Umami on sipki.tech (pulse.sipki.tech, team EasyP). data-domains keeps - local runs and previews out of the stats. */} + local runs and previews out of the stats. Performance: Web Vitals of + real visits; errors: uncaught JS errors. What is collected is listed + on /privacy. */}