Chronological nethack logfile page
This commit is contained in:
parent
a279e4bb11
commit
d1dfea9f97
3 changed files with 85 additions and 54 deletions
|
@ -3,6 +3,7 @@ title: "Nethack"
|
||||||
description: In which I play way too much of a silly command line Rogue-like game.
|
description: In which I play way too much of a silly command line Rogue-like game.
|
||||||
date: 2022-04-13T08:43:46-07:00
|
date: 2022-04-13T08:43:46-07:00
|
||||||
draft: true
|
draft: true
|
||||||
|
type: simple
|
||||||
---
|
---
|
||||||
|
|
||||||
Herein is a chronological accounting of my descents into the Dungeons of Doom.
|
Herein is a chronological accounting of my descents into the Dungeons of Doom.
|
||||||
|
|
|
@ -1,32 +1,81 @@
|
||||||
/* Eryn Wells <eryn@erynwells.me> */
|
/* Eryn Wells <eryn@erynwells.me> */
|
||||||
|
|
||||||
.logfile li {
|
:root {
|
||||||
display: block;
|
--logentry-background-color: var(--tag-background-color);
|
||||||
margin-block-start: 2rem;
|
--logentry-foreground-color: var(--tag-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.logfile dt {
|
ol.logfile {
|
||||||
margin-block-start: 2rem;
|
margin-block-start: 0;
|
||||||
|
padding-inline-start: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.stats {
|
.logentry {
|
||||||
|
background-color: var(--logentry-background-color);
|
||||||
|
color: var(--logentry-foreground-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry {
|
||||||
|
align-items: first baseline;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 32px auto auto;
|
||||||
|
row-gap: 1rem;
|
||||||
|
margin-block-start: 2rem;
|
||||||
|
padding: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry .date {
|
||||||
|
grid-column-start: 2;
|
||||||
|
grid-row-start: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry h4.date {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry .character-descriptor {
|
||||||
|
color: #aaa;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
grid-column-start: 3;
|
||||||
|
grid-row-start: 1;
|
||||||
|
text-align: right;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry p {
|
||||||
|
grid-column-start: 2;
|
||||||
|
grid-column-end: 4;
|
||||||
|
grid-row-start: 2;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry .stats {
|
||||||
|
grid-column-start: 2;
|
||||||
|
grid-column-end: 4;
|
||||||
|
grid-row-start: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logentry table.stats {
|
||||||
border: 0;
|
border: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
-webkit-border-horizontal-spacing: 0;
|
-webkit-border-horizontal-spacing: 0;
|
||||||
-webkit-border-vertical-spacing: 0;
|
-webkit-border-vertical-spacing: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.stats td {
|
.logentry table.stats td {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
font-size: 1.75rem;
|
font-size: 1.5rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.stats td.score,
|
.logentry table.stats td.score,
|
||||||
table.stats td.hp,
|
.logentry table.stats td.hp,
|
||||||
table.stats td.level {
|
.logentry table.stats td.level {
|
||||||
width: 16rem;
|
width: 16rem;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
|
@ -1,43 +1,24 @@
|
||||||
{{ $nethack_logfile := $.Site.Data.nethack }}
|
{{ $nethack_logfile := $.Site.Data.nethack.logfile.nutmeg }}
|
||||||
|
<ol class="logfile">
|
||||||
<dl class="logfile">
|
{{ range sort $nethack_logfile "end_date" "desc" }}
|
||||||
{{ range sort $nethack_logfile.nutmeg.records "end_date" "desc" }}
|
{{ if ne .death.cause "quit" }}
|
||||||
{{ if ne .reason_for_death "quit" }}
|
<li class="logentry">
|
||||||
<!-- <table class="logfile logentry">
|
<div>{{ if .death.cause }}🪦{{ end }}</div>
|
||||||
<tr>
|
<h4 class="date">{{ time.Format "January 2, 2006" .end_date }}</h4>
|
||||||
<td colspan=5>{{ time.Format "January 2, 2006" .end_date }}</td>
|
<div class="character-descriptor">{{ .character.abbreviated }}</div>
|
||||||
</tr>
|
<p>{{ .character.name }}, a {{ .character.alignment.descriptive | lower }} {{ .character.race.descriptive | lower }} {{ .character.gender.descriptive | lower }} {{ .character.role.descriptive }},
|
||||||
<tr>
|
died {{ if gt .death.count 1 }}for the last time{{ end }} in <span class="nobreak">{{ .dungeon.name }}</span>
|
||||||
<td></td>
|
on <span class="nobreak">{{ cond (gt .dungeon.level.n 0) (.dungeon.level.descriptive | lower) .dungeon.level.descriptive }}</span>.
|
||||||
<td class="name" colspan=4>{{ .name }}, a {{ .alignment | lower }} {{ .race | lower }} {{ .gender | lower }} {{ .role }},
|
She was {{ .death.cause }}.</p>
|
||||||
died {{ if gt .number_of_deaths 1 }}for the last time{{ end }} in <span class="nobreak">{{ .dungeon_name }}</span>
|
<table class="stats">
|
||||||
on <span class="nobreak">{{ if gt .level 0 }}{{ .level_descriptive | lower }}{{ else }}{{ .level_descriptive }}{{ end }}</span>.
|
<tr>
|
||||||
{{ if eq .reason_for_death "quit" }}She quit.{{ else }}She was {{ .reason_for_death }}.{{ end }}</td>
|
<td class="began">Began {{ time.Format "January 2, 2006" .start_date }}</td>
|
||||||
</tr>
|
<td class="score">{{ .score }} points</td>
|
||||||
<tr>
|
<td class="level">Level {{ .character.max_level }}</td>
|
||||||
<td></td>
|
<td class="hp">{{ cond (gt .character.hp.n 0) (printf "%s / %s" .character.hp.n .character.hp.max) .character.hp.max }} hp</td>
|
||||||
<td class="began">Began {{ time.Format "January 2, 2006" .start_date }}</td>
|
</tr>
|
||||||
<td class="score">{{ .score }} points</td>
|
</table>
|
||||||
<td class="level">Level {{ .max_level }}</td>
|
</li>
|
||||||
<td class="hp">{{ if gt .hit_points 0 }}{{ .hit_points }} / {{ end }}{{ .max_hit_points }} hp</td>
|
{{ end }}
|
||||||
</tr>
|
{{ end }}
|
||||||
</table> -->
|
</ol>
|
||||||
<dt class="start-date">{{ time.Format "January 2, 2006" .end_date }}</dt>
|
|
||||||
<dd class="logentry">
|
|
||||||
{{ .name }}, a {{ .alignment | lower }} {{ .race | lower }} {{ .gender | lower }} {{ .role }},
|
|
||||||
died {{ if gt .number_of_deaths 1 }}for the last time{{ end }} in <span class="nobreak">{{ .dungeon_name }}</span>
|
|
||||||
on <span class="nobreak">{{ cond (gt .level 0) (.level_descriptive | lower) .level_descriptive }}</span>.
|
|
||||||
{{ cond (eq .reason_for_death "quit") "She quit." (printf "She was %s" .reason_for_death) }}.
|
|
||||||
<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 {{ .max_level }}</td>
|
|
||||||
<td class="hp">{{ cond (gt .hit_points 0) (printf "%s / %s" .hit_points .max_hit_points) .max_hit_points }} hp</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</dl>
|
|
Loading…
Add table
Add a link
Reference in a new issue