Part of WRIS-11.
[mkws-moved-to-github.git] / src / templates / wikipedia.handlebars
index 9447fb5..0400cae 100644 (file)
@@ -5,13 +5,31 @@ sentences - number of sentences to include
 paragraphs - number of paragraphs to include
 md-* - metadata fields passed through from backend
 }}
-<img src="{{md-thumburl}}" alt="{{md-title}}">
-<h1><a href="{{md-electronic-url}}">{{md-title}}</a></h1>
+
+<!--
+display only the first image
+
+{{#if md-thumburl}}
+<img src="{{md-thumburl.[0]}}" alt="{{md-title}}">
+{{/if}}
+-->
+
+<!-- multiple images -->
+{{#each md-thumburl}}
+  <img src="{{this}}" alt="{{md-title}}">
+{{/each}}
+
+<h1><a href="{{md-electronic-url}}" target="_blank">{{md-title}}</a></h1>
 {{#if md-title-remainder}}
 <b>{{md-title-remainder}}</b>
 {{/if}}
 {{#if md-title-responsibility}}
 <i>{{md-title-responsibility}}</i>
 {{/if}}
+{{#if md-disambiguationurl}}
+<p class="mkws-disambiguation"
+>Did you mean <a href="{{md-disambiguationurl}}" target="_blank"
+       >a different {{md-title}}</a>?</p>
+{{/if}}
 {{{mkws-paragraphs md-description paragraphs sentences}}}
 <p class="mkws-credit mkwsCredit">{{credit}}</p>