This commit is contained in:
parent
1efaf2f0b1
commit
f75305ebfe
5 changed files with 64 additions and 7 deletions
28
website/scripts/commit.ts
Normal file
28
website/scripts/commit.ts
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue