page.tsx 6.0 KB

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