Files
home-lab/NginxReverseProxy/default.html
T
2026-03-04 14:50:57 +00:00

280 lines
10 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lingen Navigator</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');
body {
font-family: 'Poppins', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background: linear-gradient(to right, #2F0743, #41295a);
color: #FFF;
}
h1 {
font-size: 2rem;
font-weight: bold;
margin: 3rem 0;
text-align: center;
position: relative;
color: #FFF;
text-transform: uppercase;
letter-spacing: 2px;
}
h1:after {
content: "";
position: absolute;
left: 50%;
bottom: -10px;
transform: translateX(-50%);
width: 100px;
height: 4px;
background: linear-gradient(to right, #735fb4, #3a8f78);
border-radius: 10px;
}
h1:hover {
text-shadow: 0 0 10px #FFF, 0 0 20px #735fb4, 0 0 30px #735fb4;
}
.button-container {
display: flex;
flex-wrap: wrap;
gap: 5px;
max-width: 800px;
justify-content: center;
}
.tooltip-container {
position: relative;
display: inline-block;
}
.tooltip-container .tooltip-text {
visibility: hidden;
background: linear-gradient(to right, #591c60, #5b3ab8);
color: #fff;
text-align: center;
padding: 8px;
border-radius: 5px;
position: absolute;
bottom: 125%;
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: opacity 0.3s ease;
font-size: 14px;
font-weight: 500;
z-index: 10;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
}
.tooltip-container .tooltip-text::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-width: 5px;
border-style: solid;
border-color: #5b3ab8 transparent transparent transparent;
}
.tooltip-container:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.link-button {
display: flex;
align-items: center;
padding: 15px 20px;
border: none;
border-radius: 30px;
background: linear-gradient(to right, #591c60, #5b3ab8);
color: #FFF;
font-size: 16px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
text-align: center;
transition: all 0.4s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.link-button i {
font-size: 20px;
color: #fff;
margin-right: 10px;
}
.link-button:hover {
background: linear-gradient(to right, #5b3ab8, #17544d);
transform: scale(1.05);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}
.link-button:hover i {
color: #ffcc00;
}
.link-button.inactive {
background: #555;
cursor: not-allowed;
color: #aaa;
box-shadow: none;
}
.link-button.inactive i {
color: #aaa;
}
.code-container {
position: relative;
background-color: #21252b;
color: #abb2bf;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
padding: 20px;
font-family: 'Courier New', Courier, monospace;
font-size: 14px;
width: 90%;
max-width: 800px;
overflow-x: auto;
margin-top: 20px;
}
.code-container pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}
.copy-button {
position: absolute;
top: 10px;
right: 10px;
background-color: #735fb4;
color: #FFF;
border: none;
border-radius: 5px;
padding: 5px 10px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.copy-button:hover {
background-color: #3a8f78;
}
@media (max-width: 768px) {
.link-button {
font-size: 14px;
padding: 10px 20px;
}
h1 {
font-size: 1.5rem;
}
.tooltip-container .tooltip-text {
width: 150px;
}
}
</style>
</head>
<body>
<h1>Lingen Services</h1>
<div class="button-container"></div>
<h1>Lingen Hosts</h1>
<div class="code-container">
<button class="copy-button">Copy</button>
<pre></pre>
</div>
<script>
const sites = [
{ ipAddress: "192.168.40.5", port: "8096", name: "JellyFin", description: "Stream media", site: "jellyfin", icon: "fa-solid fa-film" },
{ ipAddress: "192.168.40.5", port: "5055", name: "JellySeerr", description: "Request and find media", site: "jellyseerr", icon: "fa-solid fa-search" },
{ ipAddress: "192.168.40.5", port: "8989", name: "Sonarr", description: "TV Arr", site: "sonarr", icon: "fa-solid fa-tv" },
{ ipAddress: "192.168.40.5", port: "7878", name: "Radarr", description: "Movies Arr", site: "radarr", icon: "fa-solid fa-video" },
{ ipAddress: "192.168.40.5", port: "9696", name: "Prowlarr", description: "Torrent indexers", site: "prowlarr", icon: "fa-solid fa-cloud-download-alt" },
{ ipAddress: "192.168.40.5", port: "13378", name: "Audio books", description: "Audio book service", site: "books", icon: "fa-solid fa-book" },
{ ipAddress: "192.168.40.5", port: "5212", name: "Cloud Drive", description: "Google Drive alternative", site: "cloud", icon: "fa-solid fa-cloud" },
{ ipAddress: "192.168.40.5", port: "3000", name: "DockHand", description: "Docker monitoring", site: "monitor", icon: "fa-brands fa-docker" },
{ ipAddress: "192.168.40.5", port: "3001", name: "Gittea", description: "Git service", site: "git", icon: "fa-solid fa-code-branch" },
{ ipAddress: "192.168.40.5", port: "81", name: "Nginx Reverse Proxy", description: "Provide site routing", site: "nginx", icon: "fa-solid fa-network-wired" },
{ ipAddress: "192.168.40.5", port: "8080", name: "QBit Torrent", description: "Torrent client", site: "torrent", icon: "fa-solid fa-download" },
{ ipAddress: "192.168.40.5", port: "7676", name: "PruneMate", description: "Clean up Docker data", site: "prune", icon: "fa-solid fa-trash" },
{ ipAddress: "192.168.40.5", port: "60072", name: "Scanopy", description: "Scan and organize your network", site: "scan", icon: "fa-solid fa-satellite-dish" },
{ ipAddress: "192.168.40.5", scheme: 'https://', port: "8443", name: "Minecraft", description: "Crafty Minecraft server admin", site: "minecraft", icon: "fa-solid fa-cubes" },
{ ipAddress: "192.168.40.5", port: "8081", name: "IT Tools", description: "Collection of tools for IT Dev", site: "tools", icon: "fa-solid fa-tools" }
];
const buttonContainer = document.querySelector(".button-container");
const codeContainerPre = document.querySelector(".code-container pre");
const domain = "lingen";
async function checkServiceStatus(url) {
try {
const response = await fetch(url, { method: "HEAD", mode: "no-cors" });
return true;
} catch (error) {
return false;
}
}
sites.forEach(async (site) => {
const tooltipContainer = document.createElement("div");
tooltipContainer.className = "tooltip-container";
const link = document.createElement("a");
const defaultScheme = "http://";
let scheme = site.scheme || defaultScheme;
const url = `${scheme}${site.ipAddress}:${site.port}`;
link.href = url;
link.target = "_blank";
link.className = "link-button";
link.innerHTML = `<i class="${site.icon}"></i>${site.name}`;
const tooltip = document.createElement("div");
tooltip.className = "tooltip-text";
tooltip.textContent = site.description;
tooltipContainer.appendChild(link);
tooltipContainer.appendChild(tooltip);
buttonContainer.appendChild(tooltipContainer);
codeContainerPre.textContent += `${site.ipAddress} ${site.site}.${domain}\n`;
const isActive = await checkServiceStatus(url);
if (!isActive) {
link.classList.add("inactive");
link.removeAttribute("href");
}
});
const copyButton = document.querySelector(".copy-button");
copyButton.addEventListener("click", () => {
const codeText = codeContainerPre.textContent;
navigator.clipboard.writeText(codeText).then(() => {
copyButton.textContent = "Copied!";
setTimeout(() => (copyButton.textContent = "Copy"), 2000);
}).catch(() => {
copyButton.textContent = "Error!";
setTimeout(() => (copyButton.textContent = "Copy"), 2000);
});
});
</script>
</body>
</html>