renovations
This commit is contained in:
parent
e706693c7e
commit
24171550ae
23 changed files with 196 additions and 76 deletions
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script>
|
||||
|
||||
<script type="text/template" id="menu-template">
|
||||
<div class="menu">
|
||||
<span class="title"><%-title%>
|
||||
<ul>
|
||||
<% items.forEach(function(item) { %>
|
||||
<li><%-item%></li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var tmpl = document.getElementById('menu-template').innerHTML;
|
||||
|
||||
var compiled = _.template(tmpl, null, {sourceURL: '/template/menu-template'});
|
||||
var result = compiled({ title: "Заголовок" });
|
||||
|
||||
document.write(result);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue