refactor(lineage): migrate life-and-lineage to lineage subdomain redirect
Move the marketing landing page content to the new route group served at , and convert the legacy route into a 308 permanent redirect to the new subdomain. - Add hosting the migrated marketing page. - Extract shared landing content and the redirect target into , with unit tests asserting the redirect destination.
This commit is contained in:
@@ -1,51 +1,27 @@
|
||||
import { A } from "@solidjs/router";
|
||||
import { PageHead } from "~/components/PageHead";
|
||||
import SimpleParallax from "~/components/SimpleParallax";
|
||||
import DownloadOnAppStoreDark from "~/components/icons/DownloadOnAppStoreDark";
|
||||
/**
|
||||
* Legacy Life and Lineage marketing route — now a 308 permanent redirect to
|
||||
* the Lineage subdomain (task 08).
|
||||
*
|
||||
* The marketing content has been migrated to `src/routes/lineage/index.tsx`
|
||||
* served at `lineage.freno.me` (vercel.json host rewrites map the subdomain to
|
||||
* the `/lineage/*` internal prefix). Keeping this route as a permanent (308)
|
||||
* server-side redirect — rather than a client `<Navigate>` — preserves SEO
|
||||
* equity and gives installed / linked URLs a stable resolution path.
|
||||
*
|
||||
* Implemented as a SolidStart API route (`GET` handler returning a Response)
|
||||
* so the redirect happens before any rendering; the route no longer ships a
|
||||
* page component. The redirect target is centralized in
|
||||
* `~/routes/lineage/landing-content.ts` (`LEGACY_REDIRECT_TARGET`) so the
|
||||
* unit test can assert the destination without importing this server module.
|
||||
*/
|
||||
import { LEGACY_REDIRECT_TARGET } from "~/routes/lineage/landing-content";
|
||||
|
||||
export default function LifeAndLineageMarketing() {
|
||||
return (
|
||||
<>
|
||||
<PageHead
|
||||
title="Life and Lineage"
|
||||
description="A dark fantasy adventure mobile game. Download Life and Lineage on the App Store and Google Play."
|
||||
/>
|
||||
<SimpleParallax>
|
||||
<div class="flex h-full flex-col items-center justify-center text-white">
|
||||
<div>
|
||||
<img
|
||||
src="/LineageIcon.png"
|
||||
alt="Lineage App Icon"
|
||||
height={128}
|
||||
width={128}
|
||||
class="object-cover object-center"
|
||||
/>
|
||||
</div>
|
||||
<h1 class="mb-4 text-center text-5xl font-bold">Life and Lineage</h1>
|
||||
<p class="mb-8 text-xl">A dark fantasy adventure</p>
|
||||
<div class="flex space-x-4">
|
||||
<a
|
||||
class="my-auto transition-all duration-200 ease-out active:scale-95"
|
||||
href="https://apps.apple.com/us/app/life-and-lineage/id6737252442"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<DownloadOnAppStoreDark size={50} />
|
||||
</a>
|
||||
<A
|
||||
href="/downloads"
|
||||
class="transition-all duration-200 ease-out active:scale-95"
|
||||
>
|
||||
<img
|
||||
src="/google-play-badge.png"
|
||||
alt="google-play"
|
||||
width={180}
|
||||
height={60}
|
||||
/>
|
||||
</A>
|
||||
</div>
|
||||
</div>
|
||||
</SimpleParallax>
|
||||
</>
|
||||
);
|
||||
export function GET() {
|
||||
return new Response(null, {
|
||||
status: 308,
|
||||
headers: {
|
||||
Location: LEGACY_REDIRECT_TARGET,
|
||||
"Cache-Control": "public, max-age=0, must-revalidate"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user