commit 8fc28b7bc6c7de46f85e474a6ebbba4b0ea780e4 parent 3d4a30bb16864a31bc3779a9b016a9350aa72363 Author: LukeJ <luke.jones.2567@gmail.com> Date: Tue, 29 Sep 2026 21:30:11 +0100 refactor: improve formatting of commit lists Diffstat:
| M | src/pages/projects/[name]/commits/index.astro | | | 18 | ++++++++++-------- |
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/pages/projects/[name]/commits/index.astro b/src/pages/projects/[name]/commits/index.astro @@ -18,24 +18,26 @@ const { name } = Astro.params const commits = getCommits(name!) --- -<Base title={`${name}`}> - <table> +<Base title={`${name} - commits`}> + <table class="w-full"> + <tr> + <th class="text-left">sha</th> + <th class="text-left">Message</th> + <th class="text-left">Date</th> + </tr> { commits.reverse().map((commit) => ( <tr> - <td> + <td class="max-w-12 min-w-12"> <a href={`/projects/${name}/commit/${commit.sha}`}> <code class="text-sm">{commit.shortSha}</code> </a> </td> - <td class="overflow-hidden text-ellipsis"> + <td class="whitespace-nowrap overflow-hidden max-w-72 text-ellipsis"> <code class="text-sm">{commit.message}</code> </td> <td> - <code class="text-sm">{commit.author.name}</code> - </td> - <td> - <code class="text-sm">{commit.date}</code> + {new Date(commit.date).toLocaleDateString()} </td> </tr> ))