1
Fork 0

Migrate back to Git LFS

This commit is contained in:
Nadim Kobeissi 2025-06-26 12:19:00 +02:00
parent 6b34b62aa2
commit 4b6498ede3
Signed by: nadim
SSH key fingerprint: SHA256:o0JJHYcP8LVBoARMU+JjVbzJxL3HxW2F+C0yu/5zPgc
237 changed files with 36953 additions and 0 deletions

39
website/res/js/updated.js Normal file
View file

@ -0,0 +1,39 @@
const updatedInit = () => {
const lastUpdatedElement = document.getElementById("lastUpdated");
const updatedLink = document.createElement("a");
updatedLink.href =
"https://codeberg.org/nadimkobeissi/appliedcryptography/commits/branch/main";
fetch(
"https://codeberg.org/api/v1/repos/nadimkobeissi/appliedcryptography/commits?limit=1&sha=main",
)
.then((response) => response.json())
.then((data) => {
if (Array.isArray(data) && data.length > 0) {
const latestCommitDate = new Date(data[0].commit.author.date);
const options = {
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
hour12: true,
};
const formattedDate = latestCommitDate.toLocaleString(
undefined,
options,
);
updatedLink.innerText = formattedDate;
lastUpdatedElement.innerHTML = "";
lastUpdatedElement.appendChild(updatedLink);
const period = document.createElement("span");
period.innerText = ".";
lastUpdatedElement.appendChild(period);
}
})
.catch((error) => {
console.error("Error fetching commit data:", error);
updatedLink.innerText = "View history";
lastUpdatedElement.innerHTML = "";
lastUpdatedElement.appendChild(updatedLink);
});
};