Browse Source

Refactored file structure of the website to create more uniformity.

pull/4/head
jrtechs 5 years ago
parent
commit
0803b2ed43
122 changed files with 163 additions and 94 deletions
  1. +3
    -2
      README.md
  2. +13
    -10
      admin/admin.js
  3. +24
    -0
      admin/analytics/analytics.js
  4. +1
    -2
      admin/category/addCategory.html
  5. +16
    -9
      admin/category/addCategory.js
  6. +1
    -1
      admin/downloads/addDownload.html
  7. +3
    -3
      admin/downloads/manageDownloads.js
  8. +1
    -1
      admin/login/login.html
  9. +21
    -4
      admin/login/login.js
  10. +13
    -7
      admin/posts/editPost.js
  11. +1
    -1
      admin/posts/newPost.html
  12. +3
    -3
      admin/posts/newPost.js
  13. +0
    -0
      blogContent/downloads/1.jpg
  14. +0
    -0
      blogContent/downloads/Cube-Field-youtube-demo.zip
  15. +0
    -0
      blogContent/downloads/Extreme-vb-pong.zip
  16. +0
    -0
      blogContent/downloads/Zombie-Game-Youtube-Demo.zip
  17. +0
    -0
      blogContent/downloads/ZombieGameYoutube.zip
  18. +0
    -0
      blogContent/headerImages/computer.jpg
  19. +0
    -0
      blogContent/headerImages/floppy2.jpg
  20. +0
    -0
      blogContent/headerImages/gremlinConsole.png
  21. +0
    -0
      blogContent/headerImages/rit1.jpg
  22. +0
    -0
      blogContent/headerImages/rit2.jpg
  23. +0
    -0
      blogContent/headerImages/spaghetti.jpg
  24. +0
    -0
      blogContent/headerImages/steamGraphWebBanner.png
  25. +0
    -0
      blogContent/headerImages/wordpress_banner.jpg
  26. +0
    -0
      blogContent/posts/hardware/ddr4-ram-introduction.md
  27. +0
    -0
      blogContent/posts/hardware/hard-drive-speeds.md
  28. +0
    -0
      blogContent/posts/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png
  29. +0
    -0
      blogContent/posts/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png
  30. +0
    -0
      blogContent/posts/hardware/media/3812f5e41805eb999b057c15bae19081.png
  31. +0
    -0
      blogContent/posts/hardware/media/d460663e2f964c76a15d2c07a7052d60.png
  32. +0
    -0
      blogContent/posts/hardware/media/f19479753c6d86855a3a77f1cf840942.png
  33. +0
    -0
      blogContent/posts/java/bash-usr-bin-java-cannot-execute-binary-file.md
  34. +0
    -0
      blogContent/posts/java/gremlin-in-10-minutes.md
  35. +0
    -0
      blogContent/posts/java/media/2a20326e77c3f67aa3753401ba4bc612.png
  36. +0
    -0
      blogContent/posts/java/media/2a96900bae1e8946a1df243d8318e69f.png
  37. +0
    -0
      blogContent/posts/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png
  38. +0
    -0
      blogContent/posts/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png
  39. +0
    -0
      blogContent/posts/java/top-three-recommended-java-ides.md
  40. +0
    -0
      blogContent/posts/other/deepfakes.md
  41. +0
    -0
      blogContent/posts/other/my-college-essay.md
  42. +0
    -0
      blogContent/posts/other/should-you-run-a-server-on-desktop-hardware.md
  43. +0
    -0
      blogContent/posts/other/ways-to-avoid-getting-hacked.md
  44. +0
    -0
      blogContent/posts/other/why-do-i-blog.md
  45. +0
    -0
      blogContent/posts/programming/c-to-c++-tutorial.md
  46. +0
    -0
      blogContent/posts/programming/media/90703af9527d8d4aecc7eefbda5f049a.png
  47. +0
    -0
      blogContent/posts/programming/university-vs-teaching-yourself-programming.md
  48. +0
    -0
      blogContent/posts/programming/using-english-conventions-to-write-clean-code.md
  49. +0
    -0
      blogContent/posts/programs/installing-all-your-programs-at-once-with-ninite.md
  50. +0
    -0
      blogContent/posts/programs/media/90e4464eb85c998c8db42c965468aa54.png
  51. +0
    -0
      blogContent/posts/projects/ackermann-function-written-in-java.md
  52. +0
    -0
      blogContent/posts/projects/batch-minecraft-launcher-with-auto-restart.md
  53. +0
    -0
      blogContent/posts/projects/java-fibonacci-solver.md
  54. +0
    -0
      blogContent/posts/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png
  55. +0
    -0
      blogContent/posts/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg
  56. +0
    -0
      blogContent/posts/projects/media/09d34d523359111041accf89c82fd6c2.png
  57. +0
    -0
      blogContent/posts/projects/media/0b9d25d56269d39f60177b6b29a882da.png
  58. +0
    -0
      blogContent/posts/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png
  59. +0
    -0
      blogContent/posts/projects/media/161edc628257e8a2f92086c5987dcf0f.png
  60. +0
    -0
      blogContent/posts/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png
  61. +0
    -0
      blogContent/posts/projects/media/463f2aa188466da8f47309235039250c.jpg
  62. +0
    -0
      blogContent/posts/projects/media/50dc96254f26b730e842134db98c9966.jpg
  63. +0
    -0
      blogContent/posts/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg
  64. +0
    -0
      blogContent/posts/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg
  65. +0
    -0
      blogContent/posts/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg
  66. +0
    -0
      blogContent/posts/projects/media/ad84021445feb7021f2320f6be599ef5.png
  67. +0
    -0
      blogContent/posts/projects/media/d0888a3222fa328c291629fac491e268.jpg
  68. +0
    -0
      blogContent/posts/projects/media/d3f05acc1973ea938920407511c28bff.png
  69. +0
    -0
      blogContent/posts/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg
  70. +0
    -0
      blogContent/posts/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png
  71. +0
    -0
      blogContent/posts/projects/media/steam/ben2.png
  72. +0
    -0
      blogContent/posts/projects/media/steam/diagram.png
  73. +0
    -0
      blogContent/posts/projects/media/steam/jrtechs1.png
  74. +0
    -0
      blogContent/posts/projects/media/steam/jrtechs2.png
  75. +0
    -0
      blogContent/posts/projects/musical-floppy-drive-build-log.md
  76. +0
    -0
      blogContent/posts/projects/musical-floppy-drives.md
  77. +0
    -0
      blogContent/posts/projects/steam-friends-graph.md
  78. +0
    -0
      blogContent/posts/projects/time-lapse-programming-pong.md
  79. +0
    -0
      blogContent/posts/projects/time-lapse-programming-zombie-game.md
  80. +0
    -0
      blogContent/posts/web-development/history-of-jrtechs.md
  81. +0
    -0
      blogContent/posts/web-development/media/0a829ea2071126a5642534f54bc0fe19.png
  82. +0
    -0
      blogContent/posts/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg
  83. +0
    -0
      blogContent/posts/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png
  84. +0
    -0
      blogContent/posts/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png
  85. +0
    -0
      blogContent/posts/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg
  86. +0
    -0
      blogContent/posts/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png
  87. +0
    -0
      blogContent/posts/web-development/media/websiteOptimization/finalResults.png
  88. +0
    -0
      blogContent/posts/web-development/media/websiteOptimization/serverCache.png
  89. +0
    -0
      blogContent/posts/web-development/node-vs-php.md
  90. +0
    -0
      blogContent/posts/web-development/node-website-optimization.md
  91. +0
    -0
      blogContent/posts/web-development/why-i-stopped-using-wordpress.md
  92. +0
    -5
      generateSitemap
  93. +6
    -3
      includes/contact.js
  94. +0
    -0
      includes/css/bootstrap.css
  95. +0
    -0
      includes/css/code.css
  96. +1
    -1
      includes/css/minified.css
  97. +0
    -0
      includes/css/openSans.woff2
  98. +1
    -1
      includes/css/pure.css
  99. +0
    -0
      includes/css/purge.css
  100. +7
    -3
      includes/downloads.js

