{{define "head"}}
    <style>
        .main-content {
            margin: 20px;
            width: 450px;
            display: grid;
            grid-template-columns: 150px 150px 150px;
            grid-template-rows: 150px 150px 150px; 
            column-gap: 0;
            row-gap: 0;
            background-color: #eeb;
        }

        .tt-item {
            display: inline-block;
            width: 150px;
            height: 150px;
        }

        .bb { border-bottom: 5px solid #333; }
        .bt { border-top: 5px solid #333; }
        .bl { border-left: 5px solid #333; }
        .br { border-right: 5px solid #333; }

        .cross { background-image: url('/cross.png'); }
        .nought { background-image: url('/nought.png'); }

        .line.cross {
            background-color: #f88;
            border: 2px solid #f33;
        }
        
        .line.nought {
            background-color: #aaf;
            border: 2px solid #33f;
        }
        
    </style>
{{end}}


{{define "content"}}
<div class="main-content">
    {{ $Game := .game }}
    {{ $GameFlow := .gameFlow }}
    {{ range .fields }}
        {{ if call $.disabled $Game . }}
            <span class="{{ call $.fieldClass $Game . }}"></span>
        {{ else }}
            <a class="{{ call $.fieldClass $Game . }}" href="{{ $GameFlow -}}{{- . }}"></a>
        {{ end }}
    {{ end }}
</div>

<b>Game:</b> {{.gameFlow}}
{{end}}