page.tsx 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. import secondselfShot from "@/assets/projects/secondself.webp";
  2. import { BentoGrid, type BentoItem } from "@/components/bento/bento-grid";
  3. import { ArtifactsCard } from "@/components/cards/artifacts";
  4. import { EmojiCard } from "@/components/cards/emoji";
  5. import { FinOpsCard } from "@/components/cards/finops";
  6. import { GlobeCard } from "@/components/cards/globe";
  7. import { HeroCard } from "@/components/cards/hero";
  8. import { MiniCard } from "@/components/cards/mini-card";
  9. import { PackBookCard } from "@/components/cards/packbook";
  10. import { PhotoDeck } from "@/components/cards/photo-deck";
  11. import { ProjectCard } from "@/components/cards/project";
  12. import { SkyCard } from "@/components/cards/sky";
  13. import { TechSphere } from "@/components/cards/tech-sphere";
  14. import { WritingCard } from "@/components/cards/writing";
  15. import { projects } from "@/config/site";
  16. import { getHomeData, getLatestPosts } from "@/lib/data";
  17. // Static, refreshed hourly: Firebase URLs and the latest posts are baked in.
  18. export const revalidate = 3600;
  19. export default async function Page() {
  20. const [home, posts] = await Promise.all([getHomeData(), getLatestPosts()]);
  21. // Order matters: cards pack first-fit in this order. Sizes are columns × rows
  22. // on phones (2 columns), small tablets (2), tablets (3), and desktops (4).
  23. // On tablets:
  24. // [hero ][sky ]
  25. // [hero ][globe]
  26. // [finops ]
  27. // [artifacts ]
  28. // [secondself][pack ]
  29. // [photos ][pack ]
  30. // [photos ][web ]
  31. // [chatbot ][web ]
  32. // [tech][mini][emoji]
  33. // [paper][writing ]
  34. // On desktop:
  35. // [hero ][finops ]
  36. // [hero ][artifacts ]
  37. // [sky][globe][secondself]
  38. // [pack][photos ][web]
  39. // [pack][photos ][web]
  40. // [chatbot ][tech][mini]
  41. // [emoji][paper][writing ]
  42. const items: BentoItem[] = [
  43. {
  44. id: "hero",
  45. tags: ["about"],
  46. label: "About Eric",
  47. size: [
  48. [2, 3],
  49. [2, 2],
  50. [2, 2],
  51. [2, 2],
  52. ],
  53. still: true,
  54. content: <HeroCard avatarUrl={home.avatarUrl} dogUrl={home.dogUrl} />,
  55. },
  56. {
  57. id: "finops",
  58. tags: ["work"],
  59. label: "AWS FinOps Agent",
  60. size: [
  61. [2, 2],
  62. [2, 1],
  63. [3, 1],
  64. [2, 1],
  65. ],
  66. content: <FinOpsCard />,
  67. },
  68. {
  69. id: "artifacts",
  70. tags: ["work"],
  71. label: "Amazon Q artifacts",
  72. size: [
  73. [2, 2],
  74. [2, 1],
  75. [3, 1],
  76. [2, 1],
  77. ],
  78. content: <ArtifactsCard />,
  79. },
  80. {
  81. id: "sky",
  82. tags: ["about"],
  83. label: "Seattle sky and theme switch",
  84. size: [
  85. [1, 1],
  86. [1, 1],
  87. [1, 1],
  88. [1, 1],
  89. ],
  90. content: <SkyCard />,
  91. },
  92. {
  93. id: "globe",
  94. tags: ["about"],
  95. label: "Purdue, UCLA, Seattle",
  96. size: [
  97. [1, 1],
  98. [1, 1],
  99. [1, 1],
  100. [1, 1],
  101. ],
  102. content: <GlobeCard />,
  103. },
  104. {
  105. id: "secondself",
  106. tags: ["projects"],
  107. label: projects.secondself.name,
  108. size: [
  109. [2, 1],
  110. [2, 1],
  111. [2, 1],
  112. [2, 1],
  113. ],
  114. content: (
  115. <ProjectCard
  116. image={secondselfShot}
  117. look="secondself"
  118. project={projects.secondself}
  119. />
  120. ),
  121. },
  122. {
  123. id: "packbook",
  124. tags: ["projects"],
  125. label: "PackBook",
  126. size: [
  127. [2, 2],
  128. [1, 2],
  129. [1, 2],
  130. [1, 2],
  131. ],
  132. content: <PackBookCard />,
  133. },
  134. {
  135. id: "photos",
  136. tags: ["about"],
  137. label: "Photos",
  138. size: [
  139. [2, 2],
  140. [2, 2],
  141. [2, 2],
  142. [2, 2],
  143. ],
  144. content: <PhotoDeck photos={home.photos} />,
  145. },
  146. {
  147. id: "webagent",
  148. tags: ["projects"],
  149. label: projects.webagent.name,
  150. size: [
  151. [1, 2],
  152. [1, 2],
  153. [1, 2],
  154. [1, 2],
  155. ],
  156. content: (
  157. <ProjectCard
  158. height={800}
  159. image={home.webagentUrl}
  160. look="webagent"
  161. project={projects.webagent}
  162. width={1000}
  163. />
  164. ),
  165. },
  166. {
  167. id: "chatbot",
  168. tags: ["projects"],
  169. label: projects.chatbot.name,
  170. size: [
  171. [2, 1],
  172. [2, 1],
  173. [2, 1],
  174. [2, 1],
  175. ],
  176. content: (
  177. <ProjectCard
  178. height={1280}
  179. image={home.chatbotUrl}
  180. look="chatbot"
  181. project={projects.chatbot}
  182. width={2629}
  183. />
  184. ),
  185. },
  186. {
  187. id: "tech",
  188. tags: ["about", "work"],
  189. label: "Toolbox",
  190. size: [
  191. [1, 1],
  192. [1, 1],
  193. [1, 1],
  194. [1, 1],
  195. ],
  196. content: <TechSphere />,
  197. },
  198. {
  199. id: "mini",
  200. tags: ["about"],
  201. label: "Mini Cooper",
  202. size: [
  203. [1, 1],
  204. [1, 1],
  205. [1, 1],
  206. [1, 1],
  207. ],
  208. content: <MiniCard />,
  209. },
  210. {
  211. id: "emoji",
  212. tags: ["projects"],
  213. label: "Text to emoji",
  214. size: [
  215. [1, 1],
  216. [1, 1],
  217. [1, 1],
  218. [1, 1],
  219. ],
  220. content: <EmojiCard />,
  221. },
  222. {
  223. id: "paper",
  224. tags: ["projects", "work"],
  225. label: projects.paper.name,
  226. size: [
  227. [1, 1],
  228. [1, 1],
  229. [1, 1],
  230. [1, 1],
  231. ],
  232. content: (
  233. <ProjectCard
  234. height={1280}
  235. image={home.paperUrl}
  236. look="paper"
  237. project={projects.paper}
  238. width={1577}
  239. />
  240. ),
  241. },
  242. {
  243. id: "writing",
  244. tags: ["about"],
  245. label: "Latest writing",
  246. size: [
  247. [2, 2],
  248. [2, 1],
  249. [2, 1],
  250. [2, 1],
  251. ],
  252. content: <WritingCard posts={posts} />,
  253. },
  254. ];
  255. return <BentoGrid items={items} />;
  256. }