index.html 2.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
<!doctype html>
<html lang="en" data-framework="atmajs">
	<head>
		<meta charset="utf-8">
		<title>Template • TodoMVC</title>
		<link rel="stylesheet" href="bower_components/todomvc-common/base.css">
	</head>
	<body>

		<script type="mask/template" id="layout">
			/*

				TodoMVC Atma.js Application

				1. Read readme.md - you will get basic information about the libraries
				2. Hint: Viewing *.mask files enable javascript or less syntax highlighting in your IDE


				The application structure guide:

				Controls Overview:
					todo:input;

				Components Overview:
					:app\
						:filter;
						:todoList\
							:todoTask;


				Scripts overview (sorted from the most atomic parts up to the application component):
					js/
						model/Todos.js
						cntrl/input.js
						filter/filter.js
						todoList/
							todoTask/todoTask.js
							todoList.js
						app.js

				_If the controller loads a template, do not forget to review that._
			 */


			// Application Template

			section #todoapp {
				header #header {
					h1 > 'todos'

					todo:input #new-todo
						autofocus
						x-signal = 'enter: newTask'
						placeholder = 'What needs to be done?'
						;

				}

				section #main >
					:todoList;

				footer #footer xx-visible = 'status.count' {

					span #todo-count {
						strong > '~[bind: status.todoCount]'
						span > ' item~[bind: status.todoCount != 1 ? "s"] left'
					}

					:filter;

					button #clear-completed
						xx-visible = 'status.completedCount > 0'
						x-signal = 'click: removeAllCompleted' {

							'Clear completed (~[bind:status.completedCount])'
					}
				}
			}
			footer #info {
				p { 'Double-click to edit a todo' }
				p { 'Created by ' a href='http://github.com/tenbits' > 'tenbits' }
				p { 'Part of ' a href='http://todomvc.com' > 'TodoMVC' }
			}
		</script>


		<script src="bower_components/todomvc-common/base.js"></script>
		<script src="bower_components/jquery/jquery.js"></script>

		<script src="lib/atma-globals-dev.js"></script>
		<script src="js/app.js"></script>

	</body>
</html>