-
-
- - - GitHub - - -
- - - LinkedIn - - -
- - - Bluesky - - -
- - - X (Twitter) - - -
diff --git a/.env.example b/.env.example deleted file mode 100644 index 39b17ff..0000000 --- a/.env.example +++ /dev/null @@ -1,14 +0,0 @@ -# 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 524867d..1e32026 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,16 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - # dependencies /node_modules -/.pnp -.pnp.js # testing /coverage -# database -/prisma/db.sqlite -/prisma/db.sqlite-journal -db.sqlite - -# next.js -/.next/ -/out/ -next-env.d.ts - -# production -/build +# vite +/dist # misc .DS_Store *.pem +*.har # debug npm-debug.log* @@ -31,14 +18,10 @@ yarn-debug.log* yarn-error.log* .pnpm-debug.log* -# 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 files .env .env*.local -# vercel -.vercel - # typescript *.tsbuildinfo @@ -46,4 +29,12 @@ yarn-error.log* .idea /.direnv -/generated \ No newline at end of file +result + +# rust +/api/target + +# sqlite +*.db +*.db-wal +*.db-shm diff --git a/README.md b/README.md index 548c370..52e5c9c 100644 --- a/README.md +++ b/README.md @@ -1,103 +1,94 @@ # jetpham.com -
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}