- Updated `.air.conf` for Nix compatibility and simplified build commands. - Enhanced `.gitignore` to include `tmp` directory. - Improved `README.md` with clearer instructions and added language details. - Refined CSS styles for better UI consistency and added alert styles. - Upgraded `flake.nix` to use Go 1.24 and improved shell environment setup. - Modified authentication logic in `auth.go` for better user handling. - Updated `main.go` to dynamically set the listening port and improved logging. - Added new `routes.go` file for handling game entry and history. - Enhanced user models and added statistics tracking in `models.go`. - Improved template rendering and added user feedback messages in HTML templates. - Removed obsolete build error logs and binaries.
21 lines
764 B
HTML
21 lines
764 B
HTML
{{define "content"}}
|
|
<div class="card">
|
|
<h2>Global history</h2>
|
|
<ul class="list">
|
|
{{range .Games}}
|
|
<li>
|
|
<div class="small">{{fmtTime .CreatedAt}}</div>
|
|
<div>
|
|
{{if .Table}}<span class="badge">{{.Table.Name}}</span> {{end}}
|
|
{{if .WinnerIsA}}{{range .PlayersA}}{{.Username}} {{end}}{{.ScoreA}}/{{.ScoreB}}{{else}}{{range .PlayersB}}{{.Username}} {{end}}{{.ScoreB}}/{{.ScoreA}}{{end}}
|
|
</div>
|
|
<div class="small">
|
|
{{range .PlayersA}}@{{.Username}} {{end}}vs {{range .PlayersB}}@{{.Username}} {{end}}
|
|
</div>
|
|
</li>
|
|
{{else}}
|
|
<li class="small">No games yet. Be the first!</li>
|
|
{{end}}
|
|
</ul>
|
|
</div>
|
|
{{end}} |