Files
THOS-Server/internet.html

51 lines
1.6 KiB
HTML
Raw Normal View History

2025-06-05 08:52:31 +02:00
<!-- Temporarily closing this site down, since the inner IFrame is shown at max 150px somehow, I tried everything, this is annoying -->
<!DOCTYPE html>
<html lang="en" class="bg-[#0d0d0d] text-white">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>THOS Search</title>
<script src="tailwind.es"></script>
<style>
.window-content {
width: 100%;
height: calc(100% - 32px);
border: none;
}
</style>
</head>
<body class="flex flex-col min-h-screen bg-gradient-to-br from-pink-500/10 via-blue-500/10 to-orange-500/10">
<div class="flex items-center gap-2 p-3 bg-white/5 backdrop-blur-md rounded-b-2xl shadow-md mx-4 mt-4">
<input id="urlBar" type="text" placeholder="Search THOS..."
class="flex-1 px-4 py-2 rounded-xl bg-white/10 text-white placeholder-gray-400 text-sm focus:ring-2 ring-pink-500" />
<button id="goBtn" class="ml-2 px-4 py-2 bg-white/10 hover:bg-white/20 rounded-xl text-sm">Search</button>
</div>
<div class="window-content">
<iframe id="searchFrame" src="https://surillya.com/thos/search/thossearch.html" class="window-content"></iframe>
</div>
<script>
const urlBar = document.getElementById("urlBar");
const goBtn = document.getElementById("goBtn");
const iframe = document.getElementById("searchFrame");
function sendSearchQuery(query) {
iframe.contentWindow.postMessage({ type: "search", query }, "*");
}
goBtn.onclick = () => sendSearchQuery(urlBar.value);
urlBar.addEventListener("keydown", e => {
if (e.key === "Enter") sendSearchQuery(urlBar.value);
});
</script>
</body>
</html>