Last active
March 8, 2017 21:17
-
-
Save dcooney/c89f5859b73256b36de4a0c3320d9b07 to your computer and use it in GitHub Desktop.
Example Underscore.js repeater template for the REST API + Ajax Load More
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/html" id="tmpl-alm-template"> | |
<li <# if(!data.thumbnail){ #> class="no-img" <# } #>> | |
<# if(data.thumbnail){ #> | |
<a href="{{{data.link}}}"><img src="{{{data.thumbnail}}}" alt="{{{data.thumbnail_alt}}}" /></a> | |
<# } #> | |
<h3><a href="{{{data.link}}}">{{{ data.post_title }}}</a></h1></h3> | |
<p class="entry-meta">{{{ data.date }}}</p> | |
<p>{{{ data.post_excerpt }}}</p> | |
</li> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment