page.tsx 5.9 KB

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