diff options
Diffstat (limited to 'src/components/Commit.astro')
-rw-r--r-- | src/components/Commit.astro | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/components/Commit.astro b/src/components/Commit.astro deleted file mode 100644 index 3ee284a..0000000 --- a/src/components/Commit.astro +++ /dev/null @@ -1,49 +0,0 @@ ---- -import type { Commit } from "@lib/git/types"; -import { gitDir } from "@lib/git"; - -type Props = Commit; - -const { hash, files, author, signature } = Astro.props; - -const git = await gitDir; ---- -<p>Git commit info:</p> -<dl> - <dt>Hash</dt> - <dd>{hash}</dd> - <dt>Files</dt> - {files.map((file) => <dd>{file.pathname.replace(git, "")}</dd>)} - <dt>Author</dt> - <dd>{author.name} <{author.email}></dd> - { - signature && ( - <dt>Commit Signature</dt> - <dd> - <dl> - <dt>Type</dt> - <dd>{signature.type}</dd> - <dt>Signer</dt> - <dd>{signature.signerName}</dd> - <dt>Key fingerprint</dt> - <dd>{signature.keyFingerPrint}</dd> - </dl> - </dd> - ) - } -</dl> - -<style> - dl { - display: grid; - grid-template-columns: 1fr 1fr; - } - - dl > dt, dd { - display: inline-block; - } - - dt::after { - content: ": "; - } -</style> |