const cards = [
{
image: "/public/images/vaultwarden.png",
name: "Vaultwarden",
description: "Unofficial Bitwarden compatible server.",
about: "https://github.com/dani-garcia/vaultwarden",
url: "https://vault.wah.su",
hasDarkMode: true,
},
{
image: "/public/images/nextcloud.png",
name: "Nextcloud",
description:
"productivity suite, offering file sharing and collaboration tools.",
about: "https://nextcloud.com/",
url: "https://cloud.wah.su",
hasDarkMode: false,
},
{
image: "/public/images/immich.png",
name: "Immich",
description: "platform for managing and browsing your photos.",
about: "https://immich.app",
url: "https://photos.wah.su",
hasDarkMode: false,
},
{
image: "/public/images/zipline.png",
name: "Zipline",
description: "image uploading with ShareX compatibility.",
about: "https://zipline.diced.sh/",
url: "https://x.wah.su",
hasDarkMode: false,
},
];
const services = document.getElementById("services");
function renderCards() {
const theme = localStorage.getItem("theme");
services.innerHTML = "";
for (let index = 0; index < cards.length; index++) {
const image_name = cards[index].image.split(".")[0];
const image_ext = cards[index].image.split(".")[1];
const image_url = `${image_name}${
cards[index].hasDarkMode ? `-${theme}` : ""
}.${image_ext}`;
const template = `