summaryrefslogtreecommitdiff
path: root/src/components/signature/Commit.astro
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-08-05 18:50:37 +0100
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-08-05 18:50:37 +0100
commit0af094770c4ebabc56ff761a8bd215bc397c0f7e (patch)
treea9ad669c8b84b4d13897732ed93ccfcbbeb2cb25 /src/components/signature/Commit.astro
parent84eef3f848c4efa18985a776021a58720744523a (diff)
refactor: reading page review
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/components/signature/Commit.astro')
-rw-r--r--src/components/signature/Commit.astro86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/components/signature/Commit.astro b/src/components/signature/Commit.astro
deleted file mode 100644
index 328a8f9..0000000
--- a/src/components/signature/Commit.astro
+++ /dev/null
@@ -1,86 +0,0 @@
----
-import { gitDir } from "@lib/git";
-import type { Commit } from "@lib/git/types";
-import { toIso8601Full } from "@utils/datetime";
-
-type Props = { commit: Commit; lang: string };
-
-const dir = await gitDir();
-const { hash, files, author, committer, signature } = Astro.props.commit;
-
-const formatter = new Intl.DateTimeFormat([Astro.props.lang], {
- dateStyle: "short",
- timeStyle: "short",
-});
----
-
-<section>
- <details>
- <summary>
- Informações sobre o último commit que modificou ficheiros relacionados a
- este blog post:
- </summary>
- <dl class="divider">
- <dt>Hash</dt>
- <dd><samp title={hash.long}>0x{hash.short.toUpperCase()}</samp></dd>
- <dt>Ficheiros modificados</dt>
- {
- files.length > 0
- ? files.map((file) => (
- <dd><samp>{file.path.pathname.replace(dir.pathname, "")}</samp></dd>
- ))
- : <dd>Nenhum ficheiro modificado</dd>
- }
- <dt>
- Autor (<time datetime={toIso8601Full(author.date)}>{
- formatter.format(author.date)
- }</time>)
- </dt>
- <dd>
- {author.name} &lt;<a href={`mailto:${author.email}`}>{
- author.email
- }</a>&gt;
- </dd>
- <dt>
- Commiter (<time datetime={toIso8601Full(committer.date)}>{
- formatter.format(committer.date)
- }</time>)
- </dt>
- <dd>
- {committer.name} &lt;<a href={`mailto:${committer.email}`}>{
- committer.email
- }</a>&gt;
- </dd>
- {
- signature &&
- (
- <dt>Assinatura do commit</dt>
- <dd>
- <dl>
- <dt>Tipo</dt>
- <dd><samp>{signature.type}</samp></dd>
- <dt>Assinante</dt>
- <dd>{signature.signer}</dd>
- <dt>Fingerprint da chave</dt>
- <dd><samp>0x{signature.key.short}</samp></dd>
- </dl>
- </dd>
- )
- }
- </dl>
- </details>
-</section>
-
-<style>
- section {
- font-size: smaller;
- }
-
- dl {
- margin-block: 0;
- }
-
- details {
- padding-block: 1rem;
- }
-</style>