Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

feat(i18n): added localization (#41)

Corentin Thomasset709daf34f959
diff --git a/astro.config.ts b/astro.config.ts
index 588b2bcd..18c495e6 100644
--- a/astro.config.ts
+++ b/astro.config.ts
@@ -7,6 +7,7 @@ import { defineConfig } from 'astro/config';
import UnoCSS from 'unocss/astro';
import { config } from './src/app.config';
+import { DEFAULT_LOCALE, LOCALES } from './src/i18n/i18n.constants';
import createRedirectsFile from './src/plugins/redirects';
export default defineConfig({
@@ -41,4 +42,13 @@ export default defineConfig({
output: 'static',
adapter: cloudflare(),
+
+ i18n: {
+ locales: LOCALES.map(locale => locale), // Because astro expects string[] and not readonly string[]
+ defaultLocale: DEFAULT_LOCALE,
+ routing: {
+ prefixDefaultLocale: true,
+ redirectToDefaultLocale: false,
+ },
+ },
});
diff --git a/package.json b/package.json
index b5f061ef..6501e596 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
"@astrojs/cloudflare": "^12.6.10",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.3.0",
+ "@branchlet/core": "^1.0.0",
"astro": "^5.7.2",
"astro-capo": "^0.0.1",
"astro-expressive-code": "^0.41.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d1db0b73..cb582e14 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -20,6 +20,9 @@ importers:
'@astrojs/sitemap':
specifier: ^3.3.0
version: 3.3.0
+ '@branchlet/core':
+ specifier: ^1.0.0
+ version: 1.0.0
astro:
specifier: ^5.7.2
@@ -222,6 +225,10 @@ packages:
resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==}
engines: {node: '>=6.9.0'}
+ '@branchlet/[email protected]':
+ resolution: {integrity: sha512-qEFl0VeaIfdtVxHzIGeTu1HW7rpt4haMCV81YYBoFYTJZUBb0YZ2BN3Z6L2klwQ/6XxGJO61Cm5J6RMOKkvFmA==}
+ engines: {node: '>=22.0.0'}
+
'@capsizecss/[email protected]':
resolution: {integrity: sha512-GrSU71meACqcmIUxPYOJvGKF0yryjN/L1aCuE9DViCTJI7bfkjgYDPD1zbNDcINJwSSP6UaBZY9GAbYDO7re0Q==}
@@ -4559,6 +4566,8 @@ snapshots:
'@babel/helper-string-parser': 7.25.9
'@babel/helper-validator-identifier': 7.25.9
+ '@branchlet/[email protected]': {}
+
'@capsizecss/[email protected]':
dependencies:
blob-to-buffer: 1.2.9
diff --git a/src/components/Cta.astro b/src/components/Cta.astro
new file mode 100644
index 00000000..02758dbb
--- /dev/null
+++ b/src/components/Cta.astro
@@ -0,0 +1,22 @@
+---
+import { config } from '../app.config';
+import { useI18n } from '../i18n/i18n';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
+---
+
+<div class="bg-card py-32 px-6">
+ <div
+ class="max-w-1200px mx-auto px-6 border rounded-xl bg-background pt-32 pb-24 bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] px-6 z-20"
+ >
+
+ <h2 class="text-2xl sm:text-4xl font-bold text-center text-pretty max-w-800px mx-auto text-pretty" set:html={t('cta.heading')} />
+ <div class="flex mt-4 items-center justify-center">
+ <a href={config.getStartedLink} class="font-semibold text-background px-4 py-2 hover:bg-primary/80 rounded-lg bg-primary transition mt-8 inline-block flex items-center">
+ {t('cta.get-started')}
+
+ <div class="i-tabler-arrow-right ml-2 size-5" aria-hidden="true"></div>
+ </a>
+ </div>
+ </div>
+</div>
diff --git a/src/components/EarlyAccess.astro b/src/components/EarlyAccess.astro
deleted file mode 100644
index ca94244a..00000000
--- a/src/components/EarlyAccess.astro
+++ /dev/null
@@ -1,32 +0,0 @@
-<div class="bg-card">
- <div class="max-w-1000px mx-auto p-6 py-24">
- <div class="text-center">
- <h2 class="text-2xl font-bold text-pretty">Active Development</h2>
- <p class="text-lg text-muted-foreground mt-1">Join us in shaping the future of Papra</p>
- </div>
-
- <div class="grid gap-6 grid-cols-1 md:grid-cols-3 my-12">
- <div class="bg-background border border-border p-6 rounded-lg">
- <div class="text-lg font-bold mb-2">Active Development</div>
- <p class="text-muted-foreground">We're continuously improving features and performance to deliver a seamless experience.</p>
- </div>
-
- <div class="bg-background border border-border p-6 rounded-lg">
- <div class="text-lg font-bold mb-2">Private Beta</div>
- <p class="text-muted-foreground">Join our private beta to test new features, provide feedback, and help shape the platform.</p>
- </div>
-
- <div class="bg-background border border-border p-6 rounded-lg">
- <div class="text-lg font-bold mb-2">Stay Connected</div>
- <p class="text-muted-foreground">Follow our progress on GitHub or on social media, and be the first to know about updates and announcements.</p>
- </div>
- </div>
-
- <div class="flex justify-center mt-8">
- <a href="https://github.com/papra-hq/papra" class="border text-sm font-bold rounded py-2 px-4 rounded-xl hover:border-primary hover:text-primary transition flex items-center gap-2">
- Explore Our GitHub Repo
- <div class="i-tabler-arrow-right size-5"></div>
- </a>
- </div>
- </div>
-</div>
diff --git a/src/components/FaqAccordion.astro b/src/components/FaqAccordion.astro
index 8e2774f7..84870444 100644
--- a/src/components/FaqAccordion.astro
+++ b/src/components/FaqAccordion.astro
@@ -1,12 +1,10 @@
---
import { cn } from '../utils/cn';
-
-
type Props = {
title: string;
description: string;
- items: {
+ items: readonly {
question: string;
answer: string;
}[];
diff --git a/src/components/FeaturesBento.astro b/src/components/FeaturesBento.astro
index 618cd16c..ef417078 100644
--- a/src/components/FeaturesBento.astro
+++ b/src/components/FeaturesBento.astro
@@ -1,8 +1,11 @@
---
import { Code } from 'astro:components';
+import { useI18n } from '../i18n/i18n';
import { cn } from '../utils/cn';
import BentoCard from './BentoCard.astro';
+const { t } = useI18n({ locale: Astro.currentLocale });
+
const filesIcons = [
'i-tabler-file',
'i-tabler-file-text',
@@ -22,132 +25,126 @@ const filesIcons = [
const getRandomIcon = () => filesIcons[Math.floor(Math.random() * filesIcons.length)];
-
const codeSnippet = `
curl -X POST https://api.papra.ai/v1/documents \\
-H "Authorization: Bearer $PAPRA_API_KEY" \\
-H "Content-Type: multipart/form-data" \\
-F "file=@/path/to/your/file.pdf"
`.trim();
-
-
-
---
<div class="pt-32 pb-48 bg-card p-6 relative overflow-hidden">
<!-- <div class="z-10 bg-primary w-90% max-w-1000px h-60px rounded-full blur-64 op-15 absolute bottom--50px left-50% -translate-x-50% "></div> -->
- <h2 class="text-3xl font-semibold text-pretty mb-2 text-center">
- Some Features
- </h2>
+ <h2 class="text-3xl font-semibold text-pretty mb-2 text-center">{t('features.title')}</h2>
<p class="text-base text-muted-foreground text-center max-w-500px mx-auto mb-24">
- Manage your documents with ease. Papra offers a range of features to help you organize, search, and access your documents effortlessly.
+ {t('features.subtitle')}
</p>
<div class="max-w-1000px mx-auto flex flex-col sm:flex-row gap-4 items-start">
-
<div class="flex flex-col gap-4 w-full">
-
<BentoCard
- title="All your documents in one place"
- description="Say goodbye to scattered documents across different platforms. Papra helps you archive and organize all your documents in one place."
+ title={t('features.all-in-one.title')}
+ description={t('features.all-in-one.description')}
icon="i-tabler-archive"
>
- <div class="grid grid-cols-8 grid-rows-2 gap-4 p-6 overflow-hidden mb--150px">
- {Array.from({ length: 24 }).map(() => <div class={cn('size-8 sm:size-10 text-muted text-center', getRandomIcon())} />)}
- </div>
- </BentoCard>
-
- <BentoCard
- title="Organizations"
- description="Organize your documents into organizations. Organizations help you manage your documents and users, like a team or a company."
- icon="i-tabler-building-community"
- >
- <div class="flex items-center gap-2 p-6 pt-10 pb-4 justify-center">
- <div class="border rounded-xl p-3 flex items-center justify-center">
- <span class="i-tabler-users size-6 text-muted-foreground"></span>
- </div>
-
- <div class="bg-muted-foreground h-3px w-20px rounded-full">
- </div>
-
- <div class="border rounded-xl p-3 flex items-center justify-center border-primary border-2">
- <span class="i-tabler-user text-primary size-6"></span>
- </div>
-
- <div class="bg-muted-foreground h-3px w-20px rounded-full">
- </div>
-
- <div class="border rounded-xl p-3 flex items-center justify-center">
- <span class="i-tabler-users size-6 text-muted-foreground"></span>
- </div>
- </div>
- </BentoCard>
+ <div class="grid grid-cols-8 grid-rows-2 gap-4 p-6 overflow-hidden mb--150px">
+ {Array.from({ length: 24 }).map(() => <div class={cn('size-8 sm:size-10 text-muted text-center', getRandomIcon())} />)}
+ </div>
+ </BentoCard>
+
+ <BentoCard
+ title={t('features.organizations.title')}
+ description={t('features.organizations.description')}
+ icon="i-tabler-building-community"
+ >
+ <div class="flex items-center gap-2 p-6 pt-10 pb-4 justify-center">
+ <div class="border rounded-xl p-3 flex items-center justify-center">
+ <span class="i-tabler-users size-6 text-muted-foreground"></span>
+ </div>
+ <div class="bg-muted-foreground h-3px w-20px rounded-full"></div>
-<BentoCard title="Documents tagging" description="Organize your documents with tags. Tags help you categorize and filter your documents easily. Define tagging rules to automatically tag your documents." icon="i-tabler-tag">
- <div class="mt-6" />
-</BentoCard>
+ <div class="border rounded-xl p-3 flex items-center justify-center border-primary border-2">
+ <span class="i-tabler-user text-primary size-6"></span>
+ </div>
- </div>
+ <div class="bg-muted-foreground h-3px w-20px rounded-full"></div>
+
+ <div class="border rounded-xl p-3 flex items-center justify-center">
+ <span class="i-tabler-users size-6 text-muted-foreground"></span>
+ </div>
+ </div>
+ </BentoCard>
+
+ <BentoCard
+ title={t('features.tagging.title')}
+ description={t('features.tagging.description')}
+ icon="i-tabler-tag"
+ >
+ <div class="mt-6"></div>
+ </BentoCard>
+ </div>
<div class="flex flex-col gap-4 w-full">
<BentoCard
- title="Search and find documents easily"
- description="With Papra's powerful search functionality, you can find any document in seconds. No more endless scrolling and searching."
+ title={t('features.search.title')}
+ description={t('features.search.description')}
icon="i-tabler-search"
>
- <div class="mb--180px flex items-start justify-center pt-6 relative">
+ <div class="mb--180px flex items-start justify-center pt-6 relative" role="img" aria-label="Search feature illustration">
<div class="bg-background sm:min-w-64 border rounded-lg">
<div class="px-4 py-2 flex items-center gap-2">
<span class="i-tabler-search size-4 text-primary"></span>
- <span class="text-muted-foreground text-xs">Search for documents...</span>
+ <span class="text-muted-foreground text-xs">{t('features.search.placeholder')}</span>
</div>
<div class="border-t p-4 text-xs text-muted-foreground">
<div class="flex items-center gap-2">
<span class="i-tabler-file-text size-4"></span>
- Phone invoice.pdf
+ {t('features.search.example-1')}
</div>
<div class="flex items-center gap-2 mt-2">
<span class="i-tabler-file-analytics size-4"></span>
- Analytics report.pdf
+ {t('features.search.example-2')}
</div>
<div class="flex items-center gap-2 mt-2">
<span class="i-tabler-file-code size-4"></span>
- Code snippets.txt
+ {t('features.search.example-3')}
</div>
<div class="flex items-center gap-2 mt-2">
<span class="i-tabler-file size-4"></span>
- Document.docx
+ {t('features.search.example-4')}
</div>
</div>
</div>
</div>
</BentoCard>
- <BentoCard title="Developer friendly" description="Papra is built with customizability in mind. We provide a powerful API, webhooks, CLI and SDK to help you integrate Papra into your existing workflow." icon="i-tabler-code">
+ <BentoCard
+ title={t('features.developer-friendly.title')}
+ description={t('features.developer-friendly.description')}
+ icon="i-tabler-code"
+ >
<div class="flex justify-center p-6">
- <Code code={codeSnippet} lang="bash" theme="vitesse-dark" class="text-xs bg-transparent!" />
+ <Code code={codeSnippet} lang="bash" theme="vitesse-dark" class="text-xs bg-transparent!" role="presentation" />
</div>
</BentoCard>
-
<BentoCard
- title="Email ingestion"
- description="Generate a unique email address and forward your emails to Papra. We'll automatically save your email attachments as documents."
+ title={t('features.email-ingestion.title')}
+ description={t('features.email-ingestion.description')}
icon="i-tabler-mail"
>
- <div class="flex items-center gap-4 p-6 pt-10 pb-4 justify-center">
- <span class="i-tabler-file-text size-10 text-muted-foreground"></span>
- <span class="i-tabler-arrow-right size-6 text-muted-foreground"></span>
- <span class="i-tabler-mailbox size-10 text-primary"></span>
- </div>
- </BentoCard>
-
+ <div class="flex items-center gap-4 p-6 pt-10 pb-4 justify-center">
+ <span class="i-tabler-file-text size-10 text-muted-foreground"></span>
+ <span class="i-tabler-arrow-right size-6 text-muted-foreground"></span>
+ <span class="i-tabler-mailbox size-10 text-primary"></span>
+ </div>
+ </BentoCard>
</div>
</div>
</div>
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index 1b155a94..5613dc62 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -1,24 +1,28 @@
---
+import { useI18n } from '../i18n/i18n';
import { cn } from '../utils/cn';
+import LanguagePicker from './LanguagePicker.astro';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
const socials = [
{
- label: 'Bluesky',
+ label: t('footer.social.bluesky'),
url: 'https://bsky.app/profile/papra.app',
icon: 'i-tabler-brand-bluesky',
},
{
- label: 'GitHub',
+ label: t('footer.social.github'),
url: 'https://github.com/papra-hq/papra',
icon: 'i-tabler-brand-github',
},
{
- label: 'Discord',
+ label: t('footer.social.discord'),
url: '/discord',
icon: 'i-tabler-brand-discord',
},
{
- label: 'Reddit',
+ label: t('footer.social.reddit'),
url: 'https://www.reddit.com/r/Papra',
icon: 'i-tabler-brand-reddit',
},
@@ -29,30 +33,30 @@ const sections: {
links: { label: string; url: string; target?: string; rel?: string }[];
}[] = [
{
- title: 'Community',
+ title: t('footer.section.community'),
links: socials,
},
{
- title: 'Papra',
+ title: t('footer.section.papra'),
links: [
{
- label: 'Blog',
+ label: t('footer.link.blog'),
url: '/blog',
},
{
- label: 'Demo app',
+ label: t('footer.link.demo-app'),
url: 'https://demo.papra.app',
},
{
- label: 'Documentation',
+ label: t('footer.link.documentation'),
url: 'https://docs.papra.app',
},
{
- label: 'Self-host',
+ label: t('footer.link.self-host'),
url: 'https://docs.papra.app/self-hosting/using-docker/',
},
{
- label: 'Roadmap',
+ label: t('footer.link.roadmap'),
url: 'https://github.com/orgs/papra-hq/projects/2',
},
{
@@ -68,43 +72,43 @@ const sections: {
],
},
{
- title: 'Open Source',
+ title: t('footer.section.open-source'),
links: [
{
- label: 'Repository',
+ label: t('footer.link.repository'),
url: 'https://github.com/papra-hq/papra',
},
{
- label: 'Contributing',
+ label: t('footer.link.contributing'),
url: 'https://github.com/papra-hq/papra/blob/main/CONTRIBUTING.md',
},
{
- label: 'Code of Conduct',
+ label: t('footer.link.code-of-conduct'),
url: 'https://github.com/papra-hq/papra/blob/main/CODE_OF_CONDUCT.md',
},
{
- label: 'License',
+ label: t('footer.link.license'),
url: 'https://github.com/papra-hq/papra/blob/main/LICENSE',
},
{
- label: 'This website',
+ label: t('footer.link.this-website'),
url: 'https://github.com/papra-hq/papra-website',
},
],
},
{
- title: 'Legal',
+ title: t('footer.section.legal'),
links: [
{
- label: 'Terms of Service',
+ label: t('footer.link.terms-of-service'),
url: '/terms-of-service',
},
{
- label: 'Privacy Policy',
+ label: t('footer.link.privacy-policy'),
url: '/privacy',
},
{
- label: 'Contact',
+ label: t('footer.link.contact'),
url: '/contact',
},
],
@@ -113,9 +117,9 @@ const sections: {
---
<footer class="bg-card border-t border-border py-8 text-muted-foreground">
- <div class="max-w-1000px mx-auto p-4">
+ <div class="max-w-1200px mx-auto p-4">
<div class="flex justify-between flex-col md:flex-row gap-10">
- <div>
+ <div class="">
<a href="/" class="text-xl font-bold flex items-center group mb-2">
<div class="i-tabler-file-text size-7 text-primary group-hover:(rotate-25deg) transition transform rotate-12deg"></div>
<span class="ml-2 text-foreground group-hover:text-foreground/80 transition">Papra</span>
@@ -131,13 +135,14 @@ const sections: {
}
</div>
- <p class="mt-4 text-sm max-w-250px">
- Papra is made and hosted in Europe with <span class="i-tabler-heart-filled size-3.5 mb--0.3 text-primary inline-block"></span>
- by <a href="https://corentin.tech" class="text-primary border-b hover:border-b-primary transition">Corentin Thomasset</a>.
- </p>
+ <p class="mt-4 text-sm max-w-250px" set:html={t('footer.made-in-europe')} />
+
+ <div class="mt-6">
+ <LanguagePicker />
+ </div>
</div>
- <div class={cn('grid gap-10 grid-cols-1', `sm:grid-cols-${sections.length}`)}>
+ <div class={cn('grid gap-6 grid-cols-1', `sm:grid-cols-${sections.length}`)}>
{
sections.map(section => (
<div>
@@ -155,8 +160,6 @@ const sections: {
</div>
</div>
- <div class="mt-8 border-t border-border pt-4">
- © {new Date().getFullYear()} Papra. All rights reserved.
- </div>
+ <div class="mt-8 border-t border-border pt-4" set:html={t('footer.copyright', { year: new Date().getFullYear() })} />
</div>
</footer>
diff --git a/src/components/Header.astro b/src/components/Header.astro
index 723af1a9..ca9869ea 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -1,7 +1,10 @@
---
import { config, requestEarlyAccessLink } from '../app.config';
+import { useI18n } from '../i18n/i18n';
import { cn } from '../utils/cn';
+const { t } = useI18n({ locale: Astro.currentLocale });
+
const socials = [
{
name: 'Bluesky',
@@ -22,25 +25,25 @@ const socials = [
const navigation = [
{
- name: 'Demo',
+ name: t('nav.demo'),
url: 'https://demo.papra.app',
},
{
- name: 'Docs',
+ name: t('nav.docs'),
url: 'https://docs.papra.app',
},
{
- name: 'Blog',
+ name: t('nav.blog'),
url: '/blog',
},
{
- name: 'Self-host',
+ name: t('nav.self-host'),
url: 'https://docs.papra.app/self-hosting/using-docker/',
},
...(config.isLaunched
? [
{
- name: 'Pricing',
+ name: t('nav.pricing'),
url: '/pricing',
},
]
@@ -88,7 +91,7 @@ const { class: className } = Astro.props;
href={config.getStartedLink}
target="_blank"
>
- {config.getStartedLink === requestEarlyAccessLink ? 'Early Access' : 'Get Started'}
+ {config.getStartedLink === requestEarlyAccessLink ? t('nav.early-access') : t('nav.sign-in')}
<div class="i-tabler-arrow-right size-4"></div>
</a>
</div>
diff --git a/src/components/LanguagePicker.astro b/src/components/LanguagePicker.astro
new file mode 100644
index 00000000..f2c183b2
--- /dev/null
+++ b/src/components/LanguagePicker.astro
@@ -0,0 +1,99 @@
+---
+import { getPathWithoutLocale, getTranslations } from '../i18n/i18n';
+import { LOCALES } from '../i18n/i18n.constants';
+import { cn } from '../utils/cn';
+
+const languages = LOCALES.map((locale) => {
+ const translations = getTranslations({ locale });
+ return {
+ code: locale,
+ name: translations['language-name'],
+ url: `/${locale}${getPathWithoutLocale(Astro.url)}`,
+ isActive: locale === Astro.currentLocale,
+ };
+});
+
+const currentLanguage = languages.find(lang => lang.isActive);
+---
+
+<div class="relative language-picker">
+ <button
+ type="button"
+ class="flex items-center gap-2 bg-background border border-border rounded-md px-3 py-2 text-sm hover:border-primary focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary transition cursor-pointer"
+ aria-haspopup="true"
+ >
+ <div class="i-tabler-language size-5" role="img" aria-hidden="true"></div>
+ <span>{currentLanguage?.name}</span>
+ <div class="i-tabler-chevron-down size-4 transition-transform language-picker-chevron" aria-hidden="true"></div>
+ </button>
+
+ <div class="language-picker-menu absolute bottom-full left-0 mb-2 hidden bg-background border border-border rounded-md shadow-lg overflow-hidden min-w-full">
+ {
+ languages.map(lang => (
+ <a
+ href={lang.url}
+ class={cn(
+ 'block px-3 py-2 text-sm hover:bg-muted transition outline-none focus:bg-muted focus:ring-2 focus:ring-primary focus:ring-inset',
+ lang.isActive && 'bg-primary/10 text-primary font-semibold',
+ )}
+ aria-current={lang.isActive ? 'page' : undefined}
+ >
+ {lang.name}
+ </a>
+ ))
+ }
+ </div>
+</div>
+
+<script>
+document.addEventListener('DOMContentLoaded', () => {
+ const pickers = document.querySelectorAll('.language-picker');
+
+ pickers.forEach((picker) => {
+ const button = picker.querySelector('button');
+ const menu = picker.querySelector('.language-picker-menu');
+ const chevron = picker.querySelector('.language-picker-chevron');
+
+ if (!button || !menu || !chevron) {
+ return;
+ }
+
+ let isOpen = false;
+
+ const toggle = () => {
+ isOpen = !isOpen;
+ menu.classList.toggle('hidden', !isOpen);
+ chevron.classList.toggle('rotate-180', isOpen);
+ button.setAttribute('aria-expanded', String(isOpen));
+ };
+
+ const close = () => {
+ if (isOpen) {
+ isOpen = false;
+ menu.classList.add('hidden');
+ chevron.classList.remove('rotate-180');
+ button.setAttribute('aria-expanded', 'false');
+ }
+ };
+
+ button.addEventListener('click', (e) => {
+ e.stopPropagation();
+ toggle();
+ });
+
+ // Close when clicking outside
+ document.addEventListener('click', (e) => {
+ if (!picker.contains(e.target as Node)) {
+ close();
+ }
+ });
+
+ // Close on escape key
+ document.addEventListener('keydown', (e) => {
+ if (e.key === 'Escape') {
+ close();
+ }
+ });
+ });
+});
+</script>
diff --git a/src/components/LaunchBanner.astro b/src/components/LaunchBanner.astro
index 873a172c..0f27372e 100644
--- a/src/components/LaunchBanner.astro
+++ b/src/components/LaunchBanner.astro
@@ -1,5 +1,8 @@
---
import { config } from '../app.config';
+import { useI18n } from '../i18n/i18n';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
---
<a
@@ -11,40 +14,6 @@ import { config } from '../app.config';
>
<span class="flex items-center">
<span class="i-tabler-speakerphone size-5.5 align-middle hidden sm:inline-block mr-1 flex-shrink-0"></span>
- <span>
- Launch Special: Get {config.launchDiscount.percentage}% off <span class="underline">lifetime</span> - Offer ends <span
- class="end-date"
- data-end-date={config.launchDiscount.endsAt.toISOString()}
- >{config.launchDiscount.endsAt.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' })}</span
- >
- </span>
+ {t('launch-banner.text', { percentage: config.launchDiscount.percentage })}
</span>
</a>
-
-<script>
- (() => {
- // Replace the end date text with a countdown in days if the date is in the future
- const endDateElement = document.querySelector('.end-date');
-
- if (endDateElement) {
- const endDate = new Date(endDateElement.getAttribute('data-end-date')!);
- const now = new Date();
- if (endDate < now) {
- document.querySelector('.launch-banner')?.remove();
- return;
- }
-
- const diff = endDate.getTime() - now.getTime();
- const days = Math.ceil(diff / (1000 * 60 * 60 * 24));
- const hours = Math.ceil(diff / (1000 * 60 * 60));
-
- if (days > 0) {
- endDateElement.textContent = `in ${days} day${days !== 1 ? 's' : ''}`;
- return;
- }
- if (hours > 0) {
- endDateElement.textContent = `in ${hours} hour${hours !== 1 ? 's' : ''}`;
- }
- }
- })();
-</script>
diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro
index 8b898f7c..a9dc4d9c 100644
--- a/src/components/Pagination.astro
+++ b/src/components/Pagination.astro
@@ -1,6 +1,9 @@
---
import type { Page } from 'astro';
import type { HTMLAttributes } from 'astro/types';
+import { useI18n } from '../i18n/i18n';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
export type Props = Omit<HTMLAttributes<'nav'>, 'slot'> & {
page: Page<unknown>;
@@ -67,7 +70,7 @@ const collapsedPages = collapseRange({ page, pages });
<li class="rounded-full border">
<a href={page.url.prev} data-astro-prefetch class="flex h-10 w-10 items-center justify-center">
<span class="sr-only">
- Go to page {page.currentPage - 1} of {page.lastPage}
+ {t('pagination.go-to-page', { page: page.currentPage - 1, total: page.lastPage })}
</span>
<div class="i-tabler-arrow-left size-6" aria-hidden="true" />
</a>
@@ -97,14 +100,14 @@ const collapsedPages = collapseRange({ page, pages });
))
}
<li class="sm:hidden">
- <p aria-current="page">Page {page.currentPage} of {page.lastPage}</p>
+ <p aria-current="page">{t('pagination.page', { current: page.currentPage, total: page.lastPage })}</p>
</li>
{
page.url.next && (
<li class="rounded-full border">
<a href={page.url.next} data-astro-prefetch class="flex h-10 w-10 items-center justify-center">
<span class="sr-only">
- Go to page {page.currentPage + 1} of {page.lastPage}
+ {t('pagination.go-to-page', { page: page.currentPage + 1, total: page.lastPage })}
</span>
<div class="i-tabler-arrow-right size-6" aria-hidden="true" />
</a>
diff --git a/src/components/ValuesSection.astro b/src/components/ValuesSection.astro
index 683fba19..7996dd73 100644
--- a/src/components/ValuesSection.astro
+++ b/src/components/ValuesSection.astro
@@ -1,34 +1,39 @@
---
+import { useI18n } from '../i18n/i18n';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
+
+
const values = [
{
icon: 'i-tabler-heart-handshake',
- title: 'Ethical by Design',
- description: 'No dark patterns, no manipulative tactics. We build software that respects you.',
+ title: t('values.ethical-by-design.title'),
+ description: t('values.ethical-by-design.description'),
},
{
icon: 'i-tabler-building-bank',
- title: 'Bootstrapped & Independent',
- description: 'No VC funding, no diluted financing, debt-free. We answer to our users, not investors.',
+ title: t('values.bootstrapped-and-independent.title'),
+ description: t('values.bootstrapped-and-independent.description'),
},
{
icon: 'i-tabler-shield-lock',
- title: 'Your Data is Yours',
- description: 'We never sell your data. Period. Privacy is a right, not a feature.',
+ title: t('values.your-data-is-yours.title'),
+ description: t('values.your-data-is-yours.description'),
},
{
icon: 'i-tabler-brand-open-source',
- title: 'Fully Open Source',
- description: 'Complete transparency. Audit our code, contribute, or self-host anytime.',
+ title: t('values.fully-open-source.title'),
+ description: t('values.fully-open-source.description'),
},
{
icon: 'i-tabler-trees',
- title: 'Environmentally Conscious',
- description: 'We prioritize sustainability and eco-friendliness in our operations and product design.',
+ title: t('values.environmentally-conscious.title'),
+ description: t('values.environmentally-conscious.description'),
},
{
icon: 'i-tabler-users',
- title: 'Community-Driven',
- description: 'Built with and for the community. Your feedback shapes our roadmap.',
+ title: t('values.community-driven.title'),
+ description: t('values.community-driven.description'),
},
];
---
@@ -38,10 +43,8 @@ const values = [
<div class="max-w-1200px mx-auto px-6 relative z-20">
<div class="text-center mb-24">
- <h2 class="text-3xl sm:text-4xl font-bold mb-4">Built on Principles, Not Profit</h2>
- <p class="text-lg text-muted-foreground max-w-2xl mx-auto">
- We're committed to building software the right way. <br /> No shortcuts, no compromises.
- </p>
+ <h2 class="text-3xl sm:text-4xl font-bold mb-4">{t('values.title')}</h2>
+ <p class="text-lg text-muted-foreground max-w-2xl mx-auto" set:html={t('values.subtitle')} />
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
diff --git a/src/i18n/i18n.constants.ts b/src/i18n/i18n.constants.ts
new file mode 100644
index 00000000..078778f5
--- /dev/null
+++ b/src/i18n/i18n.constants.ts
@@ -0,0 +1,4 @@
+export const LOCALES = ['en', 'fr'] as const;
+export type Locale = (typeof LOCALES)[number];
+
+export const DEFAULT_LOCALE: Locale = 'en';
diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts
new file mode 100644
index 00000000..62719bb4
--- /dev/null
+++ b/src/i18n/i18n.ts
@@ -0,0 +1,61 @@
+import type { TranslationsDictionary } from './i18n.types';
+import { createBranchlet } from '@branchlet/core';
+import { translations } from '../locales/index';
+import { DEFAULT_LOCALE, LOCALES } from './i18n.constants';
+
+export function getLocaleFromUrl(url: URL) {
+ const [, lang] = url.pathname.split('/');
+
+ if (lang && (LOCALES as ReadonlyArray<string>).includes(lang)) {
+ return lang;
+ }
+
+ return DEFAULT_LOCALE;
+}
+
+export function getTranslations({ locale }: { locale: string }): TranslationsDictionary {
+ const defaultTranslations = translations[DEFAULT_LOCALE] as TranslationsDictionary;
+
+ if (locale === DEFAULT_LOCALE) {
+ return defaultTranslations;
+ }
+
+ const localeTranslations = (translations as Record<string, typeof defaultTranslations>)[locale] ?? {};
+
+ return {
+ ...defaultTranslations,
+ ...localeTranslations,
+ };
+}
+
+const { parse } = createBranchlet();
+
+export function useI18n({ locale = DEFAULT_LOCALE }: { locale?: string }) {
+ return {
+ locale,
+ t: <K extends keyof TranslationsDictionary>(key: K, args?: Record<string, string | number>): TranslationsDictionary[K] => {
+ const translations = getTranslations({ locale });
+ const template = translations[key] ?? key;
+
+ if (typeof template !== 'string') {
+ return template;
+ }
+
+ return parse(template, args) as TranslationsDictionary[K];
+ },
+ };
+}
+
+export function getPathWithoutLocale(url: URL | string) {
+ const pathname = typeof url === 'string' ? url : url.pathname;
+
+ // remove first / if exists
+ const trimmedPathname = pathname.startsWith('/') ? pathname.slice(1) : pathname;
+ const [firstSegment, ...rest] = trimmedPathname.split('/');
+
+ if (firstSegment && (LOCALES as ReadonlyArray<string>).includes(firstSegment)) {
+ return `/${rest.join('/')}`;
+ }
+
+ return pathname;
+}
diff --git a/src/i18n/i18n.types.ts b/src/i18n/i18n.types.ts
new file mode 100644
index 00000000..18155dc1
--- /dev/null
+++ b/src/i18n/i18n.types.ts
@@ -0,0 +1,7 @@
+import type { translations as defaultTranslations } from '../locales/en';
+
+type Widen<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends Array<infer U> ? Array<Widen<U>> : T extends object ? { [K in keyof T]: Widen<T[K]> } : T;
+
+export type TranslationsDictionary = {
+ [K in keyof typeof defaultTranslations]: Widen<typeof defaultTranslations[K]>;
+};
diff --git a/src/locales/en.ts b/src/locales/en.ts
new file mode 100644
index 00000000..b45f0bf6
--- /dev/null
+++ b/src/locales/en.ts
@@ -0,0 +1,269 @@
+export const translations = {
+ 'language-name': 'English',
+
+ // Call to Action Section
+ 'cta.get-started': 'Get Started',
+ 'cta.heading': 'Stop searching. Start finding.<br /> Organize your documents with Papra.',
+
+ // Values Section
+ 'values.title': 'Built on Principles, Not Profit',
+ 'values.subtitle': 'We\'re committed to building software the right way. <br /> No shortcuts, no compromises.',
+
+ 'values.ethical-by-design.title': 'Ethical by Design',
+ 'values.ethical-by-design.description': 'No dark patterns, no manipulative tactics. We build software that respects you.',
+
+ 'values.bootstrapped-and-independent.title': 'Bootstrapped & Independent',
+ 'values.bootstrapped-and-independent.description': 'No VC funding, no diluted financing, debt-free. We answer to our users, not investors.',
+
+ 'values.your-data-is-yours.title': 'Your Data is Yours',
+ 'values.your-data-is-yours.description': 'We never sell your data. Period. Privacy is a right, not a feature.',
+
+ 'values.fully-open-source.title': 'Fully Open Source',
+ 'values.fully-open-source.description': 'Complete transparency. Audit our code, contribute, or self-host anytime.',
+
+ 'values.environmentally-conscious.title': 'Environmentally Conscious',
+ 'values.environmentally-conscious.description': 'We prioritize sustainability and eco-friendliness in our operations and product design.',
+
+ 'values.community-driven.title': 'Community-Driven',
+ 'values.community-driven.description': 'Built with and for the community. Your feedback shapes our roadmap.',
+
+ // Features Section
+ 'features.title': 'Features',
+ 'features.subtitle': 'Manage your documents with ease. Papra offers a range of features to help you organize, search, and access your documents effortlessly.',
+
+ 'features.all-in-one.title': 'All your documents in one place',
+ 'features.all-in-one.description': 'Say goodbye to scattered documents across different platforms. Papra helps you archive and organize all your documents in one place.',
+
+ 'features.organizations.title': 'Organizations',
+ 'features.organizations.description': 'Organize your documents into organizations. Organizations help you manage your documents and users, like a team or a company.',
+
+ 'features.tagging.title': 'Documents tagging',
+ 'features.tagging.description': 'Organize your documents with tags. Tags help you categorize and filter your documents easily. Define tagging rules to automatically tag your documents.',
+
+ 'features.search.title': 'Search and find documents easily',
+ 'features.search.description': 'With Papra\'s powerful search functionality, you can find any document in seconds. No more endless scrolling and searching.',
+ 'features.search.placeholder': 'Search for documents...',
+ 'features.search.example-1': 'Phone invoice.pdf',
+ 'features.search.example-2': 'Analytics report.pdf',
+ 'features.search.example-3': 'Code snippets.txt',
+ 'features.search.example-4': 'Document.docx',
+
+ 'features.developer-friendly.title': 'Developer friendly',
+ 'features.developer-friendly.description': 'Papra is built with customizability in mind. We provide a powerful API, webhooks, CLI and SDK to help you integrate Papra into your existing workflow.',
+
+ 'features.email-ingestion.title': 'Email ingestion',
+ 'features.email-ingestion.description': 'Generate a unique email address and forward your emails to Papra. We\'ll automatically save your email attachments as documents.',
+
+ // Footer Section
+ 'footer.made-in-europe': 'Papra is made and hosted in Europe with <span class="i-tabler-heart-filled size-3.5 mb--0.3 text-primary inline-block"></span> by <a href="https://corentin.tech" class="text-primary border-b hover:border-b-primary transition">Corentin Thomasset</a>.',
+ 'footer.copyright': '© {{year}} Papra. All rights reserved.',
+
+ // Footer - Social links
+ 'footer.social.bluesky': 'Bluesky',
+ 'footer.social.github': 'GitHub',
+ 'footer.social.discord': 'Discord',
+ 'footer.social.reddit': 'Reddit',
+
+ // Footer - Sections
+ 'footer.section.community': 'Community',
+ 'footer.section.papra': 'Papra',
+ 'footer.section.open-source': 'Open Source',
+ 'footer.section.legal': 'Legal',
+
+ // Footer - Papra links
+ 'footer.link.blog': 'Blog',
+ 'footer.link.demo-app': 'Demo app',
+ 'footer.link.documentation': 'Documentation',
+ 'footer.link.self-host': 'Self-host',
+ 'footer.link.roadmap': 'Roadmap',
+
+ // Footer - Open Source links
+ 'footer.link.repository': 'Repository',
+ 'footer.link.contributing': 'Contributing',
+ 'footer.link.code-of-conduct': 'Code of Conduct',
+ 'footer.link.license': 'License',
+ 'footer.link.this-website': 'This website',
+
+ // Footer - Legal links
+ 'footer.link.terms-of-service': 'Terms of Service',
+ 'footer.link.privacy-policy': 'Privacy Policy',
+ 'footer.link.contact': 'Contact',
+
+ // Home Page - Hero Section
+ 'home.hero.title': 'Your Solution to Document Chaos',
+ 'home.hero.subtitle': 'Papra is an open-source document management platform designed to help you organize, secure, and archive your files effortlessly.',
+ 'home.hero.live-demo': 'Live Demo',
+ 'home.hero.get-started': 'Get started',
+
+ // Home Page - Open Source Section
+ 'home.open-source.title': 'Papra is <span class="bg-primary text-primary-foreground px-3 py-1 rounded-md inline-block leading-tight">open-source</span>',
+ 'home.open-source.description': 'The whole Papra ecosystem is proudly open-source and easily self-hostable. It\'s available on <a href="https://github.com/papra-hq/papra" class="text-primary hover:underline">GitHub</a> under the <a href="https://github.com/papra-hq/papra/blob/main/LICENSE" class="text-primary hover:underline">AGPL-3.0</a> license.',
+ 'home.open-source.see-on-github': 'See on GitHub',
+
+ // Home Page - FAQ Section
+ 'home.faq.title': 'Frequently Asked Questions',
+ 'home.faq.subtitle': 'Everything you need to know about Papra',
+
+ 'home.faq.questions': [
+ {
+ question: 'What is Papra?',
+ answer: 'Papra is an open-source document management platform designed to help you organize, secure, and archive your files effortlessly. It provides a centralized solution for managing all your documents in one place.',
+ },
+ {
+ question: 'Is Papra really open-source?',
+ answer: 'Yes! Papra is completely open-source and available under the AGPL-3.0 license. You can view the source code on GitHub and even self-host it if you prefer.',
+ },
+ {
+ question: 'How does document organization work?',
+ answer: 'Papra uses a combination of organizations, tags, and powerful search functionality to help you organize your documents. You can create organizations for teams or companies, add tags for categorization, and find documents quickly with our search feature.',
+ },
+ {
+ question: 'Can I self-host Papra?',
+ answer: 'Absolutely! Since Papra is open-source, you can self-host it on your own infrastructure. This gives you complete control over your data and allows you to customize the platform to your specific needs.',
+ },
+ {
+ question: 'What file types does Papra support?',
+ answer: 'Papra supports a wide range of document types including PDFs, text files, code files, invoices, spreadsheets, and many more. The platform is designed to handle various file formats commonly used in business and personal document management.',
+ },
+ {
+ question: 'Are my documents secure?',
+ answer: 'Yes! Papra uses industry-standard in-transit and at-rest encryption to protect your documents.',
+ },
+ {
+ question: 'Are my data stored in Europe?',
+ answer: 'Yes! Papra is hosted in Europe and all data is stored in Europe.',
+ },
+ {
+ question: 'How can I get started with Papra?',
+ answer: 'Getting started with Papra is easy! Simply sign up for a free account, upload your documents, and start organizing them. You can also check out our documentation for more detailed instructions on how to use the platform.',
+ },
+ ],
+
+ // Pricing Page
+ 'pricing.title': 'Simple, transparent pricing',
+ 'pricing.subtitle': 'Choose the plan that fits your needs. All plans include core Papra features.',
+ 'pricing.toggle.monthly': 'Monthly',
+ 'pricing.toggle.annual': 'Annual',
+ 'pricing.currency-note': 'Prices shown in USD. Your bank will convert to your local currency at checkout if needed.',
+ 'pricing.most-popular': 'Most Popular',
+ 'pricing.per-month': '/ month',
+ 'pricing.billed-annually': '{{price}} billed annually',
+ 'pricing.get-started': 'Get Started',
+ 'pricing.contact-us': 'Contact us',
+
+ // Pricing Page - Plans
+ 'pricing.plan.free.name': 'Free, forever',
+ 'pricing.plan.free.features': [
+ '512MB storage (~4,000 standard PDF)',
+ '3 members per organization',
+ 'Max upload size: 25MB',
+ '1 intake email address',
+ 'Basic support',
+ ],
+
+ 'pricing.plan.plus.name': 'Plus',
+ 'pricing.plan.plus.features': [
+ '5GB storage (~20,000 standard PDF)',
+ '10 members per organization',
+ 'Max upload size: 100MB',
+ '10 intake email addresses',
+ 'Priority support',
+ ],
+
+ 'pricing.plan.pro.name': 'Pro',
+ 'pricing.plan.pro.features': [
+ '50GB storage (~200,000 standard PDF)',
+ '50 members per organization',
+ 'Max upload size: 500MB',
+ '100 intake email addresses',
+ 'Priority support',
+ ],
+
+ // Pricing Page - Enterprise & Self-hosting
+ 'pricing.enterprise.title': 'Enterprise solutions',
+ 'pricing.enterprise.description': 'Looking for a custom plan tailored to your organization\'s needs? <br /> We offer enterprise solutions with advanced features, dedicated support, and flexible pricing. Contact us to discuss your requirements and get a personalized quote.',
+ 'pricing.self-hosting.title': 'Self-hosting',
+ 'pricing.self-hosting.description': 'Papra is open-source, under the <a href="https://github.com/papra-app/papra/blob/main/LICENSE" class="underline hover:text-primary transition">AGPLv3</a> and can be self-hosted on your own infrastructure at no cost. <br />Get started with our documentation.',
+ 'pricing.self-hosting.cta': 'View self-hosting guide',
+
+ // Pricing Page - FAQ
+ 'pricing.faq.title': 'Frequently Asked Questions',
+ 'pricing.faq.subtitle': 'Everything you need to know about Papra pricing',
+
+ 'pricing.faq.questions': [
+ {
+ question: 'Can I change plans at any time?',
+ answer: 'Yes, you can upgrade or downgrade your plan at any time. If you upgrade, you\'ll be charged a prorated amount for the remainder of your billing period. If you downgrade, the change will take effect at the end of your current billing cycle.',
+ },
+ {
+ question: 'What happens if I exceed my storage limit?',
+ answer: 'If you reach your storage limit, you won\'t be able to upload new documents until you either upgrade your plan or delete some existing documents. We\'ll send you notifications before you reach your limit.',
+ },
+ {
+ question: 'Is there a free trial for paid plans?',
+ answer: 'You can start with our Free plan to explore Papra\'s features. When you\'re ready to upgrade, you can switch to a paid plan at any time.',
+ },
+ {
+ question: 'What payment methods do you accept?',
+ answer: 'We accept all major credit cards (Visa, MasterCard, American Express) and debit cards. All payments are processed securely through our payment provider.',
+ },
+ {
+ question: 'Can I cancel my subscription anytime?',
+ answer: 'Yes, you can cancel your subscription at any time. Your account will remain active until the end of your current billing period, after which you\'ll be moved to the Free plan.',
+ },
+ {
+ question: 'Do you offer discounts for annual billing?',
+ answer: 'Yes! Annual plans save you 20% compared to monthly billing.',
+ },
+ {
+ question: 'How do I apply a promo code?',
+ answer: 'During checkout, look for the "Add promotion code" link in the products details. Click it, enter your promo code, and the discount will be applied automatically to your order.',
+ },
+ {
+ question: 'Can I add more team members later?',
+ answer: 'Yes, each plan has a specific member limit. If you need more team members, you can upgrade to a higher plan or contact us for a custom enterprise solution.',
+ },
+ ],
+
+ // Pricing Page - Final CTA
+ 'pricing.final-cta.title': 'Trusted by homes, startups, and enterprises of all sizes.',
+ 'pricing.final-cta.button': 'Get started',
+
+ // Contact Page
+ 'contact.title': 'Contact',
+ 'contact.subtitle': 'For any questions or support, please contact us using the following options:',
+ 'contact.option.email.name': 'Email',
+ 'contact.option.email.label': '[email protected]',
+ 'contact.option.discord.name': 'Discord',
+ 'contact.option.discord.label': 'Papra Discord community',
+ 'contact.option.github.name': 'Github',
+ 'contact.option.github.label': 'Papra Github repository',
+ 'contact.option.bluesky.name': 'Bluesky',
+ 'contact.option.bluesky.label': 'Bluesky profile',
+
+ // Blog Page
+ 'blog.title': 'Papra Blog',
+ 'blog.subtitle': 'What\'s new in the Papra ecosystem, stay updated with the latest news and updates from Papra.',
+ 'blog.posts-heading': 'Blog Posts',
+
+ // 404 Page
+ '404.title': '404 - Not Found',
+ '404.description': 'The page you are looking for does not exist.',
+ '404.go-home': 'Go back home',
+
+ // Header/Navigation
+ 'nav.demo': 'Demo',
+ 'nav.docs': 'Docs',
+ 'nav.blog': 'Blog',
+ 'nav.self-host': 'Self-host',
+ 'nav.pricing': 'Pricing',
+ 'nav.early-access': 'Early Access',
+ 'nav.sign-in': 'Sign In',
+
+ // Launch Banner
+ 'launch-banner.text': 'Launch Special: Get {{percentage}}% off lifetime - Limited time offer!',
+
+ // Pagination
+ 'pagination.go-to-page': 'Go to page {{page}} of {{total}}',
+ 'pagination.page': 'Page {{current}} of {{total}}',
+} as const;
diff --git a/src/locales/fr.ts b/src/locales/fr.ts
new file mode 100644
index 00000000..81ccb2cd
--- /dev/null
+++ b/src/locales/fr.ts
@@ -0,0 +1,271 @@
+import type { TranslationsDictionary } from '../i18n/i18n.types';
+
+export const translations: Partial<TranslationsDictionary> = {
+ 'language-name': 'Français',
+
+ // Call to Action Section
+ 'cta.get-started': 'Commencer',
+ 'cta.heading': 'Fini la recherche infructueuse.<br /> Organisez vos documents avec Papra.',
+
+ // Values Section
+ 'values.title': 'Des Valeurs Avant Tout',
+ 'values.subtitle': 'On développe des logiciels comme il faut. <br /> Sans compromis, sans raccourcis.',
+
+ 'values.ethical-by-design.title': 'Éthique dès la conception',
+ 'values.ethical-by-design.description': 'Aucune manipulation, aucune astuce douteuse. Un logiciel qui vous respecte vraiment.',
+
+ 'values.bootstrapped-and-independent.title': 'Autofinancé & Indépendant',
+ 'values.bootstrapped-and-independent.description': 'Pas de levée de fonds, pas de dilution, zéro dette. On répond à nos utilisateurs, pas à des investisseurs.',
+
+ 'values.your-data-is-yours.title': 'Vos données restent vôtres',
+ 'values.your-data-is-yours.description': 'On ne vend jamais vos données. Point. La vie privée est un droit fondamental, pas une option.',
+
+ 'values.fully-open-source.title': '100% Open Source',
+ 'values.fully-open-source.description': 'Transparence totale. Auditez le code, contribuez ou auto-hébergez quand vous voulez.',
+
+ 'values.environmentally-conscious.title': 'Respectueux de l\'environnement',
+ 'values.environmentally-conscious.description': 'La durabilité et l\'éco-responsabilité guident nos choix techniques et notre conception.',
+
+ 'values.community-driven.title': 'Fait par et pour la communauté',
+ 'values.community-driven.description': 'Vos retours façonnent notre feuille de route. C\'est vous qui décidez.',
+
+ // Features Section
+ 'features.title': 'Fonctionnalités',
+ 'features.subtitle': 'Gérez vos documents simplement. Papra vous aide à organiser, rechercher et accéder à vos fichiers en un clin d\'œil.',
+
+ 'features.all-in-one.title': 'Tous vos documents réunis',
+ 'features.all-in-one.description': 'Fini les fichiers éparpillés partout. Avec Papra, archivez et organisez tout au même endroit.',
+
+ 'features.organizations.title': 'Organisations',
+ 'features.organizations.description': 'Structurez vos documents par organisation. Idéal pour gérer les fichiers d\'une équipe ou d\'une entreprise.',
+
+ 'features.tagging.title': 'Étiquettes intelligentes',
+ 'features.tagging.description': 'Catégorisez et filtrez vos documents avec des étiquettes. Créez même des règles pour les assigner automatiquement.',
+
+ 'features.search.title': 'Recherche ultra-rapide',
+ 'features.search.description': 'Trouvez n\'importe quel document en quelques secondes. Fini le scroll interminable.',
+ 'features.search.placeholder': 'Rechercher...',
+ 'features.search.example-1': 'Facture mobile.pdf',
+ 'features.search.example-2': 'Rapport analytics.pdf',
+ 'features.search.example-3': 'Code snippets.txt',
+ 'features.search.example-4': 'Document.docx',
+
+ 'features.developer-friendly.title': 'Pensé pour les devs',
+ 'features.developer-friendly.description': 'API complète, webhooks, CLI et SDK. Intégrez Papra dans votre workflow existant comme vous le voulez.',
+
+ 'features.email-ingestion.title': 'Import par email',
+ 'features.email-ingestion.description': 'Créez une adresse email dédiée et transférez-y vos messages. Les pièces jointes deviennent automatiquement des documents.',
+
+ // Footer Section
+ 'footer.made-in-europe': 'Papra est créé et hébergé en Europe avec <span class="i-tabler-heart-filled size-3.5 mb--0.3 text-primary inline-block"></span> par <a href="https://corentin.tech" class="text-primary border-b hover:border-b-primary transition">Corentin Thomasset</a>.',
+ 'footer.copyright': '© {{year}} Papra. Tous droits réservés.',
+
+ // Footer - Social links
+ 'footer.social.bluesky': 'Bluesky',
+ 'footer.social.github': 'GitHub',
+ 'footer.social.discord': 'Discord',
+ 'footer.social.reddit': 'Reddit',
+
+ // Footer - Sections
+ 'footer.section.community': 'Communauté',
+ 'footer.section.papra': 'Papra',
+ 'footer.section.open-source': 'Open Source',
+ 'footer.section.legal': 'Légal',
+
+ // Footer - Papra links
+ 'footer.link.blog': 'Blog',
+ 'footer.link.demo-app': 'Application démo',
+ 'footer.link.documentation': 'Documentation',
+ 'footer.link.self-host': 'Auto-hébergement',
+ 'footer.link.roadmap': 'Feuille de route',
+
+ // Footer - Open Source links
+ 'footer.link.repository': 'Dépôt',
+ 'footer.link.contributing': 'Contribuer',
+ 'footer.link.code-of-conduct': 'Code de conduite',
+ 'footer.link.license': 'Licence',
+ 'footer.link.this-website': 'Ce site web',
+
+ // Footer - Legal links
+ 'footer.link.terms-of-service': 'Conditions d\'utilisation',
+ 'footer.link.privacy-policy': 'Politique de confidentialité',
+ 'footer.link.contact': 'Contact',
+
+ // Home Page - Hero Section
+ 'home.hero.title': 'La plateforme open-source d\'archivage et de gestion de documents',
+ 'home.hero.subtitle': 'Papra est une plateforme open-source pour organiser, sécuriser et archiver tous vos fichiers, sans effort.',
+ 'home.hero.live-demo': 'Essayer la démo',
+ 'home.hero.get-started': 'Commencer',
+
+ // Home Page - Open Source Section
+ 'home.open-source.title': 'Papra est <span class="bg-primary text-primary-foreground px-3 py-1 rounded-md inline-block leading-tight">open-source</span>',
+ 'home.open-source.description': 'Tout l\'écosystème Papra est open-source et auto-hébergeable. Disponible sur <a href="https://github.com/papra-hq/papra" class="text-primary hover:underline">GitHub</a> sous licence <a href="https://github.com/papra-hq/papra/blob/main/LICENSE" class="text-primary hover:underline">AGPL-3.0</a>.',
+ 'home.open-source.see-on-github': 'Voir sur GitHub',
+
+ // Home Page - FAQ Section
+ 'home.faq.title': 'Questions fréquentes',
+ 'home.faq.subtitle': 'Tout ce qu\'il faut savoir sur Papra',
+
+ 'home.faq.questions': [
+ {
+ question: 'C\'est quoi Papra ?',
+ answer: 'Papra est une plateforme open-source de gestion documentaire. Elle centralise tous vos fichiers au même endroit pour les organiser, les sécuriser et les archiver facilement.',
+ },
+ {
+ question: 'C\'est vraiment open-source ?',
+ answer: 'Oui ! Le code est sous licence AGPL-3.0 et disponible sur GitHub. Vous pouvez l\'auto-héberger si vous le souhaitez.',
+ },
+ {
+ question: 'Comment on organise les documents ?',
+ answer: 'Papra combine organisations, étiquettes et recherche puissante. Créez des espaces pour vos équipes, ajoutez des tags pour catégoriser, et retrouvez tout en un instant.',
+ },
+ {
+ question: 'Je peux l\'auto-héberger ?',
+ answer: 'Absolument ! C\'est même l\'un des gros avantages de l\'open-source. Vos données restent chez vous, et vous personnalisez tout comme bon vous semble.',
+ },
+ {
+ question: 'Quels fichiers sont supportés ?',
+ answer: 'PDF, texte, code, factures, tableurs... Tous les formats courants de la gestion documentaire pro et perso.',
+ },
+ {
+ question: 'Mes documents sont sécurisés ?',
+ answer: 'Oui ! Chiffrement en transit et au repos, selon les standards de l\'industrie.',
+ },
+ {
+ question: 'Mes données restent en Europe ?',
+ answer: 'Oui ! Hébergement et stockage 100% européens.',
+ },
+ {
+ question: 'Comment démarrer ?',
+ answer: 'Super simple : créez un compte gratuit, uploadez vos docs et c\'est parti. Consultez la doc pour aller plus loin.',
+ },
+ ],
+
+ // Pricing Page
+ 'pricing.title': 'Tarifs simples et transparents',
+ 'pricing.subtitle': 'Choisissez le plan qui vous correspond. Toutes les fonctionnalités essentielles incluses.',
+ 'pricing.toggle.monthly': 'Mensuel',
+ 'pricing.toggle.annual': 'Annuel',
+ 'pricing.currency-note': 'Prix affichés en USD. Votre banque fera la conversion en euros au moment du paiement.',
+ 'pricing.most-popular': 'Le Plus Populaire',
+ 'pricing.per-month': '/ mois',
+ 'pricing.billed-annually': '{{price}} facturés par an',
+ 'pricing.get-started': 'Commencer',
+ 'pricing.contact-us': 'Nous contacter',
+
+ // Pricing Page - Plans
+ 'pricing.plan.free.name': 'Gratuit, pour toujours',
+ 'pricing.plan.free.features': [
+ '512 Mo de stockage (~4 000 PDF)',
+ 'Jusqu\'à 3 membres par organisation',
+ 'Fichiers jusqu\'à 25 Mo',
+ '1 adresse email d\'import',
+ 'Support de base',
+ ],
+
+ 'pricing.plan.plus.name': 'Plus',
+ 'pricing.plan.plus.features': [
+ '5 Go de stockage (~20 000 PDF)',
+ 'Jusqu\'à 10 membres par organisation',
+ 'Fichiers jusqu\'à 100 Mo',
+ '10 adresses email d\'import',
+ 'Support prioritaire',
+ ],
+
+ 'pricing.plan.pro.name': 'Pro',
+ 'pricing.plan.pro.features': [
+ '50 Go de stockage (~200 000 PDF)',
+ 'Jusqu\'à 50 membres par organisation',
+ 'Fichiers jusqu\'à 500 Mo',
+ '100 adresses email d\'import',
+ 'Support prioritaire',
+ ],
+
+ // Pricing Page - Enterprise & Self-hosting
+ 'pricing.enterprise.title': 'Solutions entreprise',
+ 'pricing.enterprise.description': 'Besoin d\'un plan sur mesure pour votre organisation ? <br /> On propose des solutions entreprise avec fonctionnalités avancées, support dédié et tarifs flexibles. Contactez-nous pour en discuter.',
+ 'pricing.self-hosting.title': 'Auto-hébergement',
+ 'pricing.self-hosting.description': 'Papra est open-source, sous licence <a href="https://github.com/papra-app/papra/blob/main/LICENSE" class="underline hover:text-primary transition">AGPLv3</a>, et s\'auto-héberge gratuitement sur votre propre infrastructure. <br />Démarrez avec notre doc.',
+ 'pricing.self-hosting.cta': 'Guide d\'auto-hébergement',
+
+ // Pricing Page - FAQ
+ 'pricing.faq.title': 'Questions fréquentes',
+ 'pricing.faq.subtitle': 'Tout sur les tarifs Papra',
+
+ 'pricing.faq.questions': [
+ {
+ question: 'Je peux changer de plan quand je veux ?',
+ answer: 'Oui, upgrade ou downgrade quand vous voulez. Si vous passez à un plan supérieur, on facture au prorata pour le temps restant. Si vous descendez, le changement s\'applique à la fin de votre période actuelle.',
+ },
+ {
+ question: 'Que se passe-t-il si je dépasse mon stockage ?',
+ answer: 'Si vous atteignez la limite, vous ne pourrez plus uploader tant que vous n\'aurez pas upgradé votre plan ou supprimé des docs. On vous prévient avant d\'arriver à la limite.',
+ },
+ {
+ question: 'Y a un essai gratuit pour les plans payants ?',
+ answer: 'Commencez avec le plan Gratuit pour tester Papra. Quand vous êtes prêt, passez à un plan payant quand vous voulez.',
+ },
+ {
+ question: 'Quels moyens de paiement vous acceptez ?',
+ answer: 'On accepte toutes les cartes bancaires (Visa, MasterCard, American Express). Tous les paiements sont sécurisés via notre prestataire.',
+ },
+ {
+ question: 'Je peux annuler quand je veux ?',
+ answer: 'Oui, annulez quand vous voulez. Votre compte reste actif jusqu\'à la fin de votre période en cours, puis vous passez au plan Gratuit.',
+ },
+ {
+ question: 'Y a des réducs sur les plans annuels ?',
+ answer: 'Oui ! Les plans annuels font économiser 20% par rapport au mensuel.',
+ },
+ {
+ question: 'Comment utiliser un code promo ?',
+ answer: 'Au paiement, cliquez sur "Ajouter un code promotionnel" dans les détails. Entrez votre code et la réduction s\'applique automatiquement.',
+ },
+ {
+ question: 'Je peux ajouter des membres plus tard ?',
+ answer: 'Oui, chaque plan a une limite de membres. Si vous en avez besoin de plus, passez à un plan supérieur ou contactez-nous pour une solution entreprise sur mesure.',
+ },
+ ],
+
+ // Pricing Page - Final CTA
+ 'pricing.final-cta.title': 'Ils nous font confiance : particuliers, startups et entreprises.',
+ 'pricing.final-cta.button': 'Commencer',
+
+ // Contact Page
+ 'contact.title': 'Contact',
+ 'contact.subtitle': 'Une question ? Besoin d\'aide ? Contactez-nous :',
+ 'contact.option.email.name': 'Email',
+ 'contact.option.email.label': '[email protected]',
+ 'contact.option.discord.name': 'Discord',
+ 'contact.option.discord.label': 'Communauté Discord Papra',
+ 'contact.option.github.name': 'Github',
+ 'contact.option.github.label': 'Dépôt Github Papra',
+ 'contact.option.bluesky.name': 'Bluesky',
+ 'contact.option.bluesky.label': 'Profil Bluesky',
+
+ // Blog Page
+ 'blog.title': 'Blog Papra',
+ 'blog.subtitle': 'Les nouveautés de l\'écosystème Papra, toutes les actus et mises à jour.',
+ 'blog.posts-heading': 'Articles',
+
+ // 404 Page
+ '404.title': '404 - Page introuvable',
+ '404.description': 'Cette page n\'existe pas.',
+ '404.go-home': 'Retour à l\'accueil',
+
+ // Header/Navigation
+ 'nav.demo': 'Démo',
+ 'nav.docs': 'Docs',
+ 'nav.blog': 'Blog',
+ 'nav.self-host': 'Auto-héberger',
+ 'nav.pricing': 'Tarifs',
+ 'nav.early-access': 'Accès anticipé',
+ 'nav.sign-in': 'Connexion',
+
+ // Launch Banner
+ 'launch-banner.text': 'Offre de lancement : {{percentage}}% de réduction à vie - Offre limitée !',
+
+ // Pagination
+ 'pagination.go-to-page': 'Aller à la page {{page}} sur {{total}}',
+ 'pagination.page': 'Page {{current}} sur {{total}}',
+};
diff --git a/src/locales/index.ts b/src/locales/index.ts
new file mode 100644
index 00000000..03eb063c
--- /dev/null
+++ b/src/locales/index.ts
@@ -0,0 +1,9 @@
+import type { Locale } from '../i18n/i18n.constants';
+import type { TranslationsDictionary } from '../i18n/i18n.types';
+import { translations as en } from './en';
+import { translations as fr } from './fr';
+
+export const translations: Record<Locale, TranslationsDictionary | Partial<TranslationsDictionary>> = {
+ en,
+ fr,
+};
diff --git a/src/pages/404.astro b/src/pages/404.astro
index 0db030ed..c710c8d6 100644
--- a/src/pages/404.astro
+++ b/src/pages/404.astro
@@ -1,13 +1,27 @@
---
+import Header from '../components/Header.astro';
+import { useI18n } from '../i18n/i18n';
import Layout from '../layouts/Layout.astro';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
---
<Layout>
- <div class="pt-12 flex items-center justify-center gap-4 flex-col sm:flex-row text-center sm:text-left">
- <div class="i-tabler-coffee size-20 mb-4"></div>
- <div>
- <h1 class="text-lg font-medium">404 - Not Found</h1>
- <p class="text-sm text-muted-foreground">The page you are looking for does not exist.</p>
- </div>
+ <Header />
+
+ <div class="pt-24 md:pt-48 flex items-center justify-center gap-4 flex-col text-center">
+ <div class="i-tabler-coffee size-20"></div>
+ <div class="mt-4">
+ <h1 class="text-lg font-medium">{t('404.title')}</h1>
+ <p class="text-sm text-muted-foreground">{t('404.description')}</p>
+
+ <a
+ href={`/${Astro.currentLocale}/`}
+ class="mt-6 inline-block text-foreground border font-bold rounded py-2 px-4 rounded-lg transition inline-flex items-center gap-2 hover:bg-accent hover:text-accent-foreground"
+ >
+ <div class="i-tabler-arrow-left size-5" aria-hidden="true"></div>
+ {t('404.go-home')}
+ </a>
</div>
+ </div>
</Layout>
diff --git a/src/pages/[locale]/404.astro b/src/pages/[locale]/404.astro
new file mode 100644
index 00000000..4eb33c6a
--- /dev/null
+++ b/src/pages/[locale]/404.astro
@@ -0,0 +1,32 @@
+---
+import Header from '../../components/Header.astro';
+import { useI18n } from '../../i18n/i18n';
+import { LOCALES } from '../../i18n/i18n.constants';
+import Layout from '../../layouts/Layout.astro';
+
+const { t } = useI18n({ locale: Astro.currentLocale });
+
+export async function getStaticPaths() {
+ return LOCALES.map(locale => ({ params: { locale } }));
+}
+---
+
+<Layout>
+ <Header />
+
+ <div class="pt-24 md:pt-48 flex items-center justify-center gap-4 flex-col text-center">
+ <div class="i-tabler-coffee size-20"></div>
+ <div class="mt-4">
+ <h1 class="text-lg font-medium">{t('404.title')}</h1>
+ <p class="text-sm text-muted-foreground">{t('404.description')}</p>
+
+ <a
+ href={`/${Astro.currentLocale}/`}
+ class="mt-6 inline-block text-foreground border font-bold rounded py-2 px-4 rounded-lg transition inline-flex items-center gap-2 hover:bg-accent hover:text-accent-foreground"
+ >
+ <div class="i-tabler-arrow-left size-5" aria-hidden="true"></div>
+ {t('404.go-home')}
+ </a>
+ </div>
+ </div>
+</Layout>
diff --git a/src/pages/[locale]/contact.astro b/src/pages/[locale]/contact.astro
new file mode 100644
index 00000000..10d093c4
--- /dev/null
+++ b/src/pages/[locale]/contact.astro
@@ -0,0 +1,83 @@
+---
+import ContactForm from '../../components/ContactForm.astro';
+import Footer from '../../components/Footer.astro';
+import Header from '../../components/Header.astro';
+import { useI18n } from '../../i18n/i18n';
+import { LOCALES } from '../../i18n/i18n.constants';
+import Layout from '../../layouts/Layout.astro';
+import { cn } from '../../utils/cn';
+
+export async function getStaticPaths() {
+ return LOCALES.map(locale => ({ params: { locale } }));
+}
+
+const { t } = useI18n({ locale: Astro.currentLocale });
+
+const contactOptions = [
+ {
+ name: t('contact.option.email.name'),
+ label: t('contact.option.email.label'),
+ href: 'mailto:[email protected]',
+ icon: 'i-tabler-mail',
+ },
+ {
+ name: t('contact.option.discord.name'),
+ label: t('contact.option.discord.label'),
+ href: '/discord',
+ icon: 'i-tabler-brand-discord',
+ },
+ {
+ name: t('contact.option.github.name'),
+ label: t('contact.option.github.label'),
+ href: 'https://github.com/papra-hq/papra',
+ icon: 'i-tabler-brand-github',
+ },
+ {
+ name: t('contact.option.bluesky.name'),
+ label: t('contact.option.bluesky.label'),
+ href: 'https://bsky.app/profile/papra.app',
+ icon: 'i-tabler-brand-bluesky',
+ },
+];
+---
+
+<Layout>
+ <div class="bg-card flex flex-col w-full min-h-screen">
+ <Header />
+
+ <div class="w-full bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] bg-background border-b pt-32 pb-24">
+ <div class="max-w-700px mx-auto p-4">
+ <h1 class="text-3xl mb-2 font-bold">{t('contact.title')}</h1>
+ <p class="text-base mb-2 leading-tight">{t('contact.subtitle')}</p>
+ </div>
+ </div>
+
+ <div class="max-w-5xl mx-auto p-4 flex flex-col md:flex-row gap-6 my-12 flex-1 w-full">
+ <div class="flex flex-col gap-4 md:min-w-350px">
+ {
+ contactOptions.map(option => (
+ <a href={option.href} target="_blank" rel="noopener noreferrer" class="flex items-center gap-3 border rounded-lg bg-background p-4 hover:(border-primary) transition">
+ <div class="flex items-center justify-center bg-primary/5 rounded-lg size-10">
+ <div class={cn(option.icon, 'size-7 bg-primary')} />
+ </div>
+ <div class="flex-1">
+ <div class="font-semibold text-base lh-tight">{option.name}</div>
+ <div class="text-sm text-muted-foreground lh-tight">{option.label}</div>
+ </div>
+
+ <div class="flex items-center">
+ <div class="i-tabler-external-link size-5 text-muted-foreground" />
+ </div>
+ </a>
+ ))
+ }
+ </div>
+
+ <div class="border rounded-lg bg-background p-6 flex-1">
+ <ContactForm />
+ </div>
+ </div>
+
+ <Footer class="bg-background" />
+ </div>
+</Layout>
diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro
new file mode 100644
index 00000000..87692dd6
--- /dev/null
+++ b/src/pages/[locale]/index.astro
@@ -0,0 +1,84 @@
+---
+import { Image } from 'astro:assets';
+import { config } from '../../app.config';
+import Hero from '../../assets/papra-screenshot.png';
+import Cta from '../../components/Cta.astro';
+import FaqAccordion from '../../components/FaqAccordion.astro';
+import FeaturesBento from '../../components/FeaturesBento.astro';
+import Footer from '../../components/Footer.astro';
+import Header from '../../components/Header.astro';
+import LaunchBanner from '../../components/LaunchBanner.astro';
+import ValuesSection from '../../components/ValuesSection.astro';
+import { useI18n } from '../../i18n/i18n';
+import { LOCALES } from '../../i18n/i18n.constants';
+import Layout from '../../layouts/Layout.astro';
+
+const discount = config.launchDiscount;
+
+export async function getStaticPaths() {
+ return LOCALES.map(locale => ({ params: { locale } }));
+}
+const { t } = useI18n({ locale: Astro.currentLocale });
+---
+
+<Layout>
+ {discount.enabled && <LaunchBanner />}
+
+ <div class="relative overflow-hidden pb-300px bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px]">
+ <div class="z-9 bg-gradient-to-b from-background to-transparent w-full h-full absolute top-0 left-0"></div>
+ <div class="z-10 bg-primary w-80% max-w-1000px h-400px rounded-xl blur-64 op-20 absolute bottom--100px left-50% -translate-x-50%"></div>
+
+ <Header class={discount.enabled ? 'absolute! top-0' : undefined} />
+
+ <div class="max-w-3xl mx-auto pt-20 pb-32 px-4 mt-24 text-center z-50 relative">
+ <h1 class="text-4xl font-bold mb-4 text-pretty">{t('home.hero.title')}</h1>
+ <p class="text-lg text-muted-foreground">{t('home.hero.subtitle')}</p>
+
+ <div class="flex items-center justify-center gap-2 mt-8">
+ <a href="https://demo.papra.app" class="border text-sm font-bold rounded py-2 px-4 rounded-xl hover:border-primary hover:text-primary transition" target="_blank">{t('home.hero.live-demo')}</a>
+
+ <a href={config.getStartedLink} class="text-sm flex items-center gap-1.5 bg-primary hover:bg-primary/80 font-bold rounded py-2 px-4 rounded-xl text-primary-foreground transition">
+ {t('home.hero.get-started')}
+ <div class="i-tabler-arrow-right size-5"></div>
+ </a>
+ </div>
+ </div>
+ </div>
+
+ <div class="bg-card border-t">
+ <Image src={Hero} alt="Papra Screenshot" class="mx-auto max-w-1000px w-full relative z-50 mt--300px" loading="eager" />
+ </div>
+
+ <FeaturesBento />
+
+ <ValuesSection />
+
+ <div class="bg-card py-64 border-t flex items-center justify-center gap-8 sm:gap-12 flex-col sm:flex-row relative overflow-hidden">
+ <div class="max-w-600px px-6 text-center sm:text-left">
+ <h2 class="text-2xl sm:text-4xl font-bold max-w-650px mx-auto" set:html={t('home.open-source.title')} />
+
+ <p class="text-muted-foreground mx-auto mt-4 text-lg" set:html={t('home.open-source.description')} />
+ </div>
+
+ <div class="flex items-center justify-center gap-2 mt-8">
+ <a
+ href="https://github.com/papra-hq/papra"
+ class="border text-sm font-bold rounded py-2 px-4 rounded-xl hover:border-primary hover:text-primary transition flex items-center gap-2 flex-shrink-0"
+ target="_blank"
+ >
+ {t('home.open-source.see-on-github')} <div class="i-tabler-arrow-right size-5" aria-hidden="true"></div>
+ </a>
+ </div>
+ </div>
+
+
+ <FaqAccordion
+ title={t('home.faq.title')}
+ description={t('home.faq.subtitle')}
+ items={t('home.faq.questions')}
+ />
+
+ <Cta />
+
+ <Footer />
+</Layout>
diff --git a/src/pages/pricing.astro b/src/pages/[locale]/pricing.astro
similarity index 65%
rename from src/pages/pricing.astro
rename to src/pages/[locale]/pricing.astro
index 4aa797c7..b42e20fc 100644
--- a/src/pages/pricing.astro
+++ b/src/pages/[locale]/pricing.astro
@@ -1,18 +1,25 @@
---
-import { config } from '../app.config';
-import FaqAccordion from '../components/FaqAccordion.astro';
-import Footer from '../components/Footer.astro';
-import Header from '../components/Header.astro';
-import LaunchBanner from '../components/LaunchBanner.astro';
-import Layout from '../layouts/Layout.astro';
+import { config } from '../../app.config';
+import FaqAccordion from '../../components/FaqAccordion.astro';
+import Footer from '../../components/Footer.astro';
+import Header from '../../components/Header.astro';
+import LaunchBanner from '../../components/LaunchBanner.astro';
+import { useI18n } from '../../i18n/i18n';
+import { LOCALES } from '../../i18n/i18n.constants';
+import Layout from '../../layouts/Layout.astro';
+export async function getStaticPaths() {
+ return LOCALES.map(locale => ({ params: { locale } }));
+}
+
+const { t } = useI18n({ locale: Astro.currentLocale });
const discount = config.launchDiscount;
type Plan = {
name: string;
monthlyPrice: number;
annualPrice: number;
- features: string[];
+ features: readonly string[];
cta: {
text: string;
url: string;
@@ -31,35 +38,35 @@ type Plan = {
const plans: Plan[] = [
{
- name: 'Free, forever',
+ name: t('pricing.plan.free.name'),
monthlyPrice: 0,
annualPrice: 0,
- features: ['512MB storage (~4,000 standard PDF)', '3 members per organization', 'Max upload size: 25MB', '1 intake email address', 'Basic support'],
+ features: t('pricing.plan.free.features'),
cta: {
- text: 'Get Started',
- url: 'https://dashboard.papra.app',
+ text: t('pricing.get-started'),
+ url: config.getStartedLink,
},
},
{
- name: 'Plus',
+ name: t('pricing.plan.plus.name'),
monthlyPrice: 9,
annualPrice: 90,
- features: ['5GB storage (~20,000 standard PDF)', '10 members per organization', 'Max upload size: 100MB', '10 intake email addresses', 'Priority support'],
+ features: t('pricing.plan.plus.features'),
cta: {
- text: 'Get Started',
- url: 'https://dashboard.papra.app',
+ text: t('pricing.get-started'),
+ url: config.getStartedLink,
},
popular: true,
},
{
- name: 'Pro',
+ name: t('pricing.plan.pro.name'),
monthlyPrice: 30,
annualPrice: 300,
- features: ['50GB storage (~200,000 standard PDF)', '50 members per organization', 'Max upload size: 500MB', '100 intake email addresses', 'Priority support'],
+ features: t('pricing.plan.pro.features'),
cta: {
- text: 'Get Started',
- url: 'https://dashboard.papra.app',
+ text: t('pricing.get-started'),
+ url: config.getStartedLink,
},
},
].map((plan) => {
@@ -82,21 +89,21 @@ const plans: Plan[] = [
<div class="w-full bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] bg-background border-b pt-32 pb-24">
<div class="max-w-700px mx-auto p-4 text-center">
- <h1 class="text-3xl md:text-4xl mb-4 font-bold">Simple, transparent pricing</h1>
- <p class="text-base md:text-lg text-muted-foreground leading-tight">Choose the plan that fits your needs. All plans include core Papra features.</p>
+ <h1 class="text-3xl md:text-4xl mb-4 font-bold">{t('pricing.title')}</h1>
+ <p class="text-base md:text-lg text-muted-foreground leading-tight">{t('pricing.subtitle')}</p>
</div>
</div>
<div class="max-w-1200px mx-auto px-6 md:px-8 flex-1 w-full">
<div class="flex flex-col items-center justify-center my-12 gap-3">
<div class="inline-flex rounded-lg border border-border bg-muted p-1" role="group">
- <button id="monthly-btn" type="button" class="px-4 py-2 text-sm font-medium rounded-md transition-colors"> Monthly </button>
+ <button id="monthly-btn" type="button" class="px-4 py-2 text-sm font-medium rounded-md transition-colors">{t('pricing.toggle.monthly')}</button>
<button id="annual-btn" type="button" class="px-4 py-2 text-sm font-medium rounded-md transition-colors bg-background text-foreground shadow-sm flex items-center">
- Annual
+ {t('pricing.toggle.annual')}
</button>
</div>
<p class="text-sm text-muted-foreground text-center">
- Prices shown in USD. Your bank will convert to your local currency at checkout if needed.
+ {t('pricing.currency-note')}
</p>
</div>
@@ -110,7 +117,7 @@ const plans: Plan[] = [
{discount.percentage}% OFF
</div>
)}
- {plan.popular && <div class="bg-primary text-primary-foreground text-xs font-bold px-3 py-1 rounded-full">Most Popular</div>}
+ {plan.popular && <div class="bg-primary text-primary-foreground text-xs font-bold px-3 py-1 rounded-full">{t('pricing.most-popular')}</div>}
</div>
<h2 class="text-2xl font-bold mb-2">{plan.name}</h2>
@@ -135,8 +142,8 @@ const plans: Plan[] = [
<span class="annual-price text-5xl font-semibold">$0</span>
)}
<div>
- <span class="text-muted-foreground">/ month</span>
- {plan.annualPrice > 0 && <div class="text-xs text-muted-foreground annual-price">${plan.discountedAnnualPrice} billed annually</div>}
+ <span class="text-muted-foreground">{t('pricing.per-month')}</span>
+ {plan.annualPrice > 0 && <div class="text-xs text-muted-foreground annual-price">{t('pricing.billed-annually', { price: `$${plan.discountedAnnualPrice}` })}</div>}
</div>
</div>
)
@@ -151,8 +158,8 @@ const plans: Plan[] = [
<span class="annual-price text-5xl font-semibold">$0</span>
)}
<div>
- <span class="text-muted-foreground">/ month</span>
- {plan.annualPrice > 0 && <div class="text-xs text-muted-foreground annual-price">${plan.annualPrice} billed annually</div>}
+ <span class="text-muted-foreground">{t('pricing.per-month')}</span>
+ {plan.annualPrice > 0 && <div class="text-xs text-muted-foreground annual-price">{t('pricing.billed-annually', { price: `$${plan.annualPrice}` })}</div>}
</div>
</div>
)}
@@ -185,30 +192,24 @@ const plans: Plan[] = [
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="border rounded-xl bg-background p-6 flex-col items-start">
- <h2 class="text-2xl font-bold">Enterprise solutions</h2>
- <p class="text-muted-foreground mt-2 mb-4 flex-1">
- Looking for a custom plan tailored to your organization's needs? <br /> We offer enterprise solutions with advanced features, dedicated support, and flexible pricing. Contact us to discuss
- your requirements and get a personalized quote.
- </p>
+ <h2 class="text-2xl font-bold">{t('pricing.enterprise.title')}</h2>
+ <p class="text-muted-foreground mt-2 mb-4 flex-1" set:html={t('pricing.enterprise.description')} />
<a href="/contact" class="inline-flex items-center gap-2 border font-semibold px-4 py-2 rounded-lg hover:border-primary hover:text-primary transition">
- Contact us
+ {t('pricing.contact-us')}
<div class="i-tabler-arrow-right size-5"></div>
</a>
</div>
<div class="border rounded-xl bg-background p-6 flex flex-col items-start">
- <h2 class="text-2xl font-bold">Self-hosting</h2>
- <p class="text-muted-foreground mt-2 mb-4 flex-1">
- Papra is open-source, under the <a href="https://github.com/papra-app/papra/blob/main/LICENSE" class="underline hover:text-primary transition">AGPLv3</a> and can be self-hosted on your own
- infrastructure at no cost. <br />Get started with our documentation.
- </p>
+ <h2 class="text-2xl font-bold">{t('pricing.self-hosting.title')}</h2>
+ <p class="text-muted-foreground mt-2 mb-4 flex-1" set:html={t('pricing.self-hosting.description')} />
<a
href="https://docs.papra.app/self-hosting/using-docker/"
target="_blank"
rel="noopener"
class="inline-flex items-center gap-2 border font-semibold px-4 py-2 rounded-lg hover:border-primary hover:text-primary transition"
>
- View self-hosting guide
+ {t('pricing.self-hosting.cta')}
<div class="i-tabler-arrow-right size-5"></div>
</a>
</div>
@@ -216,44 +217,9 @@ const plans: Plan[] = [
</div>
<FaqAccordion
- title="Frequently Asked Questions"
- description="Everything you need to know about Papra pricing"
- items={[
- {
- question: 'Can I change plans at any time?',
- answer:
- 'Yes, you can upgrade or downgrade your plan at any time. If you upgrade, you\'ll be charged a prorated amount for the remainder of your billing period. If you downgrade, the change will take effect at the end of your current billing cycle.',
- },
- {
- question: 'What happens if I exceed my storage limit?',
- answer:
- 'If you reach your storage limit, you won\'t be able to upload new documents until you either upgrade your plan or delete some existing documents. We\'ll send you notifications before you reach your limit.',
- },
- {
- question: 'Is there a free trial for paid plans?',
- answer: 'You can start with our Free plan to explore Papra\'s features. When you\'re ready to upgrade, you can switch to a paid plan at any time.',
- },
- {
- question: 'What payment methods do you accept?',
- answer: 'We accept all major credit cards (Visa, MasterCard, American Express) and debit cards. All payments are processed securely through our payment provider.',
- },
- {
- question: 'Can I cancel my subscription anytime?',
- answer: 'Yes, you can cancel your subscription at any time. Your account will remain active until the end of your current billing period, after which you\'ll be moved to the Free plan.',
- },
- {
- question: 'Do you offer discounts for annual billing?',
- answer: 'Yes! Annual plans save you 20% compared to monthly billing.',
- },
- {
- question: 'How do I apply a promo code?',
- answer: 'During checkout, look for the "Add promotion code" link in the products details. Click it, enter your promo code, and the discount will be applied automatically to your order.',
- },
- {
- question: 'Can I add more team members later?',
- answer: 'Yes, each plan has a specific member limit. If you need more team members, you can upgrade to a higher plan or contact us for a custom enterprise solution.',
- },
- ]}
+ title={t('pricing.faq.title')}
+ description={t('pricing.faq.subtitle')}
+ items={t('pricing.faq.questions')}
/>
<div class="bg-card pb-32">
@@ -261,11 +227,11 @@ const plans: Plan[] = [
<div
class="border rounded-xl bg-background pt-32 pb-24 bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] px-6"
>
- <h2 class="text-2xl sm:text-4xl font-bold text-center max-w-650px mx-auto">Trusted by homes, startups, and enterprises of all sizes.</h2>
+ <h2 class="text-2xl sm:text-4xl font-bold text-center max-w-650px mx-auto">{t('pricing.final-cta.title')}</h2>
<div class="flex mt-4 items-center justify-center">
<a href={config.getStartedLink} class="font-semibold text-background px-4 py-2 hover:bg-primary/80 rounded-lg bg-primary transition mt-8 inline-block flex items-center">
- Get started
+ {t('pricing.final-cta.button')}
<div class="i-tabler-arrow-right ml-2 size-5" aria-hidden="true"></div>
</a>
diff --git a/src/pages/blog/[...page].astro b/src/pages/blog/[...page].astro
index 7f1da115..90dd8d10 100644
--- a/src/pages/blog/[...page].astro
+++ b/src/pages/blog/[...page].astro
@@ -4,10 +4,13 @@ import type { CollectionEntry } from 'astro:content';
import { getCollection } from 'astro:content';
import Footer from '../../components/Footer.astro';
import Header from '../../components/Header.astro';
+import { useI18n } from '../../i18n/i18n';
// import Pagination from '../../components/Pagination.astro';
import Layout from '../../layouts/Layout.astro';
import BlogCard from './_components/BlogCard.astro';
+const { t } = useI18n({ locale: Astro.currentLocale });
+
export async function getStaticPaths({ paginate }: GetStaticPathsOptions) {
const posts = await getCollection('blog');
@@ -31,12 +34,12 @@ const { page } = Astro.props as { page: Page<CollectionEntry<'blog'>> };
<div class="flex flex-col min-h-screen">
<div class="w-full bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] bg-background border-b pt-32 pb-24">
<div class="max-w-450px mx-auto p-4 text-center">
- <h1 class="text-3xl mb-2 font-bold">Papra Blog</h1>
- <p class="text-base mb-2 leading-tight">What’s new in the Papra ecosystem, stay updated with the latest news and updates from Papra.</p>
+ <h1 class="text-3xl mb-2 font-bold">{t('blog.title')}</h1>
+ <p class="text-base mb-2 leading-tight">{t('blog.subtitle')}</p>
</div>
</div>
- <h2 class="sr-only">Blog Posts</h2>
+ <h2 class="sr-only">{t('blog.posts-heading')}</h2>
<div class="p-6 flex-1 py-20 flex flex-col gap-8">
{
page.data.map(post => (
diff --git a/src/pages/contact.astro b/src/pages/contact.astro
index 3138e15e..507bb99e 100644
--- a/src/pages/contact.astro
+++ b/src/pages/contact.astro
@@ -1,75 +1,14 @@
---
-import ContactForm from '../components/ContactForm.astro';
-import Footer from '../components/Footer.astro';
-import Header from '../components/Header.astro';
-import Layout from '../layouts/Layout.astro';
-import { cn } from '../utils/cn';
+import { DEFAULT_LOCALE, LOCALES } from '../i18n/i18n.constants';
-const contactOptions = [
- {
- name: 'Email',
- label: '[email protected]',
- href: 'mailto:[email protected]',
- icon: 'i-tabler-mail',
- },
- {
- name: 'Discord',
- label: 'Papra Discord community',
- href: '/discord',
- icon: 'i-tabler-brand-discord',
- },
- {
- name: 'Github',
- label: 'Papra Github repository',
- href: 'https://github.com/papra-hq/papra',
- icon: 'i-tabler-brand-github',
- },
- {
- name: 'Bluesky',
- label: 'Bluesky profile',
- href: 'https://bsky.app/profile/papra.app',
- icon: 'i-tabler-brand-bluesky',
- },
-];
----
-
-<Layout>
- <div class="bg-card flex flex-col w-full min-h-screen">
- <Header />
+export const prerender = false;
- <div class="w-full bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] bg-background border-b pt-32 pb-24">
- <div class="max-w-700px mx-auto p-4">
- <h1 class="text-3xl mb-2 font-bold">Contact</h1>
- <p class="text-base mb-2 leading-tight">For any questions or support, please contact us using the following options:</p>
- </div>
- </div>
+const preferredLocales = Astro.preferredLocaleList ?? [];
- <div class="max-w-5xl mx-auto p-4 flex flex-col md:flex-row gap-6 my-12 flex-1 w-full">
- <div class="flex flex-col gap-4 md:min-w-350px">
- {
- contactOptions.map(option => (
- <a href={option.href} target="_blank" rel="noopener noreferrer" class="flex items-center gap-3 border rounded-lg bg-background p-4 hover:(border-primary) transition">
- <div class="flex items-center justify-center bg-primary/5 rounded-lg size-10">
- <div class={cn(option.icon, 'size-7 bg-primary')} />
- </div>
- <div class="flex-1">
- <div class="font-semibold text-base lh-tight">{option.name}</div>
- <div class="text-sm text-muted-foreground lh-tight">{option.label}</div>
- </div>
+const locale = preferredLocales.find(locale => (LOCALES as readonly string[]).includes(locale)) ?? DEFAULT_LOCALE;
- <div class="flex items-center">
- <div class="i-tabler-external-link size-5 text-muted-foreground" />
- </div>
- </a>
- ))
- }
- </div>
+Astro.response.headers.set('Vary', 'Accept-Language');
- <div class="border rounded-lg bg-background p-6 flex-1">
- <ContactForm />
- </div>
- </div>
+return Astro.redirect(`/${locale}/contact`, 302);
+---
- <Footer class="bg-background" />
- </div>
-</Layout>
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 5c611881..413bd015 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,135 +1,14 @@
---
-import { Image } from 'astro:assets';
-import { config } from '../app.config';
-import Hero from '../assets/papra-screenshot.png';
-import FaqAccordion from '../components/FaqAccordion.astro';
-import FeaturesBento from '../components/FeaturesBento.astro';
-import Footer from '../components/Footer.astro';
-import Header from '../components/Header.astro';
-import LaunchBanner from '../components/LaunchBanner.astro';
-import ValuesSection from '../components/ValuesSection.astro';
-import Layout from '../layouts/Layout.astro';
+import { DEFAULT_LOCALE, LOCALES } from '../i18n/i18n.constants';
-const discount = config.launchDiscount;
----
-
-<Layout>
- {discount.enabled && <LaunchBanner />}
-
- <div class="relative overflow-hidden pb-300px bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px]">
- <div class="z-9 bg-gradient-to-b from-background to-transparent w-full h-full absolute top-0 left-0"></div>
- <div class="z-10 bg-primary w-80% max-w-1000px h-400px rounded-xl blur-64 op-20 absolute bottom--100px left-50% -translate-x-50%"></div>
-
- <Header class={discount.enabled ? 'absolute! top-0' : undefined} />
-
- <div class="max-w-2xl mx-auto pt-20 pb-32 px-4 mt-24 text-center z-50 relative">
- <h1 class="text-4xl font-bold mb-4 text-pretty">Your Open-Source Solution to Document Chaos</h1>
- <p class="text-lg text-muted-foreground">An open-source document management platform designed to help you organize, secure, and archive your files effortlessly.</p>
-
- <div class="flex items-center justify-center gap-2 mt-8">
- <a href="https://demo.papra.app" class="border text-sm font-bold rounded py-2 px-4 rounded-xl hover:border-primary hover:text-primary transition" target="_blank"> Live Demo </a>
-
- <a href={config.getStartedLink} class="text-sm flex items-center gap-1.5 bg-primary hover:bg-primary/80 font-bold rounded py-2 px-4 rounded-xl text-primary-foreground transition">
- Get started
- <div class="i-tabler-arrow-right size-5"></div>
- </a>
- </div>
- </div>
- </div>
-
- <div class="bg-card border-t">
- <Image src={Hero} alt="Papra Screenshot" class="mx-auto max-w-1000px w-full relative z-50 mt--300px" loading="eager" />
- </div>
+export const prerender = false;
- <FeaturesBento />
+const preferredLocales = Astro.preferredLocaleList ?? [];
- <ValuesSection />
+const locale = preferredLocales.find(locale => (LOCALES as readonly string[]).includes(locale)) ?? DEFAULT_LOCALE;
- <div class="bg-card py-64 border-t flex items-center justify-center gap-8 sm:gap-12 flex-col sm:flex-row relative overflow-hidden">
- <div class="max-w-600px px-6 text-center sm:text-left">
- <h2 class="text-2xl sm:text-4xl font-bold max-w-650px mx-auto">
- Papra is <span class="bg-primary text-primary-foreground px-3 py-1 rounded-md inline-block leading-tight">open-source</span>
- </h2>
+Astro.response.headers.set('Vary', 'Accept-Language');
- <p class="text-muted-foreground mx-auto mt-4 text-lg">
- The whole Papra ecosystem is proudly open-source and easily self-hostable. It's available on <a href="https://github.com/papra-hq/papra" class="text-primary hover:underline">GitHub</a> under the
- <a href="https://github.com/papra-hq/papra/blob/main/LICENSE" class="text-primary hover:underline">AGPL-3.0</a> license.
- </p>
- </div>
-
- <div class="flex items-center justify-center gap-2 mt-8">
- <a
- href="https://github.com/papra-hq/papra"
- class="border text-sm font-bold rounded py-2 px-4 rounded-xl hover:border-primary hover:text-primary transition flex items-center gap-2 flex-shrink-0"
- target="_blank"
- >
- See on GitHub <div class="i-tabler-arrow-right size-5" aria-hidden="true"></div>
- </a>
- </div>
- </div>
-
-
- <FaqAccordion
- title="Frequently Asked Questions"
- description="Everything you need to know about Papra"
- items={[
- {
- question: 'What is Papra?',
- answer:
- 'Papra is an open-source document management platform designed to help you organize, secure, and archive your files effortlessly. It provides a centralized solution for managing all your documents in one place.',
- },
- {
- question: 'Is Papra really open-source?',
- answer: 'Yes! Papra is completely open-source and available under the AGPL-3.0 license. You can view the source code on GitHub and even self-host it if you prefer.',
- },
- {
- question: 'How does document organization work?',
- answer:
- 'Papra uses a combination of organizations, tags, and powerful search functionality to help you organize your documents. You can create organizations for teams or companies, add tags for categorization, and find documents quickly with our search feature.',
- },
- {
- question: 'Can I self-host Papra?',
- answer:
- 'Absolutely! Since Papra is open-source, you can self-host it on your own infrastructure. This gives you complete control over your data and allows you to customize the platform to your specific needs.',
- },
- {
- question: 'What file types does Papra support?',
- answer:
- 'Papra supports a wide range of document types including PDFs, text files, code files, invoices, spreadsheets, and many more. The platform is designed to handle various file formats commonly used in business and personal document management.',
- },
- {
- question: 'Are my documents secure?',
- answer: 'Yes! Papra uses industry-standard in-transit and at-rest encryption to protect your documents.',
- },
- {
- question: 'Are my data stored in Europe?',
- answer: 'Yes! Papra is hosted in Europe and all data is stored in Europe.',
- },
- {
- question: 'How can I get started with Papra?',
- answer:
- 'Getting started with Papra is easy! Simply sign up for a free account, upload your documents, and start organizing them. You can also check out our documentation for more detailed instructions on how to use the platform.',
- },
- ]}
- />
-
- <div class="bg-card py-32">
- <div class="max-w-1200px mx-auto px-6">
- <div
- class="border rounded-xl bg-background pt-32 pb-24 bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] px-6"
- >
- <h2 class="text-2xl sm:text-4xl font-bold text-center max-w-650px mx-auto">Trusted by homes, startups, and enterprises of all sizes.</h2>
-
- <div class="flex mt-4 items-center justify-center">
- <a href={config.getStartedLink} class="font-semibold text-background px-4 py-2 hover:bg-primary/80 rounded-lg bg-primary transition mt-8 inline-block flex items-center">
- Get started
-
- <div class="i-tabler-arrow-right ml-2 size-5" aria-hidden="true"></div>
- </a>
- </div>
- </div>
- </div>
- </div>
+return Astro.redirect(`/${locale}/`, 302);
+---
- <Footer />
-</Layout>
diff --git a/src/pages/ping.ts b/src/pages/ping.ts
deleted file mode 100644
index 5307529b..00000000
--- a/src/pages/ping.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-export const prerender = false;
-
-export async function GET() {
- return new Response(
- JSON.stringify({
- status: 'ok',
- timestamp: new Date().toISOString(),
- }),
- {
- status: 200,
- headers: {
- 'Content-Type': 'application/json',
- },
- },
- );
-}
diff --git a/uno.config.ts b/uno.config.ts
index 19d0bdde..f1a7b4f1 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -101,7 +101,7 @@ export default defineConfig({
},
},
},
- safelist: ['sm:grid-cols-1', 'sm:grid-cols-2', 'sm:grid-cols-3', 'sm:grid-cols-4', 'sm:grid-cols-5'],
+ safelist: ['sm:grid-cols-1', 'sm:grid-cols-2', 'sm:grid-cols-3', 'sm:grid-cols-4', 'sm:grid-cols-5', 'i-tabler-heart-filled'],
preflights: [
{
getCSS: () => `