flightlesssomething/templates/user.tmpl
2024-07-04 23:29:32 +03:00

38 lines
1.5 KiB
Cheetah

{{template "header.tmpl" .}}
<h2>Benchmarks by {{ .user.Username }}</h2>
<p><small>Benchmarks found: {{ .benchmarksTotal }}</small></p>
<div class="list-group mt-1">
{{- range .benchmarks -}}
<a href="/benchmark/{{ .ID }}" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1 text-truncate">{{ .Title }}</h5>
<small class="text-nowrap">{{ .CreatedAtHumanized }}</small>
</div>
<div class="d-flex w-100 justify-content-between">
<p class="mb-1 text-truncate"><small>{{ .Description }}</small></p>
<small class="text-nowrap">By <b>{{ $.user.Username }}</b></small>
</div>
</a>
{{- end -}}
</div>
<div class="d-flex justify-content-center mt-2">
<ul class="pagination">
<li class="page-item {{if le .page 1}}disabled{{end}}">
<a class="page-link" href="{{if gt .page 1}}/benchmarks?page={{ .prevPage }}&query={{ .query }}{{else}}#{{end}}">Previous</a>
</li>
<li class="page-item disabled">
<a class="page-link" href="/benchmarks?page={{ .page }}&query={{ .query }}">{{ .page }}</a>
</li>
<li class="page-item {{if ge .page .totalPages}}disabled{{end}}">
<a class="page-link" href="{{if lt .page .totalPages}}/benchmarks?page={{ .nextPage }}&query={{ .query }}{{else}}#{{end}}">Next</a>
</li>
</ul>
</div>
{{template "footer.tmpl" .}}