| 1 | import Transition from "@/components/transition"; |
| 2 | import { AiOutlineRight, AiOutlineMail |
| 3 | import { FiGithub } |
| 4 | import { Projects } |
| 5 | import Badge from "@/components/badge |
| 6 | import { |
| 7 | allEnglishWritings, |
| 8 | allGermanWritings, |
| 9 | } from "@/.content-collections/generated"; |
| 10 | import Nextjs from "@/icons/next |
| 11 | import NestJS from "@/icons/nest |
| 12 | import Prisma from "@/icons/prisma |
| 13 | import Grafana from "@/icons/grafana |
| 14 | import Flutter from "@/icons/flutter |
| 15 | import { Link } |
| 16 | import { getLocale, getTranslations |
| 17 | import { Metadata } |
| 18 | |
| 19 | export async function generateMetadata |
| 20 | params: Promise |
| 21 | }): Promise<Metadata |
| 22 | const { locale |
| 23 | const t = |
| 24 | |
| 25 | return { |
| 26 | title: "Gurpal Singh | PhantomKnight287", |
| 27 | description: t("HomePage.summary |
| 28 | openGraph: { |
| 29 | title: "Gurpal Singh | PhantomKnight287", |
| 30 | description: t("HomePage.summary |
| 31 | type: "website", |
| 32 | url: "https://phantomknight287.github.io/", |
| 33 | siteName: "Gurpal Singh | PhantomKnight287", |
| 34 | images: [ |
| 35 | { |
| 36 | url: "https://github.com/phantomknight287.png", |
| 37 | width: 200, |
| 38 | height: 200, |
| 39 | alt: "PhantomKnight287", |
| 40 | }, |
| 41 | ], |
| 42 | }, |
| 43 | twitter: { |
| 44 | site: "@PhantomKnight287", |
| 45 | title: "Gurpal Singh | PhantomKnight287", |
| 46 | description: t("HomePage.summary |
| 47 | card: "summary_large_image", |
| 48 | creator: "gurpalsingh287", |
| 49 | images: [ |
| 50 | { |
| 51 | url: "https://github.com/phantomknight287.png", |
| 52 | width: 200, |
| 53 | height: 200, |
| 54 | }, |
| 55 | ], |
| 56 | }, |
| 57 | }; |
| 58 | } |
| 59 | |
| 60 | function getProjectSummaryString( |
| 61 | project: (typeof |
| 62 | ): `Projects.${string} |
| 63 | return `Projects.${project |
| 64 | } |
| 65 | |
| 66 | export default async function |
| 67 | const t = |
| 68 | const locale = |
| 69 | |
| 70 | return ( |
| 71 | <div className="flex mt-5 flex-col max-w-[600px] mx-auto p-5 lg:p-0 |
| 72 | <div className="container |
| 73 | <h1 className="text-xl font-bold text-gray-400 |
| 74 | <span className=""> |
| 75 | <Transition /> |
| 76 | </h1> |
| 77 | <p className="mt-5 text-xl text-gray-400 |
| 78 | {t("HomePage.description", |
| 79 | age: Math.floor |
| 80 | (new Date(). |
| 81 | (1000 * 60 * |
| 82 | ), |
| 83 | })} |
| 84 | </p> |
| 85 | <p className="mt-5 text-xl text-gray-400 |
| 86 | {t("HomePage.currently") |
| 87 | <Badge href=" |
| 88 | <Nextjs className=" |
| 89 | </Badge> |
| 90 | ,{" "} |
| 91 | <Badge href=" |
| 92 | <NestJS className=" |
| 93 | </Badge> |
| 94 | ,{" "} |
| 95 | <Badge href=" |
| 96 | <Prisma className=" |
| 97 | Prisma |
| 98 | </Badge> |
| 99 | ,{" "} |
| 100 | <Badge href=" |
| 101 | <Grafana className=" |
| 102 | Grafana |
| 103 | </Badge>{" " |
| 104 | {t("HomePage.learning") |
| 105 | <Badge href={ |
| 106 | <Flutter className=" |
| 107 | Flutter |
| 108 | </Badge> |
| 109 | . |
| 110 | </p> |
| 111 | {locale == "de |
| 112 | <> |
| 113 | <p className="mt-5 text-xl text-gray-400 |
| 114 | Notiz: Ich lerne Deutsch und habe beschlossen, mein Portfolio zur |
| 115 | Übung zu übersetzen. Bitte verzeihen Sie mir etwaige Fehler. |
| 116 | </p> |
| 117 | </> |
| 118 | ) : null} |
| 119 | |
| 120 | <div className="flex items-start mt-5 w-full justify-start flex-col |
| 121 | {/* <div className="flex flex-row items-center justify-start"> |
| 122 | <div className="aspect-square flex-none h-[10px] overflow-hidden relative w-2.5 will-change-transform bg-green-500 rounded-full"></div> |
| 123 | <div className="flex flex-col justify-start shrink-0 opacity-100 ml-2 "> |
| 124 | <p className="text-white">Available for new opportunities</p> |
| 125 | </div> |
| 126 | </div> */} |
| 127 | <br /> |
| 128 | <div className="flex flex-row mt-3 gap-3 |
| 129 | <a |
| 130 | href="https://github.com/phantomknight287" |
| 131 | target="_blank" |
| 132 | rel="noopener noreferrer" |
| 133 | className="flex flex-row items-center justify-start gap-2.5 |
| 134 | text-white transition duration-300 ease-in-out |
| 135 | bg-neutral-700 hover:bg-neutral-900 rounded-md px-3 py-2.5 |
| 136 | " |
| 137 | > |
| 138 | <FiGithub className=" |
| 139 | </a> |
| 140 | <a |
| 141 | href="mailto:phantomknight287@proton.me" |
| 142 | target="_blank" |
| 143 | rel="noopener noreferrer" |
| 144 | className="flex flex-row items-center justify-start gap-2.5 |
| 145 | text-white transition duration-300 ease-in-out |
| 146 | bg-neutral-700 hover:bg-neutral-900 rounded-md px-3 py-2.5 |
| 147 | " |
| 148 | > |
| 149 | <AiOutlineMail className=" |
| 150 | </a> |
| 151 | </div> |
| 152 | </div> |
| 153 | <div className="w-full h-[1px] |
| 154 | <div className="mt-5 |
| 155 | <h1 className="text-2xl text-white mt-5 mb-5 |
| 156 | {t("Projects.title") |
| 157 | </h1> |
| 158 | <div className="flex flex-col |
| 159 | {Projects.map(( |
| 160 | <Link |
| 161 | className="proj group" |
| 162 | key={project.name |
| 163 | href={`/projects/${project |
| 164 | > |
| 165 | <article className="flex flex-row gap-0 items-start justify-between lg:justify-start mt-1 mb-1 w-full overflow-hidden |
| 166 | <div className="flex flex-row gap-2 justify-start opacity-100 flex-none shrink-0 h-auto relative whitespace-pre w-auto mr-3 |
| 167 | <h1 className="text-lg leading-[1.3em] text-left text-gray-300 group-hover:text-white inline-flex underline |
| 168 | {project.name} |
| 169 | </h1> |
| 170 | <p className="line-clamp-1 text-gray-400 max-w-full |
| 171 | {t(`Projects.${project |
| 172 | </p> |
| 173 | </div> |
| 174 | </article> |
| 175 | </Link> |
| 176 | ))} |
| 177 | </div> |
| 178 | </div> |
| 179 | <div className="mt-5 |
| 180 | <h1 className="text-2xl text-white mt-5 mb-5 |
| 181 | <div className="flex flex-col |
| 182 | {[ |
| 183 | ...(locale === |
| 184 | ].map((writing |
| 185 | <Link |
| 186 | className="proj group" |
| 187 | key={writing._meta |
| 188 | href={`/writings/${writing |
| 189 | > |
| 190 | <article className="flex flex-row gap-0 items-start justify-between lg:justify-start mt-1 mb-1 w-full overflow-hidden |
| 191 | <div className="flex flex-row gap-2 justify-start opacity-100 flex-none shrink-0 h-auto relative whitespace-pre w-auto mr-3 |
| 192 | <h1 className="text-lg leading-[1.3em] text-left text-gray-300 group-hover:text-white inline-flex underline line-clamp-1 overflow-ellipsis |
| 193 | {writing.title} |
| 194 | </h1> |
| 195 | </div> |
| 196 | </article> |
| 197 | </Link> |
| 198 | ))} |
| 199 | </div> |
| 200 | </div> |
| 201 | </div> |
| 202 | </div> |
| 203 | ); |
| 204 | } |