Added formatting to push footer to bottom
parent
a15cf2c03f
commit
0abf8b3f50
|
@ -4,24 +4,30 @@ const router = require('express').Router(),
|
||||||
mw = require('../middleware.js'),
|
mw = require('../middleware.js'),
|
||||||
mail = require('../mail.js');
|
mail = require('../mail.js');
|
||||||
|
|
||||||
router.route('/mail').get(function(req,res,next){
|
router
|
||||||
mail.send({
|
|
||||||
to: `"Keith Irwin" <hypergeek14@gmail.com>`,
|
|
||||||
from: mail.from,
|
|
||||||
subject: 'Test email',
|
|
||||||
text: mail.text("Looks like everything's working! "),
|
|
||||||
html: mail.html("<p>Looks like everything's working! </p>")
|
|
||||||
}).then(function(){
|
|
||||||
console.log("Test email should have sent...");
|
|
||||||
res.sendStatus(200);
|
|
||||||
}).catch(function(err){
|
|
||||||
mw.throwErr(err,req);
|
|
||||||
next();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
router.route('/password').get(function(req,res){
|
.get('/mail', function(req,res,next){
|
||||||
res.render('password');
|
mail.send({
|
||||||
});
|
to: `"Keith Irwin" <hypergeek14@gmail.com>`,
|
||||||
|
from: mail.from,
|
||||||
|
subject: 'Test email',
|
||||||
|
text: mail.text("Looks like everything's working! "),
|
||||||
|
html: mail.html("<p>Looks like everything's working! </p>")
|
||||||
|
}).then(function(){
|
||||||
|
console.log("Test email should have sent...");
|
||||||
|
res.sendStatus(200);
|
||||||
|
}).catch(function(err){
|
||||||
|
mw.throwErr(err,req);
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
.get('/password', function(req,res){
|
||||||
|
res.render('password');
|
||||||
|
})
|
||||||
|
|
||||||
|
.get('/short',function(req,res){
|
||||||
|
res.render('short');
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
|
@ -0,0 +1,17 @@
|
||||||
|
'use strict';
|
||||||
|
/* global $ */
|
||||||
|
|
||||||
|
// Push footer to bottom on pages with little content
|
||||||
|
function setFooter(){
|
||||||
|
var windowHeight = $(window).height(),
|
||||||
|
footerBottom = $("footer").offset().top + $("footer").height();
|
||||||
|
if (windowHeight > footerBottom){
|
||||||
|
$("footer").css( "margin-top", windowHeight-footerBottom );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute on page load
|
||||||
|
$(function(){ setFooter(); });
|
||||||
|
|
||||||
|
// Execute on window resize
|
||||||
|
$(window).resize(function(){ setFooter(); });
|
|
@ -0,0 +1,14 @@
|
||||||
|
{% extends 'templates/base.html' %}
|
||||||
|
{% block title %}{{super()}} | Short page test{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<section class='container'>
|
||||||
|
|
||||||
|
<h1>Test</h1>
|
||||||
|
|
||||||
|
<p>This is a test of a short page. </p>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -13,4 +13,6 @@
|
||||||
<a href="https://cash.me/$KeithIrwin"><i class="fa fa-dollar"></i></a>
|
<a href="https://cash.me/$KeithIrwin"><i class="fa fa-dollar"></i></a>
|
||||||
<a href="bitcoin:14VN8GzWQPssWQherCE5XNGBWzy3eCDn74?label=tracman"><i class="fa fa-btc"></i></a>
|
<a href="bitcoin:14VN8GzWQPssWQherCE5XNGBWzy3eCDn74?label=tracman"><i class="fa fa-btc"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script src="/static/js/footer.js"></script>
|
|
@ -1,5 +1,3 @@
|
||||||
<script src="/static/js/header.js"></script>
|
|
||||||
|
|
||||||
<header class='shadow'>
|
<header class='shadow'>
|
||||||
|
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
|
@ -53,4 +51,6 @@
|
||||||
<strong><i class="fa fa-check-circle"></i> Success!</strong> {{ success | safe }}
|
<strong><i class="fa fa-check-circle"></i> Success!</strong> {{ success | safe }}
|
||||||
<a href="#" class='close' data-dismiss="alert" aria-label="close"><i class='fa fa-times'></i></a>
|
<a href="#" class='close' data-dismiss="alert" aria-label="close"><i class='fa fa-times'></i></a>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
<script src="/static/js/header.js"></script>
|
Loading…
Reference in New Issue