diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-07-22 10:30:28 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-07-22 10:30:28 +0100 |
commit | 8eaea048978bc115021ca9942fdbaf89c7072ff4 (patch) | |
tree | 8d9306445817fd2010d0b635caa6f37ed8848ac5 | |
parent | cfa95961c49383469869bb9c868e8a9ef27bbd19 (diff) |
using a shortcode for cat kill data!
-rw-r--r-- | content/blog/cats/cat_kills/index.md | 61 | ||||
-rw-r--r-- | data/cat_kills.yml | 36 | ||||
-rw-r--r-- | layouts/shortcodes/cat_kill_log_table.html | 35 |
3 files changed, 72 insertions, 60 deletions
diff --git a/content/blog/cats/cat_kills/index.md b/content/blog/cats/cat_kills/index.md index 638a76b..143238f 100644 --- a/content/blog/cats/cat_kills/index.md +++ b/content/blog/cats/cat_kills/index.md @@ -20,66 +20,7 @@ I have decided to resume updating this. Best way to do it is to include a new ta Chris Packham - if you're reading this, you're right. Locking the cats out at night *does* result in a higher kill-rate. Less hassle for us but more hassle for the birds. Lesson learned. -<table> - <colgroup> - <col span="1" style="width: 10%;"> - <col span="1" style="width: 5%;"> - <col span="1" style="width: 15%;"> - <col span="1" style="width: 15%;"> - <col span="1" style="width: 15%;"> - <col span="1" style="width: 5%;"> - <col span="1" style="width: 40%;"> - </colgroup> - <thead> - <tr class="header" style="background-color: lightgray;"> - <th>Date</th> - <th>Super species</th> - <th>Specific species</th> - <th>Kill Type</th> - <th>Killer</th> - <th>Suspect Killer</th> - <th style="width:60%">Comments</th> - </tr> - </thead> - <tbody> - <tr> - <td>22 July 2022</td> - <td>Rodent</td> - <td>Shrew</td> - <td>DOA</td> - <td>Unknown</td> - <td>NA</td> - <td>Just a dead shrew on the carpet, a few long blades of grass alongside it suggesting it put up a fight. RIP.</td> - </tr> - <tr> - <td>19 July 2022</td> - <td>Bird</td> - <td>Unknown</td> - <td>Missing presumed dead</td> - <td>Unknown</td> - <td>NA</td> - <td>Just a pile of feathers (probably of a young bird) outside the back door. The body would have been brought inside had we not locked the flap last night.</td> - </tr> - <tr> - <td>18 July 2022</td> - <td>Rodent</td> - <td>Shrew</td> - <td>Alive</td> - <td>NA</td> - <td>NA</td> - <td>No remains this morning but a shrew trotted into the living room at about 8am having been carried in by someone's murderous jaws at some point during the night. Eventually we trapped it under a plant pot and released it out the front. Shrews make a lot of noise when stressed!</td> - </tr> - <tr> - <td>17 July 2022</td> - <td>Bird</td> - <td>Sparrow</td> - <td>DOA</td> - <td>Unknown</td> - <td>NA</td> - <td>Mullered corpse lying in bloom of feathers on the utility room floor upon waking this morning. Do most of my hoovering in pyjamas nowadays.</td> - </tr> - </tbody> -</table> +{{< cat_kill_log_table >}} #### Current analysis as of 21 June 2021: diff --git a/data/cat_kills.yml b/data/cat_kills.yml new file mode 100644 index 0000000..17588a2 --- /dev/null +++ b/data/cat_kills.yml @@ -0,0 +1,36 @@ +cat_kills: + - date: "22 July 2022" + super_species: "Rodent" + specific_species: "Shrew" + kill_type: "DOA" + killer: "Unknown" + suspect_killer: "Unknown" + comments: "Dumped outside the backdoor on its back." + - date: "22 July 2022" + super_species: "Rodent" + specific_species: "Shrew" + kill_type: "DOA" + killer: "Unknown" + suspect_killer: "Unknown" + comments: "Just a dead shrew on the carpet, a few long blades of grass alongside it suggesting it put up a fight. RIP." + - date: "19 July 2022" + super_species: "Bird" + specific_species: "Unknown" + kill_type: "Missing presumed dead" + killer: "Unknown" + suspect_killer: "NA" + comments: "Just a pile of feathers (probably of a young bird) outside the back door. The body would have been brought inside had we not locked the flap last night." + - date: "18 July 2022" + super_species: "Rodent" + specific_species: "Shrew" + kill_type: "Alive" + killer: "NA" + suspect_killer: "NA" + comments: "No remains this morning but a shrew trotted into the living room at about 8am having been carried in by someone's murderous jaws at some point during the night. Eventually we trapped it under a plant pot and released it out the front. Shrews make a lot of noise when stressed!" + - date: "17 July 2022" + super_species: "Bird" + specific_species: "Sparrow" + kill_type: "DOA" + killer: "Unknown" + suspect_killer: "NA" + comments: "Mullered corpse lying in bloom of feathers on the utility room floor upon waking this morning. Do most of my hoovering in pyjamas nowadays." diff --git a/layouts/shortcodes/cat_kill_log_table.html b/layouts/shortcodes/cat_kill_log_table.html new file mode 100644 index 0000000..6c3246a --- /dev/null +++ b/layouts/shortcodes/cat_kill_log_table.html @@ -0,0 +1,35 @@ +<table> + <colgroup> + <col span="1" style="width: 10%;"> + <col span="1" style="width: 5%;"> + <col span="1" style="width: 15%;"> + <col span="1" style="width: 15%;"> + <col span="1" style="width: 15%;"> + <col span="1" style="width: 5%;"> + <col span="1" style="width: 40%;"> + </colgroup> + <thead> + <tr class="header" style="background-color: lightgray;"> + <th>Date</th> + <th>Super species</th> + <th>Specific species</th> + <th>Kill Type</th> + <th>Killer</th> + <th>Suspect Killer</th> + <th style="width:60%">Comments</th> + </tr> + </thead> + <tbody> + {{ range .Site.Data.cat_kills.cat_kills }} + <tr> + <td>{{ .date }}</td> + <td>{{ .super_species }}</td> + <td>{{ .specific_species }}</td> + <td>{{ .kill_type }}</td> + <td>{{ .killer }}</td> + <td>{{ .suspect_killer }}</td> + <td>{{ .comments }}</td> + </tr> + {{ end }} + </tbody> +</table> |