diff options
author | Case Duckworth | 2015-03-12 13:01:16 -0700 |
---|---|---|
committer | Case Duckworth | 2015-03-12 13:01:16 -0700 |
commit | 2764ce38ff89667fc4073fb66cdd634caaffd613 (patch) | |
tree | 2b574940d00219cddba222222ee2ae13d49ea644 /.template.html | |
parent | Remove lua cruft (diff) | |
download | autocento-2764ce38ff89667fc4073fb66cdd634caaffd613.tar.gz autocento-2764ce38ff89667fc4073fb66cdd634caaffd613.zip |
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 `<a>` 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.
Diffstat (limited to '.template.html')
-rw-r--r-- | .template.html | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/.template.html b/.template.html index 6308d10..1d6a405 100644 --- a/.template.html +++ b/.template.html | |||
@@ -62,9 +62,43 @@ | |||
62 | $endif$ | 62 | $endif$ |
63 | </header> | 63 | </header> |
64 | 64 | ||
65 | <section class="content $genre$"> | 65 | $if(ekphrastic.image)$ |
66 | $body$ | 66 | <div class="ekphrastic"> |
67 | </section> | 67 | $if(ekphrastic.link)$ |
68 | <a href="$ekphrastic.link$"> | ||
69 | <img src="img/$ekphrastic.image$" | ||
70 | $if(ekphrastic.title)$ | ||
71 | title="$ekphrastic.title$" | ||
72 | $endif$ | ||
73 | $if(ekphrastic.alt)$ | ||
74 | alt="$ekphrastic.alt$" | ||
75 | $else$ | ||
76 | alt="$ekphrastic.title$" | ||
77 | $endif$ | ||
78 | $if(ekphrastic.class)$ | ||
79 | class="$ekphrastic.class$" | ||
80 | $endif$ | ||
81 | /> | ||
82 | </a> | ||
83 | $else$ | ||
84 | <img src="img/$ekphrastic.image$" | ||
85 | $if(ekphrastic.title)$ | ||
86 | title="$ekphrastic.title$" | ||
87 | $endif$ | ||
88 | $if(ekphrastic.alt)$ | ||
89 | alt="$ekphrastic.alt$" | ||
90 | $else$ | ||
91 | alt="$ekphrastic.title$" | ||
92 | $endif$ | ||
93 | $if(ekphrastic.class)$ | ||
94 | class="$ekphrastic.class$" | ||
95 | $endif$ | ||
96 | /> | ||
97 | $endif$ | ||
98 | </div> | ||
99 | $endif$ | ||
100 | |||
101 | <section class="content $genre$">$body$</section> | ||
68 | </article> | 102 | </article> |
69 | <nav> | 103 | <nav> |
70 | $for(project.prev)$ | 104 | $for(project.prev)$ |