add git log widget
All checks were successful
/ test (push) Successful in 18s

This commit is contained in:
Soph :3 2024-08-29 23:16:35 +03:00
parent 1efaf2f0b1
commit f75305ebfe
Signed by: sophie
GPG key ID: EDA5D222A0C270F2
5 changed files with 64 additions and 7 deletions

28
website/scripts/commit.ts Normal file
View file

@ -0,0 +1,28 @@
import { timeAgo } from "./util";
const git = __GIT_LOG_OUTPUT__;
const date = new Date(git.date);
const commit = document.getElementById("commit");
const a = document.createElement("a");
a.href = `https://git.sad.ovh/sophie/website/commit/${git.commit}`;
const h2 = document.createElement("h2")
h2.innerText = git.message;
a.appendChild(h2);
const p = document.createElement("p");
p.innerText = `${timeAgo(date)} -- ${git.date}`
const p2 = document.createElement("p");
p2.innerText = `commit by ${git.author.replace(/[^ ]*@.*/, "")}`
commit?.appendChild(a)
commit?.appendChild(p)
commit?.appendChild(p2)
// <h1>More binkies + thinliquid's logo!! tysm :3</h1>
//<p>20 minutes ago -- 2024-08-29 22:00:36 GMT+3</p>