A simple TicTacToe app with Golang backend and WebSockets gluing it all together.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>TicTacToe :: {{ .title }}</title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <link rel="stylesheet" type="text/css" media="screen" href="/static/main.css" />
  9. </head>
  10. <body>
  11. <div class=wrapper>
  12. <h1>TicTacToe</h1>
  13. <div id=opponent></div>
  14. <div id="message"></div>
  15. <div id=status></div>
  16. <div id=gameTable class="gameTable hide">
  17. <table>
  18. <tr>
  19. <td id=pos_0 class=tile>T</td>
  20. <td id=pos_1 class=tile>I</td>
  21. <td id=pos_2 class=tile>C</td>
  22. </tr>
  23. <tr>
  24. <td id=pos_3 class=tile>T</td>
  25. <td id=pos_4 class=tile>A</td>
  26. <td id=pos_5 class=tile>C</td>
  27. </tr>
  28. <tr>
  29. <td id=pos_6 class=tile>T</td>
  30. <td id=pos_7 class=tile>O</td>
  31. <td id=pos_8 class=tile>E</td>
  32. </tr>
  33. </table>
  34. </div>
  35. <div id="tally"></div>
  36. <div id=instructions>
  37. <p>Share this link with a friend to begin:</p>
  38. <div class=link>
  39. <div class=tooltip>
  40. <span class=tooltiptext id=tooltip>Copy</span>
  41. <input type=text id=shareLink onclick="ui.Copy(this)" onmouseout="ui.TooltipBlur()" readonly=readonly>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <script src="/static/bundle.js"></script>
  47. </body>
  48. </html>