page.tsx 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import Image, { type ImageProps } from "next/image";
  2. import { Button } from "@repo/ui/button";
  3. import styles from "./page.module.css";
  4. type Props = Omit<ImageProps, "src"> & {
  5. srcLight: string;
  6. srcDark: string;
  7. };
  8. const ThemeImage = (props: Props) => {
  9. const { srcLight, srcDark, ...rest } = props;
  10. return (
  11. <>
  12. <Image {...rest} src={srcLight} className="imgLight" />
  13. <Image {...rest} src={srcDark} className="imgDark" />
  14. </>
  15. );
  16. };
  17. export default function Home() {
  18. return (
  19. <div className={styles.page}>
  20. <main className={styles.main}>
  21. <ThemeImage
  22. className={styles.logo}
  23. srcLight="turborepo-dark.svg"
  24. srcDark="turborepo-light.svg"
  25. alt="Turborepo logo"
  26. width={180}
  27. height={38}
  28. priority
  29. />
  30. <ol>
  31. <li>
  32. Get started by editing <code>apps/docs/app/page.tsx</code>
  33. </li>
  34. <li>Save and see your changes instantly.</li>
  35. </ol>
  36. <div className={styles.ctas}>
  37. <a
  38. className={styles.primary}
  39. href="https://vercel.com/new/clone?demo-description=Learn+to+implement+a+monorepo+with+a+two+Next.js+sites+that+has+installed+three+local+packages.&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F4K8ZISWAzJ8X1504ca0zmC%2F0b21a1c6246add355e55816278ef54bc%2FBasic.png&demo-title=Monorepo+with+Turborepo&demo-url=https%3A%2F%2Fexamples-basic-web.vercel.sh%2F&from=templates&project-name=Monorepo+with+Turborepo&repository-name=monorepo-turborepo&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fturborepo%2Ftree%2Fmain%2Fexamples%2Fbasic&root-directory=apps%2Fdocs&skippable-integrations=1&teamSlug=vercel&utm_source=create-turbo"
  40. target="_blank"
  41. rel="noopener noreferrer"
  42. >
  43. <Image
  44. className={styles.logo}
  45. src="/vercel.svg"
  46. alt="Vercel logomark"
  47. width={20}
  48. height={20}
  49. />
  50. Deploy now
  51. </a>
  52. <a
  53. href="https://turborepo.dev/docs?utm_source"
  54. target="_blank"
  55. rel="noopener noreferrer"
  56. className={styles.secondary}
  57. >
  58. Read our docs
  59. </a>
  60. </div>
  61. <Button appName="docs" className={styles.secondary}>
  62. Open alert
  63. </Button>
  64. </main>
  65. <footer className={styles.footer}>
  66. <a
  67. href="https://vercel.com/templates?search=turborepo&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
  68. target="_blank"
  69. rel="noopener noreferrer"
  70. >
  71. <Image
  72. aria-hidden
  73. src="/window.svg"
  74. alt="Window icon"
  75. width={16}
  76. height={16}
  77. />
  78. Examples
  79. </a>
  80. <a
  81. href="https://turborepo.dev?utm_source=create-turbo"
  82. target="_blank"
  83. rel="noopener noreferrer"
  84. >
  85. <Image
  86. aria-hidden
  87. src="/globe.svg"
  88. alt="Globe icon"
  89. width={16}
  90. height={16}
  91. />
  92. Go to turborepo.dev →
  93. </a>
  94. </footer>
  95. </div>
  96. );
  97. }