page.tsx 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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, below the hero's header row), wide phones (2), small
  23. // tablets (2), tablets (3), and desktops (4).
  24. // On tablets:
  25. // [hero ][sky ]
  26. // [hero ][globe]
  27. // [finops ]
  28. // [artifacts ]
  29. // [secondself][pack ]
  30. // [photos ][pack ]
  31. // [photos ][web ]
  32. // [chatbot ][web ]
  33. // [tech][mini][emoji]
  34. // [paper][writing ]
  35. // On desktop:
  36. // [hero ][finops ]
  37. // [hero ][artifacts ]
  38. // [sky][globe][secondself]
  39. // [pack][photos ][web]
  40. // [pack][photos ][web]
  41. // [chatbot ][tech][mini]
  42. // [emoji][paper][writing ]
  43. const items: BentoItem[] = [
  44. {
  45. id: "hero",
  46. tags: ["about"],
  47. label: "About Eric",
  48. size: [
  49. [2, 1],
  50. [2, 2],
  51. [2, 2],
  52. [2, 2],
  53. [2, 2],
  54. ],
  55. still: true,
  56. // On phones a header row as tall as its content (its phone size is unused).
  57. header: true,
  58. content: <HeroCard avatarUrl={home.avatarUrl} dogUrl={home.dogUrl} />,
  59. },
  60. {
  61. id: "finops",
  62. tags: ["work"],
  63. label: "AWS FinOps Agent",
  64. size: [
  65. [2, 2],
  66. [2, 2],
  67. [2, 1],
  68. [3, 1],
  69. [2, 1],
  70. ],
  71. content: <FinOpsCard />,
  72. },
  73. {
  74. id: "artifacts",
  75. tags: ["work"],
  76. label: "Amazon Q artifacts",
  77. size: [
  78. [2, 2],
  79. [2, 2],
  80. [2, 1],
  81. [3, 1],
  82. [2, 1],
  83. ],
  84. content: <ArtifactsCard />,
  85. },
  86. {
  87. id: "sky",
  88. tags: ["about"],
  89. label: "Seattle sky and theme switch",
  90. size: [
  91. [1, 1],
  92. [1, 1],
  93. [1, 1],
  94. [1, 1],
  95. [1, 1],
  96. ],
  97. content: <SkyCard />,
  98. },
  99. {
  100. id: "globe",
  101. tags: ["about"],
  102. label: "Purdue, UCLA, Seattle",
  103. size: [
  104. [1, 1],
  105. [1, 1],
  106. [1, 1],
  107. [1, 1],
  108. [1, 1],
  109. ],
  110. content: <GlobeCard />,
  111. },
  112. {
  113. id: "secondself",
  114. tags: ["projects"],
  115. label: projects.secondself.name,
  116. size: [
  117. [2, 1],
  118. [2, 1],
  119. [2, 1],
  120. [2, 1],
  121. [2, 1],
  122. ],
  123. content: (
  124. <ProjectCard
  125. image={secondselfShot}
  126. look="secondself"
  127. project={projects.secondself}
  128. />
  129. ),
  130. },
  131. {
  132. id: "packbook",
  133. tags: ["projects"],
  134. label: "PackBook",
  135. size: [
  136. [2, 2],
  137. [2, 2],
  138. [1, 2],
  139. [1, 2],
  140. [1, 2],
  141. ],
  142. content: <PackBookCard />,
  143. },
  144. {
  145. id: "photos",
  146. tags: ["about"],
  147. label: "Photos",
  148. size: [
  149. [2, 2],
  150. [2, 2],
  151. [2, 2],
  152. [2, 2],
  153. [2, 2],
  154. ],
  155. content: <PhotoDeck photos={home.photos} />,
  156. },
  157. {
  158. id: "webagent",
  159. tags: ["projects"],
  160. label: projects.webagent.name,
  161. size: [
  162. [1, 2],
  163. [1, 2],
  164. [1, 2],
  165. [1, 2],
  166. [1, 2],
  167. ],
  168. content: (
  169. <ProjectCard
  170. height={800}
  171. image={home.webagentUrl}
  172. look="webagent"
  173. project={projects.webagent}
  174. width={1000}
  175. />
  176. ),
  177. },
  178. {
  179. id: "chatbot",
  180. tags: ["projects"],
  181. label: projects.chatbot.name,
  182. size: [
  183. [2, 1],
  184. [2, 1],
  185. [2, 1],
  186. [2, 1],
  187. [2, 1],
  188. ],
  189. content: (
  190. <ProjectCard
  191. height={1280}
  192. image={home.chatbotUrl}
  193. look="chatbot"
  194. project={projects.chatbot}
  195. width={2629}
  196. />
  197. ),
  198. },
  199. {
  200. id: "tech",
  201. tags: ["about", "work"],
  202. label: "Toolbox",
  203. size: [
  204. [1, 1],
  205. [1, 1],
  206. [1, 1],
  207. [1, 1],
  208. [1, 1],
  209. ],
  210. content: <TechSphere />,
  211. },
  212. {
  213. id: "mini",
  214. tags: ["about"],
  215. label: "Mini Cooper",
  216. size: [
  217. [1, 1],
  218. [1, 1],
  219. [1, 1],
  220. [1, 1],
  221. [1, 1],
  222. ],
  223. content: <MiniCard />,
  224. },
  225. {
  226. id: "emoji",
  227. tags: ["projects"],
  228. label: "Text to emoji",
  229. size: [
  230. [1, 1],
  231. [1, 1],
  232. [1, 1],
  233. [1, 1],
  234. [1, 1],
  235. ],
  236. content: <EmojiCard />,
  237. },
  238. {
  239. id: "paper",
  240. tags: ["projects", "work"],
  241. label: projects.paper.name,
  242. size: [
  243. [1, 1],
  244. [1, 1],
  245. [1, 1],
  246. [1, 1],
  247. [1, 1],
  248. ],
  249. content: (
  250. <ProjectCard
  251. height={1280}
  252. image={home.paperUrl}
  253. look="paper"
  254. project={projects.paper}
  255. width={1577}
  256. />
  257. ),
  258. },
  259. {
  260. id: "writing",
  261. tags: ["about"],
  262. label: "Latest writing",
  263. size: [
  264. [2, 2],
  265. [2, 2],
  266. [2, 1],
  267. [2, 1],
  268. [2, 1],
  269. ],
  270. content: <WritingCard posts={posts} />,
  271. },
  272. ];
  273. return <BentoGrid items={items} />;
  274. }