Spaces:
Running

File size: 4,809 Bytes
57302cf
3ed011e
 
 
 
 
c8d47af
3ed011e
 
 
 
 
 
 
 
c8d47af
3ed011e
 
 
 
 
 
 
 
c8d47af
3ed011e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57302cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <meta name="color-scheme" content="dark">
  <title>oops</title>
  <link rel="stylesheet" href="/rooms.css">
  <script src="/clip-store.js" defer></script>
  <script src="/vendor/itty-sockets.js" defer></script>
  <script src="/peer-rooms.js" defer></script>
  <script src="/rooms.js" defer></script>
</head>
<body>
  <header class="site-head">
    <a class="wordmark" href="/rooms.html">oops</a>
    <a href="/classic.html">Play on one screen</a>
  </header>
  <main>
    <p id="connection" class="notice" role="status" hidden></p>
    <p id="error" class="notice error" role="alert" hidden></p>

    <section id="landing" class="entry" hidden aria-labelledby="landing-title">
      <div>
        <h1 id="landing-title"><em>oops</em></h1>
        <p class="intro">Watch the robot. Guess what goes wrong next. Each player votes on their own device.</p>
        <div class="entry-actions">
          <button type="button" id="create-room" class="primary">Host a room</button>
          <form id="find-form">
            <label for="room-code">Have a room code?</label>
            <div class="input-row">
              <input id="room-code" name="room" type="text" maxlength="16" required autocapitalize="characters" autocomplete="off" spellcheck="false" placeholder="Room code">
              <button id="find-room" type="submit">Join room</button>
            </div>
          </form>
        </div>
      </div>
      <figure id="hero" class="hero" hidden>
        <img id="hero-image" alt="A robot approaching the dishes">
        <figcaption>“It worked in sim”</figcaption>
      </figure>
    </section>

    <section id="join" class="narrow" hidden aria-labelledby="join-title">
      <p class="eyebrow">Room <span id="join-code"></span></p>
      <h1 id="join-title">Join the <em>game.</em></h1>
      <form id="join-form">
        <label for="player-name">Your name on the scoreboard</label>
        <div class="input-row">
          <input id="player-name" name="name" maxlength="40" required autocomplete="nickname" placeholder="Your name">
          <button type="submit" id="join-room" class="primary">Join room</button>
        </div>
      </form>
      <a class="under-link" href="/rooms.html">Use a different room</a>
    </section>

    <section id="room" hidden aria-labelledby="round-title">
      <div class="room-heading">
        <div>
          <p class="eyebrow" id="round-label"></p>
          <h1 id="round-title"></h1>
        </div>
        <div class="room-meta"><span id="identity"></span><span class="code">Room <b id="room-pin"></b></span></div>
      </div>
      <section id="invite" class="invite" hidden aria-label="Invite players">
        <div><label for="invite-url">Player invite link</label>
          <div class="input-row"><input id="invite-url" readonly><button id="copy-invite" type="button">Copy link</button></div>
          <p id="copy-status" role="status"></p>
          <p id="host-online" class="description" hidden>Keep this host tab open while players vote. Reopen the host link in this browser to resume.</p>
        </div>
        <a id="player-tab" target="_blank" rel="noopener">Join as a player ↗</a>
      </section>
      <div class="game-grid">
        <div id="media" hidden>
          <div class="stage"><video id="clip" controls playsinline muted preload="auto" aria-label="Round clip"></video></div>
          <div id="media-notice" role="status" hidden><span id="media-status"></span> <button type="button" id="retry-media" hidden>Retry clip</button></div>
          <p id="task" class="intro"></p>
          <p class="credit"><a id="source" target="_blank" rel="noopener noreferrer"></a> <span id="source-credit"></span></p>
        </div>
        <div class="play-panel">
          <h2 id="phase-title" aria-live="polite"></h2>
          <p id="phase-copy" class="description"></p>
          <p id="question"></p>
          <div id="choices" role="group" aria-label="Prediction choices"></div>
          <p id="vote-status" role="status" hidden></p>
          <div id="result" hidden><p class="eyebrow">Correct answer</p><p id="correct-answer"></p></div>
          <p id="vote-count" class="tally" hidden></p>
          <button id="advance" class="primary advance" type="button" hidden></button>
          <a id="new-game" class="under-link" href="/rooms.html" hidden>Back to live rooms</a>
        </div>
      </div>
      <section class="scoreboard" aria-labelledby="score-title">
        <h2 id="score-title">Scoreboard</h2>
        <p id="no-players" class="description">Waiting for the first player.</p>
        <ol id="scores"></ol>
      </section>
    </section>
  </main>
</body>
</html>