Skip to content

Instantly share code, notes, and snippets.

@twobob
Created May 3, 2017 15:44
Show Gist options
  • Save twobob/b7c3c45ce2bc94993e2013861b81c4d7 to your computer and use it in GitHub Desktop.
Save twobob/b7c3c45ce2bc94993e2013861b81c4d7 to your computer and use it in GitHub Desktop.
a simple image/links template for mustace, use with the app.js for elasticlunr.js - supports proper comma placement
<div>
<ul style="margin-left: 0px; margin-right: 0px; padding-left: 0px;">
{{#questions}}
<li data-question-id="{{id}}">
<h2 style="padding-bottom: 10px;" ><a href="#">{{title}}</a></h2>
<img style="float:left; margin-right: 10px;" class="resizable_img" src="./img/thumbs/{{{thumb}}}" width="120" height="120" ></img>
<p style="min-height: 100px;">{{#each tags}}{{{this}}}{{#unless @last}}, {{/unless}}{{/each}}</p>
</li>
{{/questions}}
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment