feat(landing): lien de téléchargement de l'app Android (#65)
Some checks failed
CI / lint (push) Successful in 5m4s
CI / build (push) Successful in 3m38s
CI / intent-service-test (push) Successful in 6m41s
CI / test (push) Failing after 11m29s
CI / e2e (push) Successful in 14m56s

Sur la page vitrine `/`, sous la rangée de CTA du hero (pas un 3e bouton :
un compte reste nécessaire quelle que soit la plateforme), un lien discret
vers l'APK Android + une ligne d'aide.

- Cible : l'asset `batchcooking.apk` de la dernière release taguée Forgejo
  (`/releases/latest/download/…`, nom de fichier stable) — pas un artefact
  de CI. 404 tant que #64 + la correction de release.yml ne sont pas faits :
  état transitoire assumé, ce ticket n'ajoute que le lien.
- `mobileHint` : rappel honnête que c'est un .apk à sideloader, pas une
  distribution Play Store.
- i18n `landing.hero.mobileDownload` / `mobileHint` ; style discret dans
  landing-page.scss ; scénario Cypress de plus (présence + href du lien).

Vérifs : `pnpm build` + `pnpm lint` OK. `landing.feature` non lancé en
local (le hoist `tslib` de `@cypress/vite-dev-server` dans ce node_modules
est cassé par un `pnpm install --force` interrompu + un verrou concurrent
sur `@esbuild/win32-x64` ; `pnpm-lock.yaml` inchangé, la CI n'est pas
affectée) → couvert par le job `e2e` de la CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Nicolas 2026-09-06 10:26:50 +02:00
parent dcfb86d6c9
commit 503781c95f
5 changed files with 66 additions and 2 deletions

View file

@ -22,6 +22,11 @@ Feature: Public landing page at the root
When I click the link "Créer un compte" When I click the link "Créer un compte"
Then the URL should include "/signup" Then the URL should include "/signup"
Scenario: The landing page offers the Android app download
Given I am not signed in
When I visit "/"
Then I should see the Android download link
Scenario: Another guarded route still redirects a logged-out visitor to sign in Scenario: Another guarded route still redirects a logged-out visitor to sign in
Given I am not signed in Given I am not signed in
When I visit "/recettes" When I visit "/recettes"

View file

@ -14,3 +14,16 @@ Then("I should see the landing call to action", () => {
.should("be.visible") .should("be.visible")
.and("have.attr", "href", "/login"); .and("have.attr", "href", "/login");
}); });
// The Android build is distributed as a Forgejo release asset with a stable
// filename (issue #64 builds/attaches it). We only assert the link is there
// and points at the right URL — the file itself is external to the suite.
Then("I should see the Android download link", () => {
cy.get(".landing__hero .landing__mobile-link")
.should("be.visible")
.and(
"have.attr",
"href",
"https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest/download/batchcooking.apk",
);
});

View file

@ -1327,7 +1327,9 @@
"title": "Cuisinez une fois, mangez toute la semaine", "title": "Cuisinez une fois, mangez toute la semaine",
"lede": "Planifiez vos repas, importez des recettes depuis vos sites préférés, et générez la liste de courses qui va avec — pour tout le foyer, sans y penser deux fois.", "lede": "Planifiez vos repas, importez des recettes depuis vos sites préférés, et générez la liste de courses qui va avec — pour tout le foyer, sans y penser deux fois.",
"ctaSignup": "Créer un compte", "ctaSignup": "Créer un compte",
"ctaLogin": "Se connecter" "ctaLogin": "Se connecter",
"mobileDownload": "Télécharger pour Android",
"mobileHint": "Fichier .apk à installer soi-même : Android demandera d'autoriser l'installation depuis une source inconnue. Ce n'est pas une version du Play Store, et un compte reste nécessaire."
}, },
"features": { "features": {
"title": "Ce que batchCooking fait pour vous", "title": "Ce que batchCooking fait pour vous",

View file

@ -1,4 +1,4 @@
import { CalendarDays, HeartPulse, Sparkles, Users } from "lucide-react"; import { CalendarDays, HeartPulse, Smartphone, Sparkles, Users } from "lucide-react";
import type { ReactNode } from "react"; import type { ReactNode } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
@ -50,6 +50,22 @@ export function LandingPage() {
{t("landing.hero.ctaLogin")} {t("landing.hero.ctaLogin")}
</Link> </Link>
</div> </div>
{/*
* Secondary action — an account is needed on any platform, so the
* Android build is a discreet link under the CTA row, not a third
* button. Points at the Forgejo "latest release" asset with a
* stable filename (see issue #64); 404s until that pipeline ships,
* accepted as a transient state. The hint is honest that this is a
* sideloaded .apk, not a Play Store listing.
*/}
<a
className="landing__mobile-link"
href="https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest/download/batchcooking.apk"
>
<Smartphone aria-hidden />
{t("landing.hero.mobileDownload")}
</a>
<p className="landing__mobile-hint">{t("landing.hero.mobileHint")}</p>
</div> </div>
<HeroIllustration /> <HeroIllustration />
</section> </section>

View file

@ -116,6 +116,34 @@
} }
} }
// --- Android download (discreet, under the CTA row) --------------------
.landing__mobile-link {
display: inline-flex;
align-items: center;
gap: var(--space-xs);
margin-top: var(--space-md);
font-size: var(--font-size-sm);
font-weight: 600;
color: var(--color-primary);
text-decoration: none;
svg {
width: 1em;
height: 1em;
}
&:hover {
text-decoration: underline;
}
}
.landing__mobile-hint {
margin: var(--space-xs) 0 0;
font-size: var(--font-size-xs);
color: var(--color-text-muted);
max-width: 34rem;
}
// --- Features ----------------------------------------------------------- // --- Features -----------------------------------------------------------
.landing__features h2, .landing__features h2,
.landing__preview h2 { .landing__preview h2 {