Files
qrank/templates/user.html
Jonas Hahn 4b4377a24e Refactor project structure and update configurations. Now first working version
- 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.
2025-08-24 12:08:14 +02:00

17 lines
567 B
HTML

{{define "content"}}
<div class="card">
<h2>@{{.Viewed.Username}}</h2>
<p class="small">Joined {{fmtTime .Viewed.CreatedAt}}</p>
<p>Game score {{.Stats.Games}}/{{.Stats.Wins}}/{{.Stats.Losses}}</p>
{{if .Own}}
<hr>
<h3>Update your profile</h3>
<form method="POST" action="/me">
<label class="label">Username</label>
<input class="input" name="username" value="{{.Viewed.Username}}" required>
<div style="height:8px"></div>
<button class="btn btn-primary">Save</button>
</form>
{{end}}
</div>
{{end}}