From 2764ce38ff89667fc4073fb66cdd634caaffd613 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 12 Mar 2015 13:01:16 -0700 Subject: Fix #9 - ekphrastisize some poems For ekphrastic articles, add `ekphrastic` node to YAML metadata. This node includes subnodes `image`, `title`, `alt`, `link`, and `class`. `image` provides a link to the local image--just include the file name with the extension, not the folder (all images should be in /img/.) `title` provides the title of the image, and the alt-text, if there is no `alt` node. `alt`, if it exists, provides the alt text for the image. `link`, if present, wraps the image in an `` tag--it should point to the source web page of the ekphrastic image. `class`, if present, sets the class(es) for the image, for styling. In this commit, I've set `ekphrastic` on the four articles that have them so far: 'The Death Zone,' 'AMBER alert,' 'The moon is gone,' and 'Man.' I've also updated .template.html with the changes, and updated README.md to reflect the changes in YAML structure. --- .template.html | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to '.template.html') diff --git a/.template.html b/.template.html index 6308d10..1d6a405 100644 --- a/.template.html +++ b/.template.html @@ -62,9 +62,43 @@ $endif$ -
- $body$ -
+ $if(ekphrastic.image)$ +
+ $if(ekphrastic.link)$ + + $ekphrastic.alt$ + + $else$ + $ekphrastic.alt$ + $endif$ +
+ $endif$ + +
$body$