stacks/homelab/index.html

152 lines
4.2 KiB
HTML
Raw Normal View History

2022-09-04 08:37:29 -06:00
<!DOCTYPE html>
<html>
<head>
2022-09-07 17:00:07 -06:00
<title>Deer Grove</title>
2022-10-16 23:11:59 -06:00
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/landing-page/deergrove.png">
2022-10-12 17:45:23 -06:00
<style>
body {
2022-10-16 23:11:59 -06:00
display: flex;
flex-flow: column;
height: 100vh;
margin: 0;
font-family: Helvetica, sans-serif;
background-color: #222;
color: white;
2022-10-12 17:45:23 -06:00
}
2022-10-16 23:11:59 -06:00
nav {
overflow-x: scroll;
font-weight: bold;
font-size: 12pt;
display: flex;
}
nav img {
max-height: 2em;
}
nav a {
padding: 0.5em 1.5em;
color: #aaa;
text-decoration: none;
white-space: nowrap;
}
nav a:hover {
background: #555;
}
nav a.active {
background: #8b8;
color: black;
}
iframe {
flex-grow: 1;
border: none;
}
.icons {
margin: auto 2em;
2022-10-12 17:45:23 -06:00
}
2022-10-16 23:11:59 -06:00
.icons {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 40em;
margin: auto;
gap: 20px;
2022-10-12 17:45:23 -06:00
}
2022-10-16 23:11:59 -06:00
.icons a {
background-color: #444;
color: #fff;
width: 120px;
height: 120px;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
}
.icons a img {
max-width: 66%;
max-height: 66%;
width: 100%;
height: 100%;
image-rendering: pixelated;
2022-10-12 17:45:23 -06:00
}
</style>
2022-10-16 23:11:59 -06:00
<script type="module">
function activate(event, element) {
if (element.target) {
return
}
let parent = element.parentElement
for (let e of parent.getElementsByClassName("active")) {
e.classList.remove("active")
}
element.classList.add("active")
2022-09-04 08:37:29 -06:00
2022-10-16 23:11:59 -06:00
let iframe = document.querySelector("iframe")
iframe.src = element.href
2022-10-12 17:45:23 -06:00
2022-10-16 23:11:59 -06:00
event.preventDefault()
}
function init() {
let doc = document.querySelector("iframe").contentDocument
for (let l of document.head.querySelectorAll("style")) {
doc.head.appendChild(l.cloneNode(true))
}
let icons = doc.body.appendChild(doc.createElement("section"))
icons.classList.add("icons")
for (let link of document.querySelectorAll("nav a")) {
let dlink = icons.appendChild(link.cloneNode(true))
dlink.textContent = ""
if (link.dataset.icon) {
let icon = dlink.appendChild(doc.createElement("img"))
icon.src = link.dataset.icon
icon.style.objectFit = "cover"
} else {
let text = dlink.appendChild(doc.createElement("div"))
text.textContent = link.textContent
}
2022-10-12 22:05:20 -06:00
2022-10-16 23:11:59 -06:00
// Make both of them update the selected tab
link.addEventListener("click", event => activate(event, link))
dlink.addEventListener("click", event => activate(event, link))
}
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", init)
} else {
init()
}
</script>
</head>
<body>
<nav>
<img src="/landing-page/deergrove.png">
<a href="/sonarr/" data-icon="/sonarr/Content/Images/logo.svg" title="Episode manager">Shows</a>
<a href="/radarr/" data-icon="/radarr/Content/Images/logo.svg" title="Movie manager">Movies</a>
<a href="/lidarr/" data-icon="/lidarr/Content/Images/logo.svg" title="Music manager">Music</a>
<a href="/readarr/" data-icon="/readarr/Content/Images/logo.svg" title="Book manager">Books</a>
<a href="/sucker/" data-icon="/landing-page/cd-dvd.svg" title="Media Sucker">Sucker</a>
<hr>
<a href="/prowlarr/" data-icon="/prowlarr/Content/Images/logo.png" title="Indexer/Searcher">Search</a>
<a href="/nzbget/" data-icon="/landing-page/nzbget.png" title="Usenet downloader">Usenet</a>
<a href="/transmission/web/" data-icon="/transmission/web/style/transmission/images/logo.png" title="BitTorrent downloader">BitTorrent</a>
<hr>
<a href="/octoprint/" data-icon="/octoprint/static/img/logo.png" title="3D Printer Front-End">Octoprint</a>
<a href="/wallart/" data-icon="/wallart/wallart.png" title="Wall Art uploader">Wall Art</a>
<hr>
<a href="https://git.woozle.org" target="_blank" data-icon="https://git.woozle.org/assets/img/logo.svg" title="Git repositories">Git</a>
<a href="https://drive.woozle.org/" target="_blank" data-icon="/landing-page/cloud-folder.png" titled="Shared storage">Drive</a>
<a href="https://ancestry.woozle.org/" target="_blank" data-icon="https://ancestry.woozle.org/images/favicon_gwd.png" title="Genealogy">Ancestry</a>
</nav>
<iframe></iframe>
2022-09-04 08:37:29 -06:00
</body>
</html>