Jotley / website / src / app / tutorials / page.tsx
| 1 | import Link from 'next/link'; |
| 2 | import { pageMetadata } from '@/lib/site-metadata'; |
| 3 | import '../components/home/home.css'; |
| 4 | import SiteHeader from '../components/SiteHeader'; |
| 5 | import SiteFooter from '../components/SiteFooter'; |
| 6 | import Walkthrough from '../components/home/Walkthrough'; |
| 7 | import { TUTORIALS, formatTime } from '../components/home/media'; |
| 8 | |
| 9 | export const metadata = pageMetadata('tutorials'); |
| 10 | |
| 11 | export default function TutorialsPage() { |
| 12 | return ( |
| 13 | <div className="jt-home flex min-h-screen flex-col" data-testid="page-surface"> |
| 14 | <SiteHeader /> |
| 15 | <main className="page-main"> |
| 16 | <div className="wrap"> |
| 17 | <header className="page-hero"> |
| 18 | <h1>Jotley <span className="accent">tutorials</span></h1> |
| 19 | <p className="sub">Narrated, start-to-finish tours of Jotley on iPhone, iPad and Mac. Pick a device, press play, or jump straight to a chapter.</p> |
| 20 | <nav className="tut-jump" aria-label="Tutorials on this page"> |
| 21 | {TUTORIALS.map((t) => ( |
| 22 | <a key={t.id} href={`#${t.id}`}>{t.title.replace(/^Jotley (on |for )/, '')}<span>{formatTime(t.film.duration)}</span></a> |
| 23 | ))} |
| 24 | </nav> |
| 25 | </header> |
| 26 | {TUTORIALS.map((t) => ( |
| 27 | <section key={t.id} id={t.id} className="tut-section" aria-labelledby={`${t.id}-heading`}> |
| 28 | <div className="tut-head"> |
| 29 | <h2 id={`${t.id}-heading`}>{t.title}</h2> |
| 30 | <p>{t.summary}</p> |
| 31 | </div> |
| 32 | <Walkthrough |
| 33 | film={t.film} |
| 34 | chapters={t.chapters} |
| 35 | label={`${t.title} tutorial, with narration and captions`} |
| 36 | startTitle={`Watch ${t.title}`} |
| 37 | chaptersLabel={`${t.title} chapters`} |
| 38 | event="tutorial" |
| 39 | location={t.id} |
| 40 | /> |
| 41 | </section> |
| 42 | ))} |
| 43 | <p className="tut-more"> |
| 44 | Want the whole story in one film? <Link href="/#walkthrough">Watch the walkthrough</Link>. |
| 45 | </p> |
| 46 | </div> |
| 47 | </main> |
| 48 | <SiteFooter /> |
| 49 | </div> |
| 50 | ); |
| 51 | } |