Initial content
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export default (value) => value % 2;
|
||||
@@ -0,0 +1,37 @@
|
||||
<div class="container fluid">
|
||||
<div class="row">
|
||||
<div class="col-7">
|
||||
{{#if name}}
|
||||
<div class="m-2">
|
||||
<h4>Hello {{ name }}. You will be {{ nextage }}
|
||||
in {{ years }} years.</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div>
|
||||
<form id="age_form" action="/form" method="post">
|
||||
<div class="m-2">
|
||||
<label class="form-label">Name</label>
|
||||
<input name="name" class="form-control"
|
||||
value="{{ name }}"/>
|
||||
</div>
|
||||
<div class="m-2">
|
||||
<label class="form-label">Current Age</label>
|
||||
<input name="age" class="form-control"
|
||||
value="{{ age }}" />
|
||||
</div>
|
||||
<div class="m-2">
|
||||
<label class="form-label">Number of Years</label>
|
||||
<input name="years" class="form-control"
|
||||
value="{{ years }}" />
|
||||
</div>
|
||||
<div class="m-2">
|
||||
<button class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{> history }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr><th>Field</th><th>Value</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Name:</td><td>{{ name }} </td></tr>
|
||||
<tr><td>City:</td><td>{{ city }} </td></tr>
|
||||
<tr><td>File:</td><td>{{ fileData }} </td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/bundle.js"></script>
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
{{{ body }}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<h4 class="bg-secondary text-white m-2 p-2">
|
||||
Handlebars Even value: {{ valueOrZero req.query.c }}
|
||||
</h4>
|
||||
@@ -0,0 +1,21 @@
|
||||
<h4>Recent Queries</h4>
|
||||
<table class="table table-sm table-striped my-2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th><th>Age</th><th>Years</th><th>Result</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#unless history }}
|
||||
<tr><td colspan="4">No data available</td></tr>
|
||||
{{/unless }}
|
||||
{{#each history }}
|
||||
<tr>
|
||||
<td>{{ this.name }} </td>
|
||||
<td>{{ this.age }} </td>
|
||||
<td>{{ this.years }} </td>
|
||||
<td>{{ this.nextage }} </td>
|
||||
</tr>
|
||||
{{/each }}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,3 @@
|
||||
<h4 class="bg-primary text-white m-2 p-2">
|
||||
Handlebars Odd value: {{ valueOrZero req.query.c}}
|
||||
</h4>
|
||||
Reference in New Issue
Block a user