aakashbansal commited on
Commit
021fca2
·
1 Parent(s): cb4daf7

On the Journey selection screen, move "Select your Journey" and the subt

Browse files
src/app/select-journey/page.tsx CHANGED
@@ -1,6 +1,9 @@
 
1
  import { journeys } from '@/lib/journeys';
2
  import { JourneyCard } from '@/components/journey/journey-card';
3
  import { AppHeader } from '@/components/layout/app-header';
 
 
4
 
5
  export default function SelectJourneyPage() {
6
  return (
@@ -8,17 +11,35 @@ export default function SelectJourneyPage() {
8
  <AppHeader showBackButton backHref="/" />
9
  <main className="flex-1">
10
  <section className="container mx-auto py-12 md:py-16">
11
- <div className="mb-10 text-center">
12
  <h1 className="font-headline text-3xl font-bold tracking-tight md:text-4xl">
13
  Select Your Journey
14
  </h1>
15
- <p className="mt-3 max-w-xl mx-auto text-lg text-muted-foreground">
16
- Choose an image to begin your AI-guided exploration. Each journey offers unique questions and insights.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  </p>
18
  </div>
19
  <div className="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">
20
- {journeys.map((journey) => (
21
- <JourneyCard key={journey.id} journey={journey} />
22
  ))}
23
  </div>
24
  </section>
 
1
+
2
  import { journeys } from '@/lib/journeys';
3
  import { JourneyCard } from '@/components/journey/journey-card';
4
  import { AppHeader } from '@/components/layout/app-header';
5
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
6
+ import { HelpCircle } from 'lucide-react';
7
 
8
  export default function SelectJourneyPage() {
9
  return (
 
11
  <AppHeader showBackButton backHref="/" />
12
  <main className="flex-1">
13
  <section className="container mx-auto py-12 md:py-16">
14
+ <div className="mb-10 text-left">
15
  <h1 className="font-headline text-3xl font-bold tracking-tight md:text-4xl">
16
  Select Your Journey
17
  </h1>
18
+ <p className="mt-3 max-w-xl text-lg text-muted-foreground">
19
+ Choose an image to begin your AI-guided exploration.{' '}
20
+ <a
21
+ href="https://example.com/public-webpage"
22
+ target="_blank"
23
+ rel="noopener noreferrer"
24
+ className="text-primary underline hover:text-primary/80 transition-colors"
25
+ >
26
+ Each journey offers unique questions and insights.
27
+ </a>
28
+ <TooltipProvider>
29
+ <Tooltip delayDuration={100}>
30
+ <TooltipTrigger asChild>
31
+ <HelpCircle className="ml-1.5 inline-block h-4 w-4 cursor-pointer text-muted-foreground hover:text-accent" />
32
+ </TooltipTrigger>
33
+ <TooltipContent side="top">
34
+ <p>Learn more about how journeys are structured and what to expect.</p>
35
+ </TooltipContent>
36
+ </Tooltip>
37
+ </TooltipProvider>
38
  </p>
39
  </div>
40
  <div className="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-3">
41
+ {journeys.map((journey, index) => (
42
+ <JourneyCard key={journey.id} journey={journey} index={index} />
43
  ))}
44
  </div>
45
  </section>
src/components/journey/journey-card.tsx CHANGED
@@ -1,59 +1,47 @@
 
1
  "use client";
2
 
3
  import Image from 'next/image';
4
  import Link from 'next/link';
5
  import { Button } from '@/components/ui/button';
6
- import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';
7
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
8
- import { Rocket, Info } from 'lucide-react';
9
  import type { Journey } from '@/types';
10
 
11
  interface JourneyCardProps {
12
  journey: Journey;
 
13
  }
14
 
15
- export function JourneyCard({ journey }: JourneyCardProps) {
 
 
16
  return (
17
- <Card className="flex h-full flex-col overflow-hidden shadow-lg transition-shadow hover:shadow-xl">
18
  <CardHeader className="relative h-48 w-full p-0 md:h-56">
19
  <Image
20
  src={journey.imageUrl}
21
- alt={journey.title}
22
  layout="fill"
23
  objectFit="cover"
24
  data-ai-hint={journey.imageHint}
25
  className="transition-transform duration-300 ease-in-out group-hover:scale-105"
26
  />
 
 
 
 
 
 
 
 
 
27
  </CardHeader>
28
  <CardContent className="flex-grow p-6">
29
- <div className="flex items-center justify-between">
30
- <CardTitle className="font-headline text-xl">{journey.title}</CardTitle>
31
- <TooltipProvider>
32
- <Tooltip delayDuration={100}>
33
- <TooltipTrigger asChild>
34
- <Button variant="ghost" size="icon" className="h-8 w-8 text-muted-foreground hover:text-accent">
35
- <Info className="h-5 w-5" />
36
- <span className="sr-only">More info about {journey.title}</span>
37
- </Button>
38
- </TooltipTrigger>
39
- <TooltipContent side="top" className="max-w-xs bg-popover text-popover-foreground">
40
- <p>{journey.description}</p>
41
- </TooltipContent>
42
- </Tooltip>
43
- </TooltipProvider>
44
- </div>
45
- <CardDescription className="mt-2 text-sm">
46
- {journey.description.substring(0, 100)}{journey.description.length > 100 ? '...' : ''}
47
- </CardDescription>
48
  </CardContent>
49
- <CardFooter className="p-6 pt-0">
50
- <Button asChild className="w-full font-semibold">
51
- <Link href={`/journey/${journey.id}`}>
52
- Launch Journey
53
- <Rocket className="ml-2 h-4 w-4" />
54
- </Link>
55
- </Button>
56
- </CardFooter>
57
  </Card>
58
  );
59
  }
 
1
+
2
  "use client";
3
 
4
  import Image from 'next/image';
5
  import Link from 'next/link';
6
  import { Button } from '@/components/ui/button';
7
+ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
8
+ import { Rocket } from 'lucide-react';
 
9
  import type { Journey } from '@/types';
10
 
11
  interface JourneyCardProps {
12
  journey: Journey;
13
+ index: number;
14
  }
15
 
16
+ export function JourneyCard({ journey, index }: JourneyCardProps) {
17
+ const journeyLabel = `Journey ${index + 1}`;
18
+
19
  return (
20
+ <Card className="flex h-full flex-col overflow-hidden shadow-lg transition-shadow hover:shadow-xl group">
21
  <CardHeader className="relative h-48 w-full p-0 md:h-56">
22
  <Image
23
  src={journey.imageUrl}
24
+ alt={journey.title} // Alt text can remain descriptive
25
  layout="fill"
26
  objectFit="cover"
27
  data-ai-hint={journey.imageHint}
28
  className="transition-transform duration-300 ease-in-out group-hover:scale-105"
29
  />
30
+ <div className="absolute inset-x-0 bottom-0 flex items-center justify-between bg-gradient-to-t from-black/70 via-black/50 to-transparent p-3">
31
+ <span className="text-lg font-bold text-white">{journeyLabel}</span>
32
+ <Button asChild size="sm" className="font-semibold">
33
+ <Link href={`/journey/${journey.id}`}>
34
+ Launch
35
+ <Rocket className="ml-1.5 h-4 w-4" />
36
+ </Link>
37
+ </Button>
38
+ </div>
39
  </CardHeader>
40
  <CardContent className="flex-grow p-6">
41
+ <CardTitle className="font-headline text-xl">{journeyLabel}</CardTitle>
42
+ {/* Description removed as per request */}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  </CardContent>
44
+ {/* Footer removed as launch button is on image */}
 
 
 
 
 
 
 
45
  </Card>
46
  );
47
  }