temp / index.html
commit3r's picture
remove all the frills and there is no way to enter another peers id - Follow Up Deployment
c185c93 verified
raw
history blame
7.43 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RetroText Stream</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/peerjs@1.4.7/dist/peerjs.min.js"></script>
<style>
@font-face {
font-family: 'Chicago';
src: url('https://cdn.jsdelivr.net/gh/eliheuer/chicago@master/chicago.woff2') format('woff2');
}
body {
background: #C0C7C8 url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23a0a7a8' fill-opacity='0.2' fill-rule='evenodd'%3E%3Cpath d='M5 5h1v1H5V5zM0 0h1v1H0V0zm3 3h1v1H3V3z'/%3E%3C/g%3E%3C/svg%3E");
font-family: 'Chicago', 'SF Mono', monospace;
color: #000;
}
.mac-window {
border: 2px solid;
border-top-color: #fff;
border-left-color: #fff;
border-right-color: #808080;
border-bottom-color: #808080;
box-shadow: 2px 2px 0 #000;
}
.title-bar {
background: linear-gradient(to right, #000080, #1084d0);
color: white;
letter-spacing: 0.5px;
}
.btn {
border: 2px solid;
border-top-color: #fff;
border-left-color: #fff;
border-right-color: #808080;
border-bottom-color: #808080;
background: #c0c0c0;
box-shadow: inset -1px -1px 0 #000;
}
.btn:active {
border-top-color: #808080;
border-left-color: #808080;
border-right-color: #fff;
border-bottom-color: #fff;
box-shadow: inset 1px 1px 0 #000;
}
.message-box {
background: #fff;
border: 2px solid;
border-top-color: #808080;
border-left-color: #808080;
border-right-color: #fff;
border-bottom-color: #fff;
}
.status-bar {
background: #c0c0c0;
border-top: 2px solid #808080;
}
.scrollbar::-webkit-scrollbar {
width: 12px;
}
.scrollbar::-webkit-scrollbar-track {
background: #c0c0c0;
border-left: 2px solid #808080;
}
.scrollbar::-webkit-scrollbar-thumb {
background: #808080;
border: 2px solid #c0c0c0;
border-top-color: #fff;
border-left-color: #fff;
border-right-color: #000;
border-bottom-color: #000;
}
.terminal-text {
font-family: 'Chicago', monospace;
font-size: 14px;
line-height: 1.4;
color: #000;
}
.blink {
animation: blink 1s infinite;
}
@keyframes blink {
50% { opacity: 0; }
}
.peer-id {
background: #fff;
border: 1px solid #808080;
padding: 2px 4px;
font-size: 12px;
letter-spacing: 0.5px;
}
.input-field {
background: #fff;
border: 2px solid;
border-top-color: #000;
border-left-color: #000;
border-right-color: #fff;
border-bottom-color: #fff;
font-family: 'Chicago', monospace;
}
.input-field:focus {
outline: none;
border: 2px solid #000080;
}
</style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
<div class="mac-window w-full max-w-2xl">
<!-- Title Bar -->
<div class="title-bar flex items-center justify-between px-3 py-1">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-[#ff6057] mr-2"></div>
<div class="w-3 h-3 rounded-full bg-[#ffbd2e] mr-2"></div>
<div class="w-3 h-3 rounded-full bg-[#28c940] mr-2"></div>
<h1 class="text-sm font-bold">RetroText Stream</h1>
</div>
<div class="text-xs">WebRTC Text Broadcast</div>
</div>
<!-- Main Content -->
<div class="bg-[#c0c0c0] p-4">
<!-- Message Display -->
<div class="message-box mb-4 h-64 overflow-hidden">
<div id="message-container" class="terminal-text p-3 h-full overflow-y-auto scrollbar">
<div>> Simple Text Broadcast</div>
<div>> Type messages below</div>
</div>
</div>
<!-- Input Area -->
<div class="flex">
<input
type="text"
id="message-input"
class="input-field flex-grow px-3 py-2 mr-2"
placeholder="Type message here..."
disabled
>
<button id="send-btn" class="btn px-4 py-2 font-bold" disabled>Send</button>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const messageContainer = document.getElementById('message-container');
const messageInput = document.getElementById('message-input');
const sendBtn = document.getElementById('send-btn');
// Enable input immediately
messageInput.disabled = false;
sendBtn.disabled = false;
function appendMessage(message) {
const messageElement = document.createElement('div');
messageElement.textContent = message;
messageContainer.appendChild(messageElement);
messageContainer.scrollTop = messageContainer.scrollHeight;
}
sendBtn.addEventListener('click', () => {
const message = messageInput.value.trim();
if (message) {
appendMessage(`YOU> ${message}`);
messageInput.value = '';
}
});
messageInput.addEventListener('keypress', (e) => {
if (e.key === 'Enter') {
const message = messageInput.value.trim();
if (message) {
appendMessage(`YOU> ${message}`);
messageInput.value = '';
}
}
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=commit3r/temp" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>