forked from skalb/docshare-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocshare-tutorial.html
49 lines (42 loc) · 1.46 KB
/
docshare-tutorial.html
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
<head>
<title>docshare</title>
</head>
<body>
<a href="http://www.skalb.com/2012/04/16/creating-a-document-sharing-site-with-meteor-js/">Back to tutorial</a>
<a href="https://github.com/skalb/docshare-tutorial"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>
{{> documentList}}
<hr>
{{> documentView}}
</body>
<template name="documentList">
<h1>Welcome to document sharing!</h1>
<div class="documents">
{{#each documents}}
{{> document}}
{{/each}}
</div>
<div id="createDocument">
Name: <input type="text" id="new-document-name" placeholder="New document" /> <input type="button" id="new-document" value="create"/>
</div>
</template>
<template name="document">
<div class="document {{selected}}">
<p>
{{ name }}
<input type="button" id="edit-document" value="Edit"/>
<input type="button" id="delete-document" value="Delete"/>
</p>
</div>
</template>
<template name="documentView">
<div id="container">
{{#if selectedDocument}}
{{#with selectedDocument}}
<div class="display">
<p>{{ name }}</p>
<textarea id="document-text" rows="10" cols="80">{{ text }}</textarea>
</div>
{{/with}}
{{/if}}
</div>
</template>