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.
 
 
 

50 lines
1.6 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TicTacToe :: {{ .title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="/static/main.css" />
</head>
<body>
<div class=wrapper>
<h1>TicTacToe</h1>
<div id=opponent></div>
<div id="message"></div>
<div id=status></div>
<div id=gameTable class="gameTable hide">
<table>
<tr>
<td id=pos_0 class=tile>T</td>
<td id=pos_1 class=tile>I</td>
<td id=pos_2 class=tile>C</td>
</tr>
<tr>
<td id=pos_3 class=tile>T</td>
<td id=pos_4 class=tile>A</td>
<td id=pos_5 class=tile>C</td>
</tr>
<tr>
<td id=pos_6 class=tile>T</td>
<td id=pos_7 class=tile>O</td>
<td id=pos_8 class=tile>E</td>
</tr>
</table>
</div>
<div id="tally"></div>
<div id=instructions>
<p>Share this link with a friend to begin:</p>
<div class=link>
<div class=tooltip>
<span class=tooltiptext id=tooltip>Copy</span>
<input type=text id=shareLink onclick="ui.Copy(this)" onmouseout="ui.TooltipBlur()" readonly=readonly>
</div>
</div>
</div>
</div>
<script src="/static/bundle.js"></script>
</body>
</html>