page.tsx 5.1 KB

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