<div id="mkwsSwitch"></div>
<div id="mkwsLang"></div>
<div id="mkwsSearch"></div>
- <script id="entry-template" type="text/x-handlebars-template">
- <div class="entry">
- <h1>{{title}}</h1>
- <div class="body">
- {{body}}
- </div>
- </div>
+ <script id="mkwsTemplateRecord" type="text/x-handlebars-template">
+ <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-any location having="md-subject"}}
+ <tr>
+ <th>Subject</th>
+ <td>
+ {{#first location having="md-subject"}}
+ {{#if md-subject}}
+ {{md-subject}}
+ {{/if}}
+ {{/first}}
+ </td>
+ </tr>
+ {{/if-any}}
+ <tr>
+ <th>Locations</th>
+ <td>
+ <ul>
+ {{#each location}}
+ <li>{{attr 'name'}}</li>
+ {{/each}}
+ </ul>
+ </td>
+ </tr>
+ </table>
</script>
<div id="mkwsMOTD"></div>
<div id="mkwsTargets"></div>
<div id="mkwsStat"></div>
-
- <script type="text/javascript">
- var source = $("#entry-template").html();
- var template = Handlebars.compile(source);
- var context = {title: "My New Post", body: "This is my first post!"}
- var html = template(context);
- $("#mkwsMOTD").html(html);
- </script>
</body>
</html>