+ 3
- 2
README.md View File

@ -162,9 +162,10 @@ server {
proxy_cache_bypass $http_upgrade;
}
}
```
#admin.jrtechs.net.con
```
#admin.jrtechs.net.conf
server {
listen 80;
server_name www.admin.jrtechs.net admin.jrtechs.net;

+ 13
- 10
admin/admin.js View File

@ -1,16 +1,20 @@
/**
* Renders the admin page contents
*/
//file IO
const utils = require('../utils/utils.js');
const Promise = require('promise');
module.exports=
{
/**
* Method calls the admin widgets it correct order
*
* @param fileName
* @param request
* @return {*|Promise}
*/
main: function(fileName, request)
main: function(request)
{
return new Promise(function(resolve, reject)
{
@ -18,10 +22,10 @@ module.exports=
{
utils.getPostData(request).then(function (postData)
{
Promise.all([require("../admin/newPost.js").main(postData),
require("../admin/addCategory.js").main(postData),
require("../admin/editPost.js").main(postData),
require("./manageDownloads.js").main(postData)])
Promise.all([require("./posts/newPost.js").main(postData),
require("./category/addCategory.js").main(postData),
require("./posts/editPost.js").main(postData),
require("./downloads/manageDownloads.js").main(postData)])
.then(function(content)
{
resolve(content.join(''));
@ -33,14 +37,13 @@ module.exports=
}
else
{
//login page
console.log("login page");
require("../admin/login.js").main(request).then(function(html)
require("./login/login.js").main(request).then(function(html)
{
resolve(html);
}).catch(function(err)
{
console.log(err);
reject(err);
})
}
});

+ 24
- 0
admin/analytics/analytics.js View File

@ -0,0 +1,24 @@
module.exports=
{
main: function(postData)
{
return new Promise(function(resolve, reject)
{
Promise.all([utils.include("./admin/addCategory.html"),
printCategories(),
processPost(postData)]).then(function(html)
{
resolve("<div class=\"col-md-6\">" +
html.join('') +
"</div></div>");
}).catch(function(error)
{
console.log("error in addCategory.js");
reject(error);
})
});
}
};

admin/addCategory.html → admin/category/addCategory.html View File

@ -1,8 +1,7 @@
<div class="blogPost">
<h1 class="text-center">Add Category</h1>
<form action="/admin/" method ="post" class="p-2">
<form action="/admin" method ="post" class="p-2">
<div class="form-group">
<input class="form-control" type="text" name="add_category" required>
<label>Category</label>

admin/addCategory.js → admin/category/addCategory.js View File

@ -1,8 +1,11 @@
const utils = require('../utils/utils.js');
const sql = require('../utils/sql');
//file io
const utils = require('../../utils/utils.js');
//update db
const sql = require('../../utils/sql');
//parse post data
const qs = require('querystring');
const Promise = require('promise');
/**
@ -52,11 +55,11 @@ const processPost = function(postData)
{
return new Promise(function(resolve, reject)
{
var post = qs.parse(postData);
const post = qs.parse(postData);
if(post.add_category)
{
var url = post.add_category.split(" ").join("-").toLowerCase();
var q = "insert into categories (name, url) values " +
const url = post.add_category.split(" ").join("-").toLowerCase();
const q = "insert into categories (name, url) values " +
"('" + post.add_category + "','" + url + "')";
if(sql.insert(q) != 0)
{
@ -78,12 +81,16 @@ module.exports=
{
return new Promise(function(resolve, reject)
{
Promise.all([utils.include("./admin/addCategory.html"), printCategories(), processPost(postData)]).then(function(html)
Promise.all([utils.include("./admin/addCategory.html"),
printCategories(),
processPost(postData)]).then(function(html)
{
resolve("<div class=\"col-md-6\">" + html.join('') + "</div></div>");
resolve("<div class=\"col-md-6\">" +
html.join('') +
"</div></div>");
}).catch(function(error)
{
console.log("error in cat.js");
console.log("error in addCategory.js");
reject(error);
})
});

admin/addDownload.html → admin/downloads/addDownload.html View File

@ -1,7 +1,7 @@
<div class="blogPost">
<h1 class="text-center">Add Download</h1>
<form action="/admin/" method ="post" class="p-2">
<form action="/admin" method ="post" class="p-2">
<div class="form-group">
<input class="form-control" type="text" name="add_download_name" required>
<label>Download Name</label>

admin/manageDownloads.js → admin/downloads/manageDownloads.js View File

@ -7,10 +7,10 @@
//file IO
const utils = require('../utils/utils.js');
const utils = require('../../utils/utils.js');
//updates db
const sql = require('../utils/sql');
const sql = require('../../utils/sql');
//parses post data
const qs = require('querystring');
@ -109,7 +109,7 @@ const renderDownloadRow = function(download)
"<td>" + download.name + "</td>" +
"<td>" + download.file + "</td>" +
"<td>" + download.download_count + "</td>" +
"<td><form action=\"/admin/\" method =\"post\" >\n" +
"<td><form action=\"/admin\" method =\"post\" >\n" +
" <input type=\"submit\" name=\"submit\" value=\"Delete\"\n" +
" class=\"btn btn-secondary\"/>\n" +
"<input type='hidden' name='delete_download' value='" +

admin/login.html → admin/login/login.html View File

@ -4,7 +4,7 @@
<h2>Login</h2>
</div>
<form action="/admin/" method ="post" class="p-2">
<form action="/admin" method ="post" class="p-2">
<div class="form-group">
<label for="username1">User Name</label>
<input class="form-control" type="test" id="username1" name="username" placeholder="Enter username" required>

admin/login.js → admin/login/login.js View File

@ -1,7 +1,18 @@
const utils = require('../utils/utils.js');
const Promise = require('promise');
const sql = require('../utils/sql');
//file io
const utils = require('../../utils/utils.js');
//update db
const sql = require('../../utils/sql');
/**
* Processes post data to see if the user has successfully
* logged in. If the user has logged in successfully, a session
* variable is set and the page is refreshed.
*
* @param request
* @returns {Promise}
*/
const processLogin = function(request)
{
return new Promise(function(resolve, reject)
@ -31,12 +42,18 @@ const processLogin = function(request)
module.exports=
{
/**
* Renders the contents of the login page of the website
*
* @param request express request containing post data
* @returns {Promise} resolves html of login page
*/
main: function(request)
{
return new Promise(function(resolve, reject)
{
Promise.all([utils.include('./admin/login.html'),
require("../sidebar/sidebar.js").main(),
require("../../sidebar/sidebar.js").main(),
processLogin(request)]).then(function(html)
{
resolve(html.join('') + "</div>");

admin/editPost.js → admin/posts/editPost.js View File

@ -1,12 +1,15 @@
/** File which renders the edit form for the posts and processes
/**
* File which renders the edit form for the posts and processes
* the post data generated by edit forms.
*
* @type {Promise|*}
*/
const Promise = require('promise');
//parses the post data
const qs = require('querystring');
const sql = require('../utils/sql');
//updates db
const sql = require('../../utils/sql');
/**
@ -21,7 +24,7 @@ const renderPostRow = function(post)
"<td>" + post.name + "</td>" +
"<td>" + post.picture_url + "</td>" +
"<td>" + post.published + "</td>" +
"<td><form action=\"/admin/\" method =\"post\" >\n" +
"<td><form action=\"/admin\" method =\"post\" >\n" +
"<input type=\"submit\" name=\"submit\" value=\"Edit\"\n" +
" class=\"btn btn-secondary\"/>\n" +
"<input type='hidden' name='edit_post' value='" + post.post_id + "'/>"+
@ -35,7 +38,7 @@ const renderPostRow = function(post)
*/
const postsTable = function()
{
var html = "<div class='blogPost p-2'>" +
const html = "<div class='blogPost p-2'>" +
"<h1 class=\"text-center\">Posts</h1>" +
"<div class=\"\"><table class=\"table table-striped\">" +
"<thead class=\"thead-dark\"><tr>" +
@ -68,6 +71,7 @@ const postsTable = function()
/**
* Displays the edit form for edit posts
*
* @param post_id
*/
const displayRenderForm = function(post_id)
@ -76,9 +80,9 @@ const displayRenderForm = function(post_id)
{
sql.getPostById(post_id).then(function(post)
{
var html = "<div class='blogPost'>"+
const html = "<div class='blogPost'>"+
"<h1 class=\"text-center\">Edit Post</h1>"+
"<form action=\"/admin/\" method =\"post\" >"+
"<form action=\"/admin\" method =\"post\" >"+
" <div class=\"form-group\">\n" +
" <input class=\"form-control\" type=\"text\" name=\"edit_cat_num\" value='" + post.category_id + "' required>\n" +
" <label class=\"w3-label w3-validate\">Category Number</label>\n" +
@ -114,6 +118,7 @@ const displayRenderForm = function(post_id)
/**
* Detects if the post data came from the edit form in posts table or edit post
* in the edit post form. Based on this, this function will call one of two functions
*
* @param postData
*/
const processPost = function(postData)
@ -156,6 +161,7 @@ module.exports=
/**
* Method which calls helper functions which processes post data for editing posts
* and calls a function which displays all the posts in a table
*
* @param postData
*/
main: function(postData)

admin/newPost.html → admin/posts/newPost.html View File

@ -1,7 +1,7 @@
<div class="col-md-6 blogPost">
<h1 class="text-center">New Post</h1>
<form action="/admin/" method ="post" class="p-2">
<form action="/admin" method ="post" class="p-2">
<!-- Post category -->
<div class="form-group">
<input class="form-control" type="text" name="add_post_category" required>

admin/newPost.js → admin/posts/newPost.js View File

@ -1,5 +1,5 @@
const utils = require('../utils/utils.js');
const sql = require('../utils/sql');
const utils = require('../../utils/utils.js');
const sql = require('../../utils/sql');
const qs = require('querystring');
const Promise = require('promise');
@ -28,7 +28,7 @@ const processPost = function(postData)
"', '" + post.add_post_date + "', '" + post.add_post_name + "', '" + urls + "')";
sql.insert(q).then(function()
{
var map = require('../utils/generateSiteMap');
var map = require('../../utils/generateSiteMap');
map.main();
resolve("");
}).catch(function(error)

downloads/content/1.jpg → blogContent/downloads/1.jpg View File


downloads/content/Cube-Field-youtube-demo.zip → blogContent/downloads/Cube-Field-youtube-demo.zip View File


downloads/content/Extreme-vb-pong.zip → blogContent/downloads/Extreme-vb-pong.zip View File


downloads/content/Zombie-Game-Youtube-Demo.zip → blogContent/downloads/Zombie-Game-Youtube-Demo.zip View File


downloads/content/ZombieGameYoutube.zip → blogContent/downloads/ZombieGameYoutube.zip View File


img/posts/computer.jpg → blogContent/headerImages/computer.jpg View File


img/posts/floppy2.jpg → blogContent/headerImages/floppy2.jpg View File


img/posts/gremlinConsole.png → blogContent/headerImages/gremlinConsole.png View File


img/posts/rit1.jpg → blogContent/headerImages/rit1.jpg View File


img/posts/rit2.jpg → blogContent/headerImages/rit2.jpg View File


img/posts/spaghetti.jpg → blogContent/headerImages/spaghetti.jpg View File


img/posts/steamGraphWebBanner.png → blogContent/headerImages/steamGraphWebBanner.png View File


img/posts/wordpress_banner.jpg → blogContent/headerImages/wordpress_banner.jpg View File


entries/hardware/ddr4-ram-introduction.md → blogContent/posts/hardware/ddr4-ram-introduction.md View File


entries/hardware/hard-drive-speeds.md → blogContent/posts/hardware/hard-drive-speeds.md View File


entries/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png → blogContent/posts/hardware/media/2ac00ccdcae9b672a2f844b7f8f318c5.png View File


entries/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png → blogContent/posts/hardware/media/31210e78cc2cae122a6c3fdb93ab87c0.png View File


entries/hardware/media/3812f5e41805eb999b057c15bae19081.png → blogContent/posts/hardware/media/3812f5e41805eb999b057c15bae19081.png View File


entries/hardware/media/d460663e2f964c76a15d2c07a7052d60.png → blogContent/posts/hardware/media/d460663e2f964c76a15d2c07a7052d60.png View File


entries/hardware/media/f19479753c6d86855a3a77f1cf840942.png → blogContent/posts/hardware/media/f19479753c6d86855a3a77f1cf840942.png View File


entries/java/bash-usr-bin-java-cannot-execute-binary-file.md → blogContent/posts/java/bash-usr-bin-java-cannot-execute-binary-file.md View File


entries/java/gremlin-in-10-minutes.md → blogContent/posts/java/gremlin-in-10-minutes.md View File


entries/java/media/2a20326e77c3f67aa3753401ba4bc612.png → blogContent/posts/java/media/2a20326e77c3f67aa3753401ba4bc612.png View File


entries/java/media/2a96900bae1e8946a1df243d8318e69f.png → blogContent/posts/java/media/2a96900bae1e8946a1df243d8318e69f.png View File


entries/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png → blogContent/posts/java/media/c1e712bdead908ebd72921ec2d1cbd5e.png View File


entries/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png → blogContent/posts/java/media/f5cb2682e219549cb07acd1d01c2ccb1.png View File


entries/java/top-three-recommended-java-ides.md → blogContent/posts/java/top-three-recommended-java-ides.md View File


entries/other/deepfakes.md → blogContent/posts/other/deepfakes.md View File


entries/other/my-college-essay.md → blogContent/posts/other/my-college-essay.md View File


entries/other/should-you-run-a-server-on-desktop-hardware.md → blogContent/posts/other/should-you-run-a-server-on-desktop-hardware.md View File


entries/other/ways-to-avoid-getting-hacked.md → blogContent/posts/other/ways-to-avoid-getting-hacked.md View File


entries/other/why-do-i-blog.md → blogContent/posts/other/why-do-i-blog.md View File


entries/programming/c-to-c++-tutorial.md → blogContent/posts/programming/c-to-c++-tutorial.md View File


entries/programming/media/90703af9527d8d4aecc7eefbda5f049a.png → blogContent/posts/programming/media/90703af9527d8d4aecc7eefbda5f049a.png View File


entries/programming/university-vs-teaching-yourself-programming.md → blogContent/posts/programming/university-vs-teaching-yourself-programming.md View File


entries/programming/using-english-conventions-to-write-clean-code.md → blogContent/posts/programming/using-english-conventions-to-write-clean-code.md View File


entries/programs/installing-all-your-programs-at-once-with-ninite.md → blogContent/posts/programs/installing-all-your-programs-at-once-with-ninite.md View File


entries/programs/media/90e4464eb85c998c8db42c965468aa54.png → blogContent/posts/programs/media/90e4464eb85c998c8db42c965468aa54.png View File


entries/projects/ackermann-function-written-in-java.md → blogContent/posts/projects/ackermann-function-written-in-java.md View File


entries/projects/batch-minecraft-launcher-with-auto-restart.md → blogContent/posts/projects/batch-minecraft-launcher-with-auto-restart.md View File


entries/projects/java-fibonacci-solver.md → blogContent/posts/projects/java-fibonacci-solver.md View File


entries/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png → blogContent/posts/projects/media/088cc48e754c1b99e0fcd5a5eddb9d64.png View File


entries/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg → blogContent/posts/projects/media/09bce0ed13f28db38a141bd10bb096c8.jpg View File


entries/projects/media/09d34d523359111041accf89c82fd6c2.png → blogContent/posts/projects/media/09d34d523359111041accf89c82fd6c2.png View File


entries/projects/media/0b9d25d56269d39f60177b6b29a882da.png → blogContent/posts/projects/media/0b9d25d56269d39f60177b6b29a882da.png View File


entries/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png → blogContent/posts/projects/media/13f1d6d93532bfb23a03a9a4fec5f41b.png View File


entries/projects/media/161edc628257e8a2f92086c5987dcf0f.png → blogContent/posts/projects/media/161edc628257e8a2f92086c5987dcf0f.png View File


entries/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png → blogContent/posts/projects/media/23c6ad380e3224fbcd0c8d28cbecac23.png View File


entries/projects/media/463f2aa188466da8f47309235039250c.jpg → blogContent/posts/projects/media/463f2aa188466da8f47309235039250c.jpg View File


entries/projects/media/50dc96254f26b730e842134db98c9966.jpg → blogContent/posts/projects/media/50dc96254f26b730e842134db98c9966.jpg View File


entries/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg → blogContent/posts/projects/media/5b7a15fd7b5da2939f4e27eae4ceada3.jpg View File


entries/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg → blogContent/posts/projects/media/5ebac37ad45784c31219451d6e4c4504.jpg View File


entries/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg → blogContent/posts/projects/media/81ffef0249da3c1fc077d114fb6beecb.jpg View File


entries/projects/media/ad84021445feb7021f2320f6be599ef5.png → blogContent/posts/projects/media/ad84021445feb7021f2320f6be599ef5.png View File


entries/projects/media/d0888a3222fa328c291629fac491e268.jpg → blogContent/posts/projects/media/d0888a3222fa328c291629fac491e268.jpg View File


entries/projects/media/d3f05acc1973ea938920407511c28bff.png → blogContent/posts/projects/media/d3f05acc1973ea938920407511c28bff.png View File


entries/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg → blogContent/posts/projects/media/f8802f1f71cb433274d265fc81e36fc6.jpg View File


entries/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png → blogContent/posts/projects/media/fc0a0ddf2a914b171bb3a5013e9e7b6c.png View File


entries/projects/media/steam/ben2.png → blogContent/posts/projects/media/steam/ben2.png View File


entries/projects/media/steam/diagram.png → blogContent/posts/projects/media/steam/diagram.png View File


entries/projects/media/steam/jrtechs1.png → blogContent/posts/projects/media/steam/jrtechs1.png View File


entries/projects/media/steam/jrtechs2.png → blogContent/posts/projects/media/steam/jrtechs2.png View File


entries/projects/musical-floppy-drive-build-log.md → blogContent/posts/projects/musical-floppy-drive-build-log.md View File


entries/projects/musical-floppy-drives.md → blogContent/posts/projects/musical-floppy-drives.md View File


entries/projects/steam-friends-graph.md → blogContent/posts/projects/steam-friends-graph.md View File


entries/projects/time-lapse-programming-pong.md → blogContent/posts/projects/time-lapse-programming-pong.md View File


entries/projects/time-lapse-programming-zombie-game.md → blogContent/posts/projects/time-lapse-programming-zombie-game.md View File


entries/web-development/history-of-jrtechs.md → blogContent/posts/web-development/history-of-jrtechs.md View File


entries/web-development/media/0a829ea2071126a5642534f54bc0fe19.png → blogContent/posts/web-development/media/0a829ea2071126a5642534f54bc0fe19.png View File


entries/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg → blogContent/posts/web-development/media/422d949d18969b9b2b8cf754ddc1e779.jpg View File


entries/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png → blogContent/posts/web-development/media/4fcc3a9fe52f7b2e8bc1bfb164846073.png View File


entries/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png → blogContent/posts/web-development/media/55ad5b49fe28c6374968b0f8a5b3e48b.png View File


entries/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg → blogContent/posts/web-development/media/fa157040d5849cc48de1cbec2c67ef69.jpg View File


entries/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png → blogContent/posts/web-development/media/fbd5a1128549b4feb5bafe3595ac1989.png View File


entries/web-development/media/websiteOptimization/finalResults.png → blogContent/posts/web-development/media/websiteOptimization/finalResults.png View File


entries/web-development/media/websiteOptimization/serverCache.png → blogContent/posts/web-development/media/websiteOptimization/serverCache.png View File


entries/web-development/node-vs-php.md → blogContent/posts/web-development/node-vs-php.md View File


entries/web-development/node-website-optimization.md → blogContent/posts/web-development/node-website-optimization.md View File


entries/web-development/why-i-stopped-using-wordpress.md → blogContent/posts/web-development/why-i-stopped-using-wordpress.md View File


+ 0
- 5
generateSitemap View File

@ -1,5 +0,0 @@
#!/bin/bash
#
# 2/21/18 Jeffery Russell
nodejs ./utils/generateSiteMap.js

+ 6
- 3
includes/contact.js View File

@ -117,7 +117,6 @@ const sendEmail = function(name, email, message)
console.log("Message sent: " + response);
}
// if you don't want to use this transport object anymore, uncomment following line
transporter.close(); // shut down the connection pool, no more messages
});
};
@ -139,10 +138,14 @@ const processContactPage = function(request)
{
const data = qs.parse(postData);
if(data.name && data.email && data["g-recaptcha-response"] && data.message)
if(data.name &&
data.email &&
data["g-recaptcha-response"] &&
data.message)
{
verifyCapcha(sanitizer.sanitize(data["g-recaptcha-response"])).then(function(valid)
verifyCapcha(sanitizer.sanitize(data["g-recaptcha-response"]))
.then(function(valid)
{
if(valid)
{

css/bootstrap.css → includes/css/bootstrap.css View File


css/code.css → includes/css/code.css View File


includes/css/minified.css
File diff suppressed because it is too large
View File


css/openSans.woff2 → includes/css/openSans.woff2 View File


includes/css/pure.css
File diff suppressed because it is too large
View File


css/purge.css → includes/css/purge.css View File


downloads/downloads.js → includes/downloads.js View File

@ -3,19 +3,22 @@
including html files easier for me programming.
*/
const Promise = require('promise');
//file IO
const utils = require('../utils/utils.js');
//DB query
const sql = require('../utils/sql');
module.exports=
{
/**
* Processes download url and sends download to user if it
* exists in the database.
*
* @param res
* @param requestURL
* @param request
* @returns {*|Promise}
*/
main: function(res, requestURL)
@ -32,7 +35,8 @@ module.exports=
console.log(result);
if(result.length == 1)
{
const file = './downloads/content/' + result[0].file;
const file = './blogContent/downloads/' +
result[0].file;
res.download(file);
}
else

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save