<!DOCTYPE html>
<HTML>
<head>
<title>Yote Platform</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/yote/js"></script>
<link rel="stylesheet" type="text/css" href="/css/main.css"/>
<STYLE>
</STYLE>
<script>
<!--
$().ready(function() {
$.yote.debug = true;
$.yote.templates.import_templates( '/templates/default_templates.html' );
$.yote.templates.init();
var yote_app = $.yote.init( 'MadYote' );
$.yote.templates.refresh();
} );
-->
</script>
<script type="text/template" class="yote_template_definition" template_name="SideBar">
<$ show_or_edit _.page #news $>
<BR>
<$ show_or_edit _.page #yoteversion $>
<ul class="navlink">
<li>Thing</li>
</ul>
</script>
<script type="text/template" class="yote_template_definition" template_name="ToDoItem">
<div>
<h4> <$$ show_or_edit _ title $$></h4>
<div><$$ edithtml _ explanation $$></div>
<div><$$ edithtml _ progress $$></div>
<??? function( ctx ) {
return $.yote.is_root() ? '<$$$ control rem_but <button type="button">remove entry</button>$$$>' : '';
} ???>
</div>
<? function( ctx ) {
$( ctx.controls.rem_but ).click( function() {
ctx.vars.page.remove_from( { name : 'todos', items : [ ctx.vars._ ] } );
$.yote.templates.refresh();
} );
} ?>
</script>
<script type="text/template" class="yote_template_definition" template_name="NewToDo">
<DIV>
<$$$ control title <input placeholder="title" type="text"> $$$> <BR>
<$$$ control explanation <textarea cols=80 placeholder="explanation" rows=4></textarea> $$$> <BR>
<$$$ control progress <textarea cols=80 placeholder="progress" rows=4></textarea> $$$> <BR>
<$$$ control newtodo <button type="button">New Todo</button>$$$>
</DIV>
<? function( ctx ) {
$( ctx.controls.newtodo ).click( function() {
var new_todo = ctx.vars.page.new_with_same_permissions( {
title : $( ctx.controls.title ).val(),
explanation : $( ctx.controls.explanation ).val(),
progress : $( ctx.controls.progress ).val()
} );
ctx.vars.page.add_to( { name : 'todos', items : [ new_todo ] } );
$.yote.templates.refresh();
} );
} ?>
</script>
<script type="text/template" class="yote_template_definition" template_name="Main">
<??? function( ctx ) {
ctx.vars.page = ctx._app_.get_page();
} ???>
<$$ edithtml page whatis $$>
<hr>
<div>
<h2>Working On</h2>
<@ ToDoItem page@todos 10 @>
<$$ NewToDo $$>
</div>
<hr>
<$$ edithtml page features $$>
<hr>
<$$ edithtml page demo $$>
</script>
<script type="text/template" class="yote_template_definition" template_name="Header">
<$$$ var default_login_message $$$>
<$$ YoteHeader $$>
</script>
</head>
<body>
<DIV class="yote_template" template="YoteHeader"></div>
<DIV class="yote_template main" template="Main"></div>
</body>
</HTML>