diff --git a/assets/css/pretendo.css b/assets/css/pretendo.css index e69de29..aea7140 100644 --- a/assets/css/pretendo.css +++ b/assets/css/pretendo.css @@ -0,0 +1,82 @@ +/* + +pretendo.css - +main css file of the pretendo website + +*/ + +/* + +for home page only. +sets the background + +*/ +.hp-background { + + -webkit-filter: grayscale(100%); + filter: grayscale(100%); + min-height: 100%; + min-width: 100%; + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + +} + +/* + +homepage container for the title and stuff + +*/ +.hp-container { + + display: flex; + position: relative; + flex-direction: column; + justify-content: center; + text-align: left; + left: 0%; + z-index: 100; + +} + +/* + +title text + +*/ +.title { + + font-family: "Overpass Mono", monospace; + font-size: 500%; + line-height: 0; + +} + +/* + +main text + +*/ +.text { + + font-family: "Space Mono", monospace; + font-size: 150%; + +} + +/* + +icon + +*/ +.icon { + + position: relative; + height: 10%; + width: 10%; + +} + \ No newline at end of file diff --git a/assets/images/bg.gif b/assets/images/bg.gif new file mode 100644 index 0000000..e7c94c2 Binary files /dev/null and b/assets/images/bg.gif differ diff --git a/routes/account/index.js b/routes/account/index.js deleted file mode 100644 index a8e12e4..0000000 --- a/routes/account/index.js +++ /dev/null @@ -1,28 +0,0 @@ -const router = require('express').Router(); - -/** - * [GET] - * Displays the account web page if user is authenticated, - * and redirects to the login page if not - */ -router.get('/', (req, res) => { - //res.render('account/dashboard'); -}); - -/** - * [GET] - * Displays the login web page - */ -router.get('/login', (req, res) => { - res.render('account/login'); -}); - -/** - * [POST] - * Recieves data from web form - */ -router.post('/login/authenticate', (req, res) => { - -}); - -module.exports = router; diff --git a/routes/home.js b/routes/home.js index fdbb355..0f44c67 100644 --- a/routes/home.js +++ b/routes/home.js @@ -1,11 +1,20 @@ -const router = require('express').Router(); +/* -/** - * [GET] - * Displays the home page - */ +home.js - +file for handling routes. this one's +for routes on the root path + +*/ + +// import express' router +const router = require('express').Router() + +// display home page router.get('/', (req, res) => { - res.render('home'); -}); -module.exports = router; + res.render('home') + +}) + +// export the router +module.exports = router diff --git a/server.js b/server.js index d12a893..89f61de 100644 --- a/server.js +++ b/server.js @@ -1,30 +1,64 @@ -const express = require('express'); -const exphbs = require('express-handlebars'); -const app = express(); -const config = require('./config.json'); -require('colors'); +/* -const ROUTES = { - HOME: require('./routes/home'), - ACCOUNT: require('./routes/account') -}; +server.js - +the file that contains the code to run the server -app.engine('.hbs', exphbs({ - extname: '.hbs', - layoutsDir: 'views', - partialsDir: 'views/partials' -})); -app.set('view engine', '.hbs'); +*/ -app.use('/assets', express.static('assets')); +// module imports, and +// some important variable defs +const express = require("express"), + handlebars = require("express-handlebars"), + config = require("./config.json"), + app = express() -app.use('/account', ROUTES.ACCOUNT); -app.use('/', ROUTES.HOME); +// import the colors module +require("colors") +// locations for some files +const locations = { + + home: require("./routes/home"), + +} + +// load the handlebars module +app.engine(".hbs", handlebars({ + + extname: ".hbs", + layoutsDir: "views", + partialsDir: "views/partials" + +})) + +// set express to use handlebars +// as the templating engine +app.set("view engine", ".hbs") + +// set some routes on the server + +// assets folder serving +app.use("/assets", express.static("assets")) + +// website root +app.use('/', locations.home) + +// send a 404 on a file not +// being found app.use((req, res) => { - res.render('404'); -}); + // set the status to that + // of a 404 + res.status("404") + + // send the 404 template + res.render("404") + +}) + +// start the server app.listen(config.http.port, () => { - console.log('Started '.green + 'on port '.red + new String(config.http.port).yellow); -}); + + console.log(`started the server on port: ${ new String(config.http.port).green }`) + +}) diff --git a/views/404.hbs b/views/404.hbs index 1564ff3..faa5dad 100644 --- a/views/404.hbs +++ b/views/404.hbs @@ -5,7 +5,9 @@ {{> navbar }} - +

haha-yes

+ + file not found! {{> footer }} diff --git a/views/account/dashboard.hbs b/views/account/dashboard.hbs deleted file mode 100644 index 5612c95..0000000 --- a/views/account/dashboard.hbs +++ /dev/null @@ -1,12 +0,0 @@ - - - - {{> head }} - - {{> navbar }} - - - - {{> footer }} - - diff --git a/views/account/login.hbs b/views/account/login.hbs deleted file mode 100644 index 5612c95..0000000 --- a/views/account/login.hbs +++ /dev/null @@ -1,12 +0,0 @@ - - - - {{> head }} - - {{> navbar }} - - - - {{> footer }} - - diff --git a/views/home.hbs b/views/home.hbs index 7409dc9..d81b285 100644 --- a/views/home.hbs +++ b/views/home.hbs @@ -1,12 +1,25 @@ - + + {{> head }} - - {{> navbar }} + + + + + +
+ +

pretendo

+
+ an accurate-as-possible server emulation project for
+ nintendo consoles that use nintendo network +
+ +
- {{> footer }} + diff --git a/views/partials/head.hbs b/views/partials/head.hbs index 45d69a1..fedf273 100644 --- a/views/partials/head.hbs +++ b/views/partials/head.hbs @@ -1,11 +1,13 @@ - + -Pretendo - + + + +pretendo \ No newline at end of file