Browse Source

Fixed issue icons on the contact page and the contact page not appearing after last refactor. Fixes #12

pull/22/head
jrtechs 6 years ago
parent
commit
f2aa2d3978
2 changed files with 13 additions and 6 deletions
  1. +4
    -3
      includes/contact.js
  2. +9
    -3
      includes/html/contact.html

+ 4
- 3
includes/contact.js View File

@ -149,19 +149,19 @@ const processContactPage = function(request)
{
if(valid)
{
resolve(utils.include("includes/messageSent.html"));
resolve(utils.include("includes/html/messageSent.html"));
sendEmail(data.name, data.email, data.message);
}
else
{
resolve(utils.include("includes/invalidCaptcha.html"));
resolve(utils.include("includes/html/invalidCaptcha.html"));
}
});
}
else
{
resolve(utils.include("includes/contact.html"));
resolve(utils.include("includes/html/contact.html"));
}
}).catch(function(err)
@ -185,6 +185,7 @@ module.exports =
*/
main: function(request, result)
{
console.log("fuck me");
result.writeHead(200, {'Content-Type': 'text/html'});
Promise.all([includes.printAdminHeader(),
processContactPage(request),

+ 9
- 3
includes/html/contact.html View File

@ -16,7 +16,9 @@
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-user text-info"></i></div>
<div class="input-group-text"><svg id="i-user" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M22 11 C22 16 19 20 16 20 13 20 10 16 10 11 10 6 12 3 16 3 20 3 22 6 22 11 Z M4 30 L28 30 C28 21 22 20 16 20 10 20 4 21 4 30 Z" />
</svg></div>
</div>
<input type="text" class="form-control" id="name" name="name" placeholder="Name" required>
</div>
@ -24,7 +26,9 @@
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-envelope text-info"></i></div>
<div class="input-group-text"><svg id="i-mail" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M2 26 L30 26 30 6 2 6 Z M2 6 L16 16 30 6" />
</svg></div>
</div>
<input type="email" class="form-control" id="email" name="email" placeholder="example@gmail.com" required>
</div>
@ -33,7 +37,9 @@
<div class="form-group">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fa fa-comment text-info"></i></div>
<div class="input-group-text"><svg id="i-msg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M2 4 L30 4 30 22 16 22 8 29 8 22 2 22 Z" />
</svg></div>
</div>
<textarea class="form-control" placeholder="Message" name="message" required></textarea>
</div>

Loading…
Cancel
Save