Add basic views

This commit is contained in:
Rowan Manning
2013-09-13 17:20:38 +01:00
parent 433aecd972
commit f951f7c734
10 changed files with 81 additions and 3 deletions

12
view/index.html Normal file
View File

@@ -0,0 +1,12 @@
{{#content "title"}}
Tasks
{{/content}}
<h1>Tasks</h1>
<p>Here are some tasks:</p>
{{> tasks}}
<a href="/new">Create a task</a>

15
view/layout/default.html Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>{{block "title"}}</title>
<meta name="description" content="{{block "description"}}"/>
</head>
<body>
{{{body}}}
</body>
</html>

10
view/new.html Normal file
View File

@@ -0,0 +1,10 @@
{{#content "title"}}
Create A Task
{{/content}}
<a href="/">&laquo; all tasks</a>
<h1>Create A Task</h1>
<p><b>TODO: Add form here and create handler for it.</b></p>

10
view/partial/tasks.html Normal file
View File

@@ -0,0 +1,10 @@
<ul>
{{#tasks}}
<li>
<a href="/{{id}}">
{{url}} ({{standard}})
</a>
</li>
{{/tasks}}
</ul>

12
view/task.html Normal file
View File

@@ -0,0 +1,12 @@
{{#content "title"}}
Task: {{task.url}} ({{task.standard}})
{{/content}}
<a href="/">&laquo; all tasks</a>
<h1>Task: {{task.url}} ({{task.standard}})</h1>
<p><b>TODO: Get and display results.</b></p>
{{> tasks}}