diff --git a/content/nethack/index.md b/content/nethack/index.md index c0d0131..8957fa6 100644 --- a/content/nethack/index.md +++ b/content/nethack/index.md @@ -1,6 +1,10 @@ --- title: "Nethack" +description: In which I play way too much of a silly command line Rogue-like game. date: 2022-04-13T08:43:46-07:00 draft: true --- +Herein is a chronological accounting of my descents into the Dungeons of Doom. + +{{< nethack_table >}} \ No newline at end of file diff --git a/content/nethack/style.css b/content/nethack/style.css new file mode 100644 index 0000000..72ad8c9 --- /dev/null +++ b/content/nethack/style.css @@ -0,0 +1,32 @@ +/* Eryn Wells */ + +.logfile li { + display: block; + margin-block-start: 2rem; +} + +.logfile dt { + margin-block-start: 2rem; +} + +table.stats { + border: 0; + width: 100%; + -webkit-border-horizontal-spacing: 0; + -webkit-border-vertical-spacing: 0; +} + +table.stats td { + color: #aaa; + font-size: 1.75rem; + font-weight: 700; + padding: 0; + text-transform: uppercase; +} + +table.stats td.score, +table.stats td.hp, +table.stats td.level { + width: 16rem; + text-align: right; +} \ No newline at end of file diff --git a/layouts/shortcodes/nethack_table.html b/layouts/shortcodes/nethack_table.html new file mode 100644 index 0000000..5378559 --- /dev/null +++ b/layouts/shortcodes/nethack_table.html @@ -0,0 +1,43 @@ +{{ $nethack_logfile := $.Site.Data.nethack }} + +
+{{ range sort $nethack_logfile.nutmeg.records "end_date" "desc" }} +{{ if ne .reason_for_death "quit" }} + +
{{ time.Format "January 2, 2006" .end_date }}
+
+ {{ .name }}, a {{ .alignment | lower }} {{ .race | lower }} {{ .gender | lower }} {{ .role }}, + died {{ if gt .number_of_deaths 1 }}for the last time{{ end }} in {{ .dungeon_name }} + on {{ cond (gt .level 0) (.level_descriptive | lower) .level_descriptive }}. + {{ cond (eq .reason_for_death "quit") "She quit." (printf "She was %s" .reason_for_death) }}. + + + + + + + +
Began {{ time.Format "January 2, 2006" .start_date }}{{ .score }} pointsLevel {{ .max_level }}{{ cond (gt .hit_points 0) (printf "%s / %s" .hit_points .max_hit_points) .max_hit_points }} hp
+
+ +{{ end }} +{{ end }} +
\ No newline at end of file