Move the nethack templates into nethack/ subdirectories of partial and shortcodes
This commit is contained in:
parent
d1dfea9f97
commit
7f470262ec
4 changed files with 28 additions and 36 deletions
|
@ -1,12 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<article class="post-single">
|
||||
<header>
|
||||
<div class="post-title">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</article>
|
||||
{{ end }}
|
18
layouts/partials/nethack/logentry.html
Normal file
18
layouts/partials/nethack/logentry.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ $level := (cond (gt .dungeon.level.n 0) (.dungeon.level.descriptive | lower) .dungeon.level.descriptive) }}
|
||||
<div>{{ if .death.cause }}🪦{{ end }}</div>
|
||||
<h4 class="date">{{ time.Format "January 2, 2006" .end_date }}</h4>
|
||||
<div class="character-descriptor">{{ .character.abbreviated }}</div>
|
||||
<p>{{ .character.name }}, a {{ .character.alignment.descriptive | lower }} {{ .character.race.descriptive | lower }}
|
||||
{{ .character.gender.descriptive | lower }} {{ .character.role.descriptive }},
|
||||
died {{ if gt .death.count 1 }}for the last time{{ end }} in <span class="nobreak">{{ .dungeon.name }}</span>
|
||||
on <span class="nobreak">{{ $level }}</span>.
|
||||
She was {{ .death.cause }}.</p>
|
||||
<table class="stats">
|
||||
<tr>
|
||||
<td class="began">Began {{ time.Format "January 2, 2006" .start_date }}</td>
|
||||
<td class="score">{{ .score }} points</td>
|
||||
<td class="level">Level {{ .character.max_level }}</td>
|
||||
<td class="hp">{{ cond (gt .character.hp.n 0) (printf "%s / %s" .character.hp.n .character.hp.max)
|
||||
.character.hp.max }} hp</td>
|
||||
</tr>
|
||||
</table>
|
10
layouts/shortcodes/nethack/logfile.html
Normal file
10
layouts/shortcodes/nethack/logfile.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ $nethack_logfile := $.Site.Data.nethack.logfile.nutmeg }}
|
||||
<ol class="logfile">
|
||||
{{ range sort $nethack_logfile "end_date" "desc" }}
|
||||
{{ if ne .death.cause "quit" }}
|
||||
<li class="logentry">
|
||||
{{ partial "nethack/logentry.html" .}}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ol>
|
|
@ -1,24 +0,0 @@
|
|||
{{ $nethack_logfile := $.Site.Data.nethack.logfile.nutmeg }}
|
||||
<ol class="logfile">
|
||||
{{ range sort $nethack_logfile "end_date" "desc" }}
|
||||
{{ if ne .death.cause "quit" }}
|
||||
<li class="logentry">
|
||||
<div>{{ if .death.cause }}🪦{{ end }}</div>
|
||||
<h4 class="date">{{ time.Format "January 2, 2006" .end_date }}</h4>
|
||||
<div class="character-descriptor">{{ .character.abbreviated }}</div>
|
||||
<p>{{ .character.name }}, a {{ .character.alignment.descriptive | lower }} {{ .character.race.descriptive | lower }} {{ .character.gender.descriptive | lower }} {{ .character.role.descriptive }},
|
||||
died {{ if gt .death.count 1 }}for the last time{{ end }} in <span class="nobreak">{{ .dungeon.name }}</span>
|
||||
on <span class="nobreak">{{ cond (gt .dungeon.level.n 0) (.dungeon.level.descriptive | lower) .dungeon.level.descriptive }}</span>.
|
||||
She was {{ .death.cause }}.</p>
|
||||
<table class="stats">
|
||||
<tr>
|
||||
<td class="began">Began {{ time.Format "January 2, 2006" .start_date }}</td>
|
||||
<td class="score">{{ .score }} points</td>
|
||||
<td class="level">Level {{ .character.max_level }}</td>
|
||||
<td class="hp">{{ cond (gt .character.hp.n 0) (printf "%s / %s" .character.hp.n .character.hp.max) .character.hp.max }} hp</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ol>
|
Loading…
Add table
Add a link
Reference in a new issue