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 # Templates
FFTCGROUTER.get '/:template.html', (req, res) -> FFTCGROUTER.get '/:template.html', (req, res) ->
# redirect logged-in users to user cp
if req.session.user and req.params.template == 'index' if req.session.user and req.params.template == 'index'
return res.redirect '/game.html' return res.redirect '/usercp.html'
# render requested template # 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

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