Skip to content

Instantly share code, notes, and snippets.

@arunoda
Forked from dburles/gist:1a38bddf338004a9632e
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunoda/111580cca51301418487 to your computer and use it in GitHub Desktop.
Save arunoda/111580cca51301418487 to your computer and use it in GitHub Desktop.
<head>
<title>abc</title>
</head>
<body>
{{#sourceCode}}
<template name="books">
<input type="text" placeholder="Search..." value="{{booksSearchQuery}}">
{{#if searchResults.count}}
<ul>
{{#each searchResults}}
<li>{{name}}</li>
{{/each}}
</ul>
{{/if}}
</template>
<script type="text/javascript">
UI.AA();
</script>
{{/sourceCode}}
</body>
<template name="sourceCode">
<pre><code data-language="html">
{{#with UI.contentBlock}}
{{getCode}}
{{/with}}
</code></pre>
</template>
if (Meteor.isClient) {
Template.sourceCode.getCode = function() {
var htmlString = UI.toHTML(this.extend({data: function (data) { return data; }}));
return htmlString;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment