]> git.cworth.org Git - zombocom-ai/blob - index.html
Simple reword of "Numeric code" placeholder text
[zombocom-ai] / index.html
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6   <title>ZOMBO</title>
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">
11 </head>
12
13 <body>
14   <div id="content">
15
16     <div id="header" align="center">
17       <p>
18         <br>
19       </p>
20
21       <p>
22         <img src="/zombocom.png" alt="Zombocom" longdesc="http://zombo.com" width="1199" height="217">
23       </p>
24     </div>
25
26     <p>
27       Welcome to Zombocom. You can do anything at Zombcom, anything at
28       all. The only limit is yourself!
29     </p>
30
31     <p>
32       <form action="" id="zombo-form">
33         <div class="form-row large">
34           <label for="prompt">
35             What do you imagine?
36           </label>
37           <textarea id="prompt" rows="4" width="100%" autocomplete="off" required>
38           </textarea>
39         </div>
40
41         <div class="form-row small left">
42           <label for="code">
43             Numeric code
44           </label>
45           <input id="code" type="text" size="15" autocomplete="off" placeholder="(Leave blank for random)" />
46         </div>
47
48         <div class="form-row small right">
49           <button id="safety" class="right" type="button">Safety prompt</button>
50           <script>
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";
56                 return false;
57             })
58           </script>
59         </div>
60
61         <div class="form-row large">
62           <button id="generate" type="submit">Make the infinite possible</button>
63         </div>
64       </form>
65     </p>
66
67     <ul id="comments">
68     </ul>
69
70     <p>
71       <form action="" id="comment-form">
72         <input id="comment" type="text" style="width:100%" autocomplete="off" placeholder="Add a comment" />
73       </form>
74     </p>
75
76     <div align="center">
77       <div class="animate-flicker">
78         <p>
79           <img src="/pngwheel.png" class="rotate thefade">
80         </p>
81       </div>
82     </div>
83
84     <audio loop="" src="/zombo_words.mp3" type="audio/mpeg"></audio>
85     <button id="mute" class="fade volume">
86       <div>🔊</div>
87       <script>
88 const mute = document.querySelector("#mute");
89 const icon = document.querySelector("#mute > div");
90 const audio = document.querySelector("audio");
91
92 mute.addEventListener("click", () => {
93   if (audio.paused) {
94       audio.volume = 0.2;
95       audio.play();
96       icon.innerHTML = "🔈";
97   } else {
98       audio.pause();
99       icon.innerHTML = "🔊";
100   }
101   mute.classList.add("fade");
102 });
103       </script>
104
105     </button>
106
107   </div>
108
109   <script src="/socket.io/socket.io.js"></script>
110   <script>
111     var socket = io();
112
113     var comments = document.querySelector("#comments");
114     var form = document.querySelector("#comment-form");
115     var comment = document.querySelector("#comment");
116
117     form.addEventListener('submit', function(e) {
118         e.preventDefault();
119         if (comment.value) {
120             socket.emit('comment', comment.value);
121             comment.value = '';
122         }
123     });
124
125     socket.on('comment', function(msg) {
126         var item = document.createElement('li');
127         item.textContent = msg;
128         comments.appendChild(item);
129     });
130   </script>
131 </body>
132 </html>