, server = http.createServer(app); // HTTP server object
// Configuration
-app.set('view engine', 'jade');
+app.set('view engine', 'pug');
app.use('/static', express.static(pub, {maxAge: 2419200000})); // 4 weeks = 2419200000 ms
app.use(favicon(pub + '/img/favicon.ico', {maxAge: 2419200000}));
app.use(banHandler);
*/
var fs = require('fs')
- , jade = require('jade')
+ , pug = require('pug')
, nodemailer = require('nodemailer')
, texttemplate = fs.readFileSync(__dirname + '/template.txt', 'utf-8');
* Generate the HTML version of the message.
*/
-var HTMLMessage = jade.compileFile(__dirname + '/template.jade');
+var HTMLMessage = pug.compileFile(__dirname + '/template.pug');
/**
* Generate the plaintext version of the message.
p To initiate the password reset process for your binb account,
| click the link below:
a(style="color:#0088CC;text-decoration:none;",
- href="https://binb.co/resetpasswd?token=#{token}")
+ href=`https://binb.co/resetpasswd?token=${token}`)
| https://binb.co/resetpasswd?token=#{token}
p If you can't click it, please copy and paste the URL in a new tab/window.
p If you haven't requested a password reset, you can disregard this message,
"express-session": "1.15.x",
"faye-websocket": "0.11.x",
"forwarded-for": "1.0.x",
- "jade": "1.11.x",
"nodemailer": "4.4.x",
"primus": "7.1.x",
"primus-emitter": "3.1.x",
"primus-rooms": "3.4.x",
+ "pug": "2.0.x",
"redis": "2.8.x",
"serve-favicon": "2.4.x",
"uglify-js": "3.3.x"
span.caret
ul.dropdown-menu
li
- a(href="/user/#{loggedin}", target="_blank") Profile
+ a(href=`/user/${loggedin}`, target="_blank") Profile
li
a(href="/logout") Logout
.row
.span12.offset2
form.form-horizontal.well(method="post",
- action="/changepasswd?followup=#{followup}")
+ action=`/changepasswd?followup=${followup}`)
fieldset
- if (locals.errors)
- if (errors.oldpassword)
span.caret
ul.dropdown-menu
li
- a(href="/user/#{loggedin}", target="_blank") Profile
+ a(href=`/user/${loggedin}`, target="_blank") Profile
li
a(href="/changepasswd") Change password
li
.row
.span16
ul.thumbnails
- - each room in rooms
+ each room in rooms
li.span4
a.thumbnail.relative(href=room)
.room #{room} -
.leaderboard-wrapper
table.table.table-striped.table-bordered.leaderboard
tbody
- - each user, i in pointsleaderboard
+ each user, i in pointsleaderboard
tr
td #{i+1}
td
- a(href="/user/#{user.username}") #{user.username}
+ a(href=`/user/${user.username}`) #{user.username}
td #{user.totpoints}
.loading
.loading-block
.leaderboard-wrapper
table.table.table-striped.table-bordered.leaderboard
tbody
- - each user, i in timesleaderboard
+ each user, i in timesleaderboard
tr
td #{i+1}
td
- a(href="/user/#{user.username}") #{user.username}
+ a(href=`/user/${user.username}`) #{user.username}
td
i.icon-time
| #{user.bestguesstime} sec
li
a(href="/") Home
li
- a(href="/signup?followup=#{followup}") Sign up
+ a(href=`/signup?followup=${followup}`) Sign up
li.active
- a(href="/login?followup=#{followup}") Login
+ a(href=`/login?followup=${followup}`) Login
block sections
section
.row
.span3
h3 New user?
- a(href="/signup?followup=#{followup}") Click here to create an account.
+ a(href=`/signup?followup=${followup}`) Click here to create an account.
.span13
- if (locals.errors && errors.alert)
.alert.alert-error
a.close(data-dismiss="alert") ×
strong Well done!
| #{success}
- form.form-horizontal.well(method="post", action="/login?followup=#{followup}")
+ form.form-horizontal.well(method="post", action=`/login?followup=${followup}`)
fieldset
- if (locals.errors)
- if (errors.username)
button.submit-button.btn.btn-primary(type="submit")
i.icon-lock.icon-white
| Login
- a.forgot-passwd(href="/recoverpasswd?followup=#{followup}")
+ a.forgot-passwd(href=`/recoverpasswd?followup=${followup}`)
| Forgot your password?
li
a(href="/") Home
li
- a(href="/signup?followup=#{followup}") Sign up
+ a(href=`/signup?followup=${followup}`) Sign up
li
- a(href="/login?followup=#{followup}") Login
+ a(href=`/login?followup=${followup}`) Login
block sections
section
strong Oh snap!
| #{errors.alert}
form.form-horizontal.well(method="post",
- action="/recoverpasswd?followup=#{followup}")
+ action=`/recoverpasswd?followup=${followup}`)
fieldset
- if (locals.errors)
- if (errors.email)
a.close(data-dismiss="alert") ×
strong Oh snap!
| #{errors.alert}
- form.form-horizontal.well(method="post", action="/resetpasswd?token=#{token}")
+ form.form-horizontal.well(method="post", action=`/resetpasswd?token=${token}`)
fieldset
- if (locals.errors && errors.password)
.control-group.error
i.icon-list-alt.icon-white
| Leaderboards
li.active.dropdown
- a.dropdown-toggle(data-toggle="dropdown",href="#") #{roomname}
+ a.dropdown-toggle(data-toggle="dropdown", href="#") #{roomname}
b.caret
ul.dropdown-menu
- - each room in rooms
+ each room in rooms
- if (room !== roomname)
li
a(href=room)
span.caret
ul.dropdown-menu
li
- a(href="/user/#{loggedin}", target="_blank") Profile
+ a(href=`/user/${loggedin}`, target="_blank") Profile
li
- a(href="/changepasswd?followup=/#{roomname}") Change password
+ a(href=`/changepasswd?followup=/${roomname}`) Change password
li
a(href="/logout") Logout
- else
li
- a(href="/signup?followup=/#{roomname}") Sign up
+ a(href=`/signup?followup=/${roomname}`) Sign up
li
- a(href="/login?followup=/#{roomname}") Login
+ a(href=`/login?followup=/${roomname}`) Login
block sections
section
li
a(href="/") Home
li.active
- a(href="/signup?followup=#{followup}") Sign up
+ a(href=`/signup?followup=${followup}`) Sign up
li
- a(href="/login?followup=#{followup}") Login
+ a(href=`/login?followup=${followup}`) Login
block sections
section
.row
.span3
h3 Not a new user?
- a(href="/login?followup=#{followup}") Click here to log in.
+ a(href=`/login?followup=${followup}`) Click here to log in.
.span13
h3 Why sign up?
p Registration is optional, but if you are a regular user consider creating
a.close(data-dismiss="alert") ×
strong Oh snap!
| #{errors.alert}
- form.form-horizontal.well(method="post",action="/signup?followup=#{followup}")
+ form.form-horizontal.well(method="post", action=`/signup?followup=${followup}`)
fieldset
- if (locals.errors)
- if (errors.username)