Invoke "link" helper the simple way, not as an empty block.
[mkws-moved-to-github.git] / examples / htdocs / mike.html
index b07e351..3714e68 100644 (file)
     <div id="mkwsLang"></div>
     <div id="mkwsSearch"></div>
     <script id="mkwsTemplateRecord" type="text/x-handlebars-template">
-      <div>
-       <b>Title:</b> {{md-title}}<br/>
-       <b>Author:</b> {{md-author}}<br/>
-      </div>
+      <table>
+       <tr>
+         <th>Title</th>
+         <td>
+           {{md-title}}
+           {{#if md-title-remainder}}
+             ({{md-title-remainder}})
+           {{/if}}
+           {{#if md-title-responsibility}}
+             <i>{{md-title-responsibility}}</i>
+           {{/if}}
+         </td>
+       </tr>
+       {{#if md-date}}
+       <tr>
+         <th>Date</th>
+         <td>{{md-date}}</td>
+       </tr>
+       {{/if}}
+       {{#if md-author}}
+       <tr>
+         <th>Author</th>
+         <td>{{md-author}}</td>
+       </tr>
+       {{/if}}
+       {{#if md-electronic-url}}
+       <tr>
+         <th>URL</th>
+         <td>{{link md-electronic-url}}</td>
+       </tr>
+       {{/if}}
+       {{#if location}}
+       <tr>
+         <th>Subject</th>
+         <td>
+           {{#first location having="md-subject"}}
+             {{#if md-subject}}
+               {{md-subject}}
+             {{/if}}
+           {{/first}}
+         </td>
+       </tr>
+       {{/if}}
+       <tr>
+         <th>Locations</th>
+         <td>
+           <ul>
+             {{#each location}}
+               <li>{{json this}}</li>
+             {{/each}}
+           </ul>
+         </td>
+       </tr>
+      </table>
     </script>
     <div id="mkwsMOTD"></div>