Get the nethack page looking good again

Update all the CSS classes and fix the layout so it looks good in the new theme.
Convert a bunch of CSS classes to BEM style.
This commit is contained in:
Eryn Wells 2024-10-27 09:56:46 -06:00
parent 2b613de769
commit d5296995de
10 changed files with 206 additions and 45 deletions

View file

@ -3,7 +3,7 @@
{{ range $nethack_data }}
{{ $logfile = $logfile | append .logfile }}
{{ end }}
<ol class="logfile">
<ol class="nethack-logfile">
<li>
{{ partial "nethack/logentry.html" (index (sort $logfile "score" "desc") 0) }}
</li>

View file

@ -1,10 +1,9 @@
{{- $logfile := partial "nethack/log.html" . -}}
<ol class="logfile">
{{ range sort $logfile "end_date" "desc" }}
{{ if ne .death.cause "quit" }}
<li>
{{ partial "nethack/logentry.html" .}}
</li>
{{ end }}
{{- $logfile = where $logfile "death.cause" "ne" "quit" -}}
<ol class="nethack-logfile">
{{ range sort $logfile "end_date" "desc" -}}
<li class="nethack-logfile__entry">
{{ partial "nethack/logentry.html" .}}
</li>
{{ end }}
</ol>

View file

@ -1,7 +1,7 @@
{{- $n := .Get 0 -}}
{{- $logfile := partial "nethack/log.html" . -}}
<ol class="logfile topn">
<ol class="nethack-logfile nethack-topn">
{{ range first $n (sort $logfile "score" "desc") -}}
<li>{{ partial "nethack/logentry.html" . }}</li>
<li class="nethack-logentry">{{ partial "nethack/logentry.html" . }}</li>
{{- end }}
</ol>