diff --git a/routes/public.js b/routes/public.js
index 680f0ef9..778e34c1 100644
--- a/routes/public.js
+++ b/routes/public.js
@@ -137,6 +137,10 @@ module.exports = (app, mongo) => {
res.render(VIEWS + 'public/robots.ejs', { pageName: 'robots.txt' });
});
+ app.get('/zetamac', (req, res) => {
+ res.render(VIEWS + 'public/zetamac.ejs', { isAuthenticated: req.isAuthenticated(), });
+ });
+
// PUBLIC POST
app.post('/register', (req, res, next) => {
req.body.username = req.body.username.toLowerCase();
@@ -400,17 +404,17 @@ module.exports = (app, mongo) => {
app.post('/contact', (req, res) => {
req.isAuthenticated()
? sendDiscordWebhook(
- req.body.comment,
- req.user.username,
- req.user.ign,
- req.body.questionId
- )
+ req.body.comment,
+ req.user.username,
+ req.user.ign,
+ req.body.questionId
+ )
: sendDiscordWebhook(
- req.body.comment,
- 'N/A',
- 'User not signed in.',
- req.body.questionId
- );
+ req.body.comment,
+ 'N/A',
+ 'User not signed in.',
+ req.body.questionId
+ );
req.flash('successFlash', 'Thanks for your feedback!');
if (req.body.redirect) {
res.redirect(req.body.redirect);
diff --git a/views/partials/navigationPrivate.ejs b/views/partials/navigationPrivate.ejs
index 69f0d5a2..ec1d6836 100644
--- a/views/partials/navigationPrivate.ejs
+++ b/views/partials/navigationPrivate.ejs
@@ -42,13 +42,18 @@
-
- About
+
+ References
-
- References
+
+ Zetamac Mode
+
+
+
+
+ About
diff --git a/views/partials/navigationPublic.ejs b/views/partials/navigationPublic.ejs
index f670f96d..6980305e 100644
--- a/views/partials/navigationPublic.ejs
+++ b/views/partials/navigationPublic.ejs
@@ -12,6 +12,11 @@
<%# Right group: search, log in, sign up %>
diff --git a/views/public/zetamac.ejs b/views/public/zetamac.ejs
new file mode 100644
index 00000000..acf9f0c3
--- /dev/null
+++ b/views/public/zetamac.ejs
@@ -0,0 +1,264 @@
+<%- include("../partials/header") -%>
+
+<% if(isAuthenticated) { %>
+ <%- include("../partials/navigationPrivate") -%>
+<% } else { %>
+ <%- include("../partials/navigationPublic") -%>
+<% } %>
+
+
Zetamac on Mutorials
+
+
+
Arithmetic Game
+
+
The Arithmetic Game is a fast-paced speed drill where you are given two minutes to
+ solve as many
+ arithmetic problems as you can.
+
+ <% const CONFIG={ Addition: { symbol: "+" , range: [2, 100] }, Subtraction: {
+ symbol: "-" , range: [2, 100], additionalOptions: [{ name: "allow negative" ,
+ id: "allowNegative" , checked: false, }, { name: "same as Addition" ,
+ id: "sameAsAddition" , checked: true, }] }, Multiplication: { symbol: "×" ,
+ range: [2, 100] }, Division: { symbol: "÷" , range: [2, 100], additionalOptions:
+ [{ name: "same as Multiplication" , id: "sameAsMultiplication" , checked: true,
+ }] } }; %>
+ <% ["Addition", "Subtraction" , "Multiplication" , "Division" ].forEach((op)=> {
+ %>
+
+ <% }); %>
+ time:
seconds
+
+
+
+
+
+
+
Time left: seconds
+
Score: 0
+
Problem:
+
+
+
+
+
+
+
+
Game Over!
+
Your answered questions in
+ seconds
+
+
+
+
+
+
+
+
+
+<%- include("../partials/footer") -%>
\ No newline at end of file