Compare commits

..

No commits in common. "6b72450c241d29a5121bd9fe7a68c86b32284fe4" and "a0e4db0d087c216eb9b95196d03d0ff2a2b1a295" have entirely different histories.

3 changed files with 3 additions and 36 deletions

View File

@ -1,15 +1,10 @@
{
"name": "mma_website_docker",
"version": "0.2.0",
"version": "0.1.0",
"description": "Generic Website",
"author": "Mahesh Asolkar <mahesh@mahesha.com>",
"main": "website.js",
"scripts": {
"start": "node website.js"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://git.heshapps.com/asolkar/mma-website.git"
}
}

View File

@ -18,25 +18,6 @@ module.exports = {
ret.title = process.env.SITE_TITLE;
}
// Links on the site header
var links = [];
if (("SITE_LINK_NAME_1" in process.env) && ("SITE_LINK_URL_1" in process.env)) {
links.push({'name': process.env.SITE_LINK_NAME_1, 'url': process.env.SITE_LINK_URL_1});
}
if (("SITE_LINK_NAME_2" in process.env) && ("SITE_LINK_URL_2" in process.env)) {
links.push({'name': process.env.SITE_LINK_NAME_2, 'url': process.env.SITE_LINK_URL_2});
}
if (("SITE_LINK_NAME_3" in process.env) && ("SITE_LINK_URL_3" in process.env)) {
links.push({'name': process.env.SITE_LINK_NAME_3, 'url': process.env.SITE_LINK_URL_3});
}
if (("SITE_LINK_NAME_4" in process.env) && ("SITE_LINK_URL_4" in process.env)) {
links.push({'name': process.env.SITE_LINK_NAME_4, 'url': process.env.SITE_LINK_URL_4});
}
if (("SITE_LINK_NAME_5" in process.env) && ("SITE_LINK_URL_5" in process.env)) {
links.push({'name': process.env.SITE_LINK_NAME_5, 'url': process.env.SITE_LINK_URL_5});
}
ret.links = links;
return ret;
},
site_ga_stub: function (req) {

View File

@ -17,7 +17,7 @@ function getPage(req) {
console.log(`Serving route ${route}`);
var page = `<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
return `<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<title>${website.title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@ -255,14 +255,7 @@ function toggle_play () {
</script>
</head><body onload="initialize()">
<div id="nav_strip">
<a href="${website.url}" title="Home">Home</a>`;
website.links.forEach((lnk) => {
page += `
&bull; <a href="${lnk.url}" title="${lnk.name}">${lnk.name}</a>`;
});
page += `
<a href="${website.url}" title="Home">Home</a>
</div>
<div id="osc_txt">
${website.name}
@ -287,8 +280,6 @@ ${ga_tracking_stub}
</body>
</html>`;
return page;
}
// ----------------------------------------------------------------------