Initial content

This commit is contained in:
Adam Freeman
2024-05-29 18:54:49 +01:00
parent 2dbc1a8088
commit 5215a1d919
1944 changed files with 203378 additions and 0 deletions
@@ -0,0 +1,32 @@
<div class="m-2">
{{#if validation.valid }}
<h4>Hello {{name}}. You will be {{nextage}} next year.</h4>
{{/if }}
</div>
<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 class="text-danger" id="err_name_required"
style="{{ pass validation 'name' 'required' }}">
Please enter your name
</div>
<div class="text-danger" id="err_name_minLength"
style="{{ pass validation 'name' 'minLength' }}">
Enter at least 5 characters
</div>
</div>
<div class="m-2">
<label class="form-label">Current Age</label>
<input name="age" class="form-control" value="{{age}}" />
<div class="text-danger" id="err_age_isInteger"
style="{{ pass validation 'age' 'isInteger' }}">
Please enter your age in whole years
</div>
</div>
<div class="m-2">
<button class="btn btn-primary">Submit</button>
</div>
</form>
</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,3 @@
<h4 class="bg-primary text-white m-2 p-2">
Handlebars Odd value: {{ valueOrZero req.query.c}}
</h4>