Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

feat(website): redesign hero section (#1175)

Corentin Thomasset61807c290d4c
diff --git a/apps/website/src/assets/papra-screenshot.png b/apps/website/src/assets/papra-screenshot.png
index 221825d4..53494aa3 100644
Binary files a/apps/website/src/assets/papra-screenshot.png and b/apps/website/src/assets/papra-screenshot.png differ
diff --git a/apps/website/src/components/Hero.astro b/apps/website/src/components/Hero.astro
new file mode 100644
index 00000000..80e0d499
--- /dev/null
+++ b/apps/website/src/components/Hero.astro
@@ -0,0 +1,58 @@
+---
+import { config } from '../app.config';
+import { useI18n } from '../i18n/i18n';
+import { LOCALES } from '../i18n/i18n.constants';
+import { Image } from 'astro:assets';
+import HeroScreenshot from '../assets/papra-screenshot.png';
+import { GITHUB_REPO_URL } from '../socials';
+
+export async function getStaticPaths() {
+ return LOCALES.map(locale => ({ params: { locale } }));
+}
+const { t } = useI18n({ locale: Astro.currentLocale });
+
+const pils = [
+ {
+ label: t('home.hero.chip.open-source'),
+ href: GITHUB_REPO_URL,
+ target: '_blank',
+ rel: 'noopener noreferrer',
+ },
+ {
+ label: t('home.hero.chip.self-hostable'),
+ href: 'https://docs.papra.app/self-hosting/using-docker/',
+ target: '_blank',
+ rel: 'noopener noreferrer',
+ },
+];
+---
+
+<div class="relative overflow-hidden bg-[linear-gradient(to_right,#80808010_1px,transparent_1px),linear-gradient(to_bottom,#80808010_1px,transparent_1px)] bg-[size:48px_48px] border-b">
+ <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-100px sm:h-200px md:h-400px rounded-xl blur-64 op-20 absolute bottom--100px left-50% -translate-x-50%"></div>
+
+
+ <div class="max-w-1000px mx-auto pt-20 px-6 mt-24 z-50 relative">
+ <div class="flex items-center gap-2 mb-6">
+ {
+ pils.map((pil) => (
+ <a class="text-xs font-regular bg-muted/80 text-muted-foreground rounded py-1 px-2.5 rounded-lg border border-muted-foreground/20 hover:(bg-primary/10 border-primary/20 text-primary) transition" href={pil.href} target={pil.target} rel={pil.rel}>{pil.label}</a>
+ ))
+ }
+ </div>
+
+ <h1 class="text-4xl sm:text-5xl font-semibold mb-4 text-pretty max-w-800px">{t('home.hero.title')}</h1>
+ <p class="text-lg text-muted-foreground max-w-500px">{t('home.hero.subtitle')}</p>
+
+ <div class="flex items-center gap-2 mt-8 mb-32">
+ <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" rel="noopener">{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>
+
+ <Image src={HeroScreenshot} alt="Papra Screenshot" class="hidden sm:block w-full relative z-50 rounded-xl border border-3px border-primary mb--100px md:mb--200px" loading="eager" />
+ </div>
+</div>
diff --git a/apps/website/src/locales/en.ts b/apps/website/src/locales/en.ts
index 5f336923..ba7e72fe 100644
--- a/apps/website/src/locales/en.ts
+++ b/apps/website/src/locales/en.ts
@@ -114,11 +114,13 @@ export const translations = {
'footer.link.contact': 'Contact',
// Home Page - Hero Section
- 'home.hero.title': 'Your Solution to Document Chaos',
+ 'home.hero.title': 'Turn your paper chaos into a calm, searchable archive',
'home.hero.subtitle':
'Papra is an open-source document management platform designed to help you organize, secure, and archive your files effortlessly.',
+ 'home.hero.chip.open-source': 'Open source',
+ 'home.hero.chip.self-hostable': 'Self-hostable',
'home.hero.live-demo': 'Live Demo',
- 'home.hero.get-started': 'Get started',
+ 'home.hero.get-started': 'Start archiving - Free',
// Home Page - Open Source Section
'home.open-source.title':
diff --git a/apps/website/src/locales/fr.ts b/apps/website/src/locales/fr.ts
index 694d8683..e7bdbe06 100644
--- a/apps/website/src/locales/fr.ts
+++ b/apps/website/src/locales/fr.ts
@@ -118,6 +118,8 @@ export const translations: Partial<TranslationsDictionary> = {
'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.chip.open-source': 'Open source',
+ 'home.hero.chip.self-hostable': 'Auto-hébergeable',
'home.hero.live-demo': 'Essayer la démo',
'home.hero.get-started': 'Commencer',
diff --git a/apps/website/src/pages/[locale]/index.astro b/apps/website/src/pages/[locale]/index.astro
index 5bdd5fb9..3bd2f6c7 100644
--- a/apps/website/src/pages/[locale]/index.astro
+++ b/apps/website/src/pages/[locale]/index.astro
@@ -1,7 +1,5 @@
---
-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';
@@ -11,6 +9,7 @@ import ValuesSection from '../../components/ValuesSection.astro';
import { useI18n } from '../../i18n/i18n';
import { LOCALES } from '../../i18n/i18n.constants';
import Layout from '../../layouts/Layout.astro';
+import Hero from '../../components/Hero.astro';
export async function getStaticPaths() {
@@ -23,31 +22,10 @@ const { t } = useI18n({ locale: Astro.currentLocale });
rawTitle={t('site.title')}
description={t('site.description')}
>
+ <Header />
+ <Hero />
- <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 />
-
- <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 />