Move a bunch of shortcodes and partials back from the platters theme
This commit is contained in:
parent
20d53e0df2
commit
3102dc1e56
29 changed files with 1 additions and 1 deletions
3
layouts/shortcodes/nethack/ascensions.html
Normal file
3
layouts/shortcodes/nethack/ascensions.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{- $logfile := partial "nethack/log.html" . -}}
|
||||
{{- $numberOfAscensions := where $logfile "death.cause" "ascended" | len -}}
|
||||
{{- $numberOfAscensions | lang.FormatNumber 0 -}}
|
10
layouts/shortcodes/nethack/best_game.html
Normal file
10
layouts/shortcodes/nethack/best_game.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ $nethack_data := $.Site.Data.nethack.logfile }}
|
||||
{{ $logfile := slice }}
|
||||
{{ range $nethack_data }}
|
||||
{{ $logfile = $logfile | append .logfile }}
|
||||
{{ end }}
|
||||
<ol class="logfile">
|
||||
<li>
|
||||
{{ partial "nethack/logentry.html" (index (sort $logfile "score" "desc") 0) }}
|
||||
</li>
|
||||
</ol>
|
10
layouts/shortcodes/nethack/logfile.html
Normal file
10
layouts/shortcodes/nethack/logfile.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{- $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 }}
|
||||
{{ end }}
|
||||
</ol>
|
2
layouts/shortcodes/nethack/n.html
Normal file
2
layouts/shortcodes/nethack/n.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- $numberOfEntries := (partial "nethack/log.html" .) | len -}}
|
||||
{{- $numberOfEntries | lang.FormatNumber 0 -}}
|
7
layouts/shortcodes/nethack/topn.html
Normal file
7
layouts/shortcodes/nethack/topn.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{- $n := .Get 0 -}}
|
||||
{{- $logfile := partial "nethack/log.html" . -}}
|
||||
<ol class="logfile topn">
|
||||
{{ range first $n (sort $logfile "score" "desc") -}}
|
||||
<li>{{ partial "nethack/logentry.html" . }}</li>
|
||||
{{- end }}
|
||||
</ol>
|
Loading…
Add table
Add a link
Reference in a new issue