-
+
- + + GitHub + + +
- + + LinkedIn + + +
- + + Bluesky + + +
- + + X (Twitter) + + +
diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..39b17ff --- /dev/null +++ b/.env.example @@ -0,0 +1,14 @@ +# Since the ".env" file is gitignored, you can use the ".env.example" file to +# build a new ".env" file when you clone the repo. Keep this file up-to-date +# when you add new variables to `.env`. + +# This file will be committed to version control, so make sure not to have any +# secrets in it. If you are cloning this repo, create a copy of this file named +# ".env" and populate it with your secrets. + +# When adding additional environment variables, the schema in "/src/env.js" +# should be updated accordingly. + +# Prisma +# https://www.prisma.io/docs/reference/database-reference/connection-urls#env +DATABASE_URL="postgresql://postgres:password@localhost:5432/website" diff --git a/.gitignore b/.gitignore index 1e32026..524867d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,29 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + # dependencies /node_modules +/.pnp +.pnp.js # testing /coverage -# vite -/dist +# database +/prisma/db.sqlite +/prisma/db.sqlite-journal +db.sqlite + +# next.js +/.next/ +/out/ +next-env.d.ts + +# production +/build # misc .DS_Store *.pem -*.har # debug npm-debug.log* @@ -18,10 +31,14 @@ yarn-debug.log* yarn-error.log* .pnpm-debug.log* -# env files +# local env files +# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables .env .env*.local +# vercel +.vercel + # typescript *.tsbuildinfo @@ -29,12 +46,4 @@ yarn-error.log* .idea /.direnv -result - -# rust -/api/target - -# sqlite -*.db -*.db-wal -*.db-shm +/generated \ No newline at end of file diff --git a/README.md b/README.md index 52e5c9c..548c370 100644 --- a/README.md +++ b/README.md @@ -1,94 +1,103 @@ # jetpham.com -Personal site for Jet Pham. +
wasm-pack-template
+ {renderedContent}
+
+ Your most recent post: {latestPost.name}
+ ) : ( +You have no posts yet.
+ )} + +Software Extremist
-Asked ${escapeHtml(askedExact)}
-Answered ${escapeHtml(answeredExact)}
`; -} - -function formatRatio(stats: QuestionStats): string { - if (stats.asked === 0) return "0%"; - return `${Math.round((stats.answered / stats.asked) * 100)}%`; -} - -function renderQuestions(list: HTMLElement, questions: Question[]) { - if (questions.length === 0) { - list.innerHTML = ` -No answers yet
-...
-${escapeHtml(q.question)}
-${escapeHtml(q.answer)}
-Load failed
-Failed to load answered questions.
- -${spans}