5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7 <link href="/zombo.css" rel="stylesheet" type="text/css">
8 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
9 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
10 <meta name="HandheldFriendly" content="true">
16 <div id="header" align="center">
22 <img src="/zombocom.png" alt="Zombocom" longdesc="http://zombo.com" width="1199" height="217">
27 Welcome to Zombocom. You can do anything at Zombocom, anything at
28 all. The only limit is yourself!
32 <form action="" id="zombo-form">
33 <div class="form-row large">
37 <textarea id="prompt" rows="4" width="100%" autocomplete="off" required></textarea>
40 <div class="form-row small left">
41 <div class="labeled-row">
45 <input id="code" type="text" autocomplete="off" placeholder="(Leave blank for random)" />
49 <div class="form-row small right">
50 <button id="safety" class="right" type="button">Safety prompt</button>
53 <div class="form-row large">
54 <button id="generate" type="submit">Make the infinite possible</button>
63 <form action="" id="comment-form">
64 <input id="comment" type="text" style="width:100%" autocomplete="off" placeholder="Add a comment" />
69 <div class="animate-flicker">
71 <img src="/pngwheel.png" class="rotate thefade">
76 <audio loop="" src="/zombo_words.mp3" type="audio/mpeg"></audio>
77 <button id="mute" class="fade volume">
80 const mute = document.querySelector("#mute");
81 const icon = document.querySelector("#mute > div");
82 const audio = document.querySelector("audio");
84 mute.addEventListener("click", () => {
88 icon.innerHTML = "🔈";
91 icon.innerHTML = "🔊";
93 mute.classList.add("fade");
101 <script src="/socket.io/socket.io.js"></script>
105 const comments = document.querySelector("#comments");
106 const comment_form = document.querySelector("#comment-form");
107 const comment = document.querySelector("#comment");
109 const zombo_form = document.querySelector("#zombo-form");
110 const prompt = document.querySelector("#prompt");
111 const code = document.querySelector("#code");
113 const safety= document.querySelector("#safety");
115 comment_form.addEventListener('submit', function(e) {
118 socket.emit('comment', comment.value);
123 socket.on('comment', function(msg) {
124 var item = document.createElement('li');
125 item.textContent = msg;
126 comments.appendChild(item);
129 zombo_form.addEventListener('submit', function(e) {
131 socket.emit('generate', {"prompt": prompt.value, "code": code.value});
135 // TODO: Dynamically generate many different prompts here
136 safety.addEventListener("click", () => {
137 prompt.value = "Matte painting of a Samurai warrior";