implement tips for loading screen (#7632)

* implement tips for loading screen

* fix typo in tip 22
This commit is contained in:
Matteo Pagliazzi
2016-06-10 12:25:09 +02:00
committed by GitHub
parent a90d0f9233
commit efeb2c1c8e
4 changed files with 56 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ const md = markdownIt({
let api = {};
const TOTAL_USER_COUNT = '1,100,000';
const LOADING_SCREEN_TIPS = 32;
api.getFrontPage = {
method: 'GET',
@@ -23,6 +24,7 @@ api.getFrontPage = {
return res.render('index.jade', {
title: 'Habitica | Your Life The Role Playing Game',
env: res.locals.habitrpg,
loadingScreenTip: Math.floor(Math.random() * LOADING_SCREEN_TIPS) + 1, // Random tip between 1 and LOADING_SCREEN_TIPS
});
},
};