UNPKG

soma.js

Version:

soma.js is a javascript framework created to build scalable and maintainable applications.

75 lines (66 loc) 2.65 kB
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>soma.js • TodoMVC</title> <link rel="stylesheet" href="assets/base.css"> <style type="text/css"> .data-cloak { display: none; } </style> <!--[if IE]> <script src="assets/ie.js"></script> <![endif]--> </head> <body> <section id="todoapp"> <header id="header"> <h1>todos</h1> <input id="new-todo" placeholder="What needs to be done?" autofocus data-keypress="add()" data-blur="clear()"> </header> <section id="main"> <input id="toggle-all" type="checkbox" data-click="toggleAll()" data-checked="{{allCompleted}}"> <label for="toggle-all">Mark all as complete</label> <ul id="todo-list" class="data-cloak"> <li data-repeat="todo in todos" class="{{completedClass(todo.completed)}}"> <div class="view"> <input class="toggle" type="checkbox" data-checked="{{todo.completed}}" data-click="toggle(todo.id)"> <label data-dblclick="edit()">{{todo.title}}</label> <button class="destroy" data-click="remove(todo.id)"></button> </div> <input class="edit" value="{{todo.title}}" data-keypress="update(todo.id)"> </li> </ul> </section> <footer id="footer" class="data-cloak" data-show="{{footerVisible}}"> <span id="todo-count"><strong>{{active}}</strong> {{itemLabel}} left</span> <button id="clear-completed" data-show="{{clearCompletedVisible()}}" data-click="clearCompleted()">Clear completed ({{completed}})</button> </footer> </section> <footer id="info"> <p>Double-click to edit a todo</p> <p>Created by <a href="http://soundstep.com">Romuald Quantin</a></p> <p>With <a href="http://somajs.github.com/somajs">soma.js</a></p> <p>Part of <a href="http://todomvc.com">TodoMVC</a></p> </footer> <script src="../../build/soma.js"></script> <script src="js/lib/soma-template.js"></script> <script src="js/lib/classList.js"></script> <script src="js/todos/models/models.js"></script> <script src="js/todos/views/views.js"></script> <script src="js/todos/controllers/controllers.js"></script> <script src="js/app.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-36294101-3']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>