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 Zombcom, 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>
41 <div class="form-row small left">
45 <input id="code" type="text" autocomplete="off" placeholder="(Leave blank for random)" />
48 <div class="form-row small right">
49 <button id="safety" class="right" type="button">Safety prompt</button>
51 const prompt = document.querySelector("#prompt");
52 const safety= document.querySelector("#safety");
53 // TODO: Dynamically generate many different prompts here
54 safety.addEventListener("click", () => {
55 prompt.value = "Matte painting of a Samurai warrior";
61 <div class="form-row large">
62 <button id="generate" type="submit">Make the infinite possible</button>
71 <form action="" id="comment-form">
72 <input id="comment" type="text" style="width:100%" autocomplete="off" placeholder="Add a comment" />
77 <div class="animate-flicker">
79 <img src="/pngwheel.png" class="rotate thefade">
84 <audio loop="" src="/zombo_words.mp3" type="audio/mpeg"></audio>
85 <button id="mute" class="fade volume">
88 const mute = document.querySelector("#mute");
89 const icon = document.querySelector("#mute > div");
90 const audio = document.querySelector("audio");
92 mute.addEventListener("click", () => {
96 icon.innerHTML = "🔈";
99 icon.innerHTML = "🔊";
101 mute.classList.add("fade");
109 <script src="/socket.io/socket.io.js"></script>
113 var comments = document.querySelector("#comments");
114 var form = document.querySelector("#comment-form");
115 var comment = document.querySelector("#comment");
117 form.addEventListener('submit', function(e) {
120 socket.emit('comment', comment.value);
125 socket.on('comment', function(msg) {
126 var item = document.createElement('li');
127 item.textContent = msg;
128 comments.appendChild(item);