Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (51 sloc) 1.48 KB
<head>
<title>meteor-crud</title>
</head>
<body>
{{> navbar}}
<div class="col-md-6 col-md-offset-3">
{{> postForm}}
{{> posts}}
</div>
</body>
<template name="navbar">
<div class="navbar navbar-inverse">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-inverse-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Meteor Crud</a>
</div>
<ul class="nav navbar-right">
<li>{{loginButtons align = "right" }}</li>
</ul>
</div>
</template>
<template name="postForm">
<div class="form-group">
<label class="control-label">Create post</label>
<div class="input-group">
<input type="text" id="content" class="form-control">
<span class="input-group-btn">
<button class="btn btn-success" id= "create" type="button">Create</button>
</span>
</div>
</div>
</template>
<template name="posts">
{{#each post}}
{{> post}}
{{/each}}
</template>
<template name="post">
{{#if editing}}
<input type="text" class="form-control" value="{{content}}" />
{{else}}
<p>
<span class="content col-md-10" id = "edit" ><strong>{{firstName}}:</strong> {{content}}</span>
<button class="btn btn-sm btn-danger" id = 'delete' type="submit">Delete</button>
</p>
{{/if}}
</template>