diff --git a/inc/router.coffee b/inc/router.coffee index 2aa0bab..39c8918 100644 --- a/inc/router.coffee +++ b/inc/router.coffee @@ -66,7 +66,6 @@ FFTCGROUTER.get '/:template.html', (req, res) -> if req.session.user and req.params.template == 'index' return res.redirect '/usercp.html' - # render requested template res.render (req.params.template + '.pug'), (err, html) -> # redirect invalid requests to index diff --git a/src/usercp.coffee b/src/usercp.coffee index 04ae91f..aed3b76 100644 --- a/src/usercp.coffee +++ b/src/usercp.coffee @@ -4,6 +4,7 @@ window.$ = require('jquery') # import bootstrap require './style/custom.scss' require 'bootstrap/js/dist/alert' +require 'bootstrap/js/dist/collapse' # on load $ -> diff --git a/views/usercp.pug b/views/usercp.pug index 8eb8ae5..88ce10f 100644 --- a/views/usercp.pug +++ b/views/usercp.pug @@ -4,3 +4,57 @@ html title Crafty Things script(src='/usercp.bundle.js') body + + header.jumbotron.jumbotron-fluid.py-4.bg-primary.text-light.text-center + div.container + h1 Hello World! + h2 App under development, please don't submit any valuable data! + + div.container.bg-light + h3 Yavook!FFTCG + div#alert-area + div.row + div.col-md-8 + h4 My Decks + ul.list-group#my-decks + li.list-group-item + div.align-middle + div.d-inline-block.btn-group(role="group") + button.btn.btn-secondary(data-toggle="collapse" data-target="#modDeck0") Edit + button.btn.btn-secondary#delDeck0 Delete + div.d-inline-block.pl-2 item1 + + form.float-none.collapse#modDeck0(name="modDeck0") + div.form-group + label(for="deck") Decklist: + textarea.form-control.text-monospace(name="deck" required) + + div.form-group + button.btn.btn-primary.w-100(type="submit") Add + + li.list-group-item + div.align-middle + div.d-inline-block.btn-group(role="group") + button.btn.btn-secondary(data-toggle="collapse" data-target="#modDeck1") Edit + button.btn.btn-secondary#delDeck1 Delete + div.d-inline-block.pl-2 item2 + + form.float-none.collapse#modDeck1(name="modDeck1") + div.form-group + label(for="deck") Decklist: + textarea.form-control.text-monospace(name="deck" required) + + div.form-group + button.btn.btn-primary.w-100(type="submit") Add + + div.col-md-4 + h4 New Deck + form(name="addDeck") + div.form-group + label(for="deck") Paste decklist: + textarea.form-control.text-monospace(name="deck" required) + + div.form-group + button.btn.btn-primary.w-100(type="submit") Add + + p Hello