mma-gpacts-app/page.js

63 lines
1.2 KiB
JavaScript

// Page template tasks
// -------------------
var config = require('./config.js');
function page_style() {
return `
.title {
font-family: 'Bowlby One SC', cursive;
font-size: xx-large;
text-align: center;
margin-top: 200px;
}
.heading {
font-family: 'Special Elite', cursive;
font-size: large;
text-align: center;
margin-top: 20px;
margin-bottom: 20px;
}
.content {
font-family: sans-serif;
font-size: medium;
text-align: center;
margin-top: 20px;
margin-bottom: 20px;
}
.yes {
color: green;
}
.no {
color: red;
}`;
}
function page_head(title) {
return `<html>
<head>
<title>${config.app_name}: ${title}</title>
<link href="https://fonts.googleapis.com/css?family=Bowlby+One+SC|Special+Elite&display=swap"
rel="stylesheet">
<style type="text/css">`
+ page_style() +
`</style>
</head>
<body>
<h1 class="title">${config.app_name}</h1>
<p class="content"><a href="/">Home</a> | <a href="/albums">Albums</a> | <a href="/tiny">Tiny Photos</a></p>`;
}
function page_tail() {
return ` </body>
</html>`;
}
// Exported functions
module.exports = {
head: page_head,
tail: page_tail
}
// vim: ai ts=4 sts=4 et sw=4 ft=javascript