empty usercp

This commit is contained in:
Jörn-Michael Miehe 2018-12-27 01:24:14 +01:00
parent 02b4a0a320
commit d8686c94ee
4 changed files with 21 additions and 3 deletions

View file

@ -61,8 +61,9 @@ FFTCGROUTER.post '/login', (req, res) ->
# Templates
FFTCGROUTER.get '/:template.html', (req, res) ->
# redirect logged-in users to user cp
if req.session.user and req.params.template == 'index'
return res.redirect '/game.html'
return res.redirect '/usercp.html'
# render requested template

10
src/usercp.coffee Normal file
View file

@ -0,0 +1,10 @@
# libs
window.$ = require('jquery')
# import bootstrap
require './style/custom.scss'
require 'bootstrap/js/dist/alert'
# on load
$ ->
return

6
views/usercp.pug Normal file
View file

@ -0,0 +1,6 @@
doctype html
html
head
title Crafty Things
script(src='/usercp.bundle.js')
body

View file

@ -4,8 +4,9 @@ module.exports = {
mode: 'development',
entry: {
index: './src/index.coffee',
game: './src/game.coffee'
index: './src/index.coffee',
game: './src/game.coffee',
usercp: './src/usercp.coffee'
},
devtool: 'inline-source-map',