From 1c8ecab7cc040196cf585d618b5eb9289a2efbc6 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 5 Jun 2014 15:19:33 -0400 Subject: moving things around --- public/assets/javascripts/app.js | 13 ++- server/index.js | 14 ++- server/lib/auth.js | 2 - server/lib/views.js | 12 +++ views/app.ejs | 205 +++++++++++++++++++++++++++++++++++++++ views/app.html | 205 --------------------------------------- views/edit-profile.ejs | 83 ++++++++++++++++ views/edit-profile.html | 87 ----------------- views/front.html | 61 ------------ views/index.ejs | 56 +++++++++++ views/partials/footer.ejs | 5 + views/profile.ejs | 120 +++++++++++++++++++++++ views/profile.html | 123 ----------------------- views/signed-out.ejs | 32 ++++++ views/signed-out.html | 30 ------ 15 files changed, 529 insertions(+), 519 deletions(-) create mode 100755 views/app.ejs delete mode 100755 views/app.html create mode 100644 views/edit-profile.ejs delete mode 100644 views/edit-profile.html delete mode 100755 views/front.html create mode 100755 views/index.ejs create mode 100644 views/partials/footer.ejs create mode 100644 views/profile.ejs delete mode 100644 views/profile.html create mode 100755 views/signed-out.ejs delete mode 100755 views/signed-out.html diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index 65378ee..ba210b8 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -5,22 +5,23 @@ var is_android = (navigator.userAgent.match(/Android/i)) var is_mobile = is_iphone || is_ipad || is_android; if (is_mobile) { - window.location.href = "mobile.html" + // window.location.href = "mobile.html" } else if ($.browser.msie || ! has3d()) { - window.location.href = "error.html" + // window.location.href = "error.html" } -var scene, - cam, - map; +var scene, cam, map; var viewHeight = window.viewHeight || 150 var app = new function(){} app.init = function () { + app.tube = new Tube () +} +app.launch = function () { var mainbox, coords, box, size, @@ -42,8 +43,6 @@ app.init = function () { cam = scene.camera cam.y = viewHeight - app.tube = new Tube () - if (MX.Map) map = app.map = new MX.Map() movements = app.movements = new MX.Movements(cam, viewHeight) diff --git a/server/index.js b/server/index.js index 1f22d71..0dfb640 100644 --- a/server/index.js +++ b/server/index.js @@ -4,7 +4,12 @@ ejs.open = '[['; ejs.close = ']]'; var config = require('../config.json'), - http = require('http'), + api = require('./lib/api'), + auth = require('./lib/auth'), + middleware = require('./lib/middleware'), + views = require('./lib/views'); + +var http = require('http'), express = require('express'), MongoStore = require('connect-mongo')(express), TwitterStrategy = require('passport-twitter').Strategy, @@ -53,12 +58,13 @@ passport.use(new TwitterStrategy({ consumerKey: process.env.VVALLS_TWITTER_KEY || '0L5blfBIapqhpons8bCXdIoGM', consumerSecret: process.env.VVALLS_TWITTER_SECRET || '5EKW7m7inoODqYSKbp7cadBKFp1FghBl4MBDoXNcUjKtodZfuP', callbackURL: 'http://' + config.host + '/auth/twitter/callback' -}, api.insertUser)); +}, auth.insertUser)); // Essential middleware // app.all('*', middleware.enableCORS); // Initialize views +app.get('/', views.front); app.get('/login', views.login); app.get('/logout', auth.logout); app.get('/auth/twitter', auth.login('twitter')); @@ -66,7 +72,7 @@ app.get('/auth/twitter/callback', auth.loggedIn('twitter')); - +/* io.set('authorization', passportSocketIo.authorize({ cookieParser: express.cookieParser, passport: passport, @@ -91,7 +97,7 @@ function onAuthorizeFail(data, message, error, accept){ // We use this callback to log all of our failed connections. accept(null, false); } - +*/ http.createServer(app).listen(app.get('port'), function () { console.log('Express server listening on port ' + app.get('port')); diff --git a/server/lib/auth.js b/server/lib/auth.js index 93fe223..04ab346 100644 --- a/server/lib/auth.js +++ b/server/lib/auth.js @@ -5,8 +5,6 @@ var passport = require('passport'), config = require('../../config.json'), User = require('./schemas/User'); -var entities = new Entities(); - var auth = { login: function (method) { diff --git a/server/lib/views.js b/server/lib/views.js index 7f3d1a0..ac72def 100644 --- a/server/lib/views.js +++ b/server/lib/views.js @@ -9,3 +9,15 @@ exports.login = function (req, res) { config: config }); }; + +exports.index = function (req, res) { + res.render('index', { + config: config + }) +} + +exports.profile = function (req, res) { + res.render('profile', { + config: config + }) +} diff --git a/views/app.ejs b/views/app.ejs new file mode 100755 index 0000000..c853744 --- /dev/null +++ b/views/app.ejs @@ -0,0 +1,205 @@ + + + + vvalls + [[ include partials/meta ]] + + +
+
+ + + + + + + + +
+
+ Upload File + +
+ ~ or ~
+ +
+
+
+ +
+ +
+

Your MediaFound Media


+

delete media

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + +
+ +
+
+ +

Outline Hue

+
+
+ +

Wall Hue

+
+
+ +

Brightness

+
+
+ +

Shadow

+
+
+ +
+ + + +
+ +
+ +
+ +
+
+ +
+
+
+ + + + + +
+
+
+ +
+ +
+
+ +
+
+ + +[[ include partials/scripts ]] + diff --git a/views/app.html b/views/app.html deleted file mode 100755 index c853744..0000000 --- a/views/app.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - vvalls - [[ include partials/meta ]] - - -
-
- - - - - - - - -
-
- Upload File - -
- ~ or ~
- -
-
-
- -
- -
-

Your MediaFound Media


-

delete media

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
- - - - - - - - -
- -
-
- -

Outline Hue

-
-
- -

Wall Hue

-
-
- -

Brightness

-
-
- -

Shadow

-
-
- -
- - - -
- -
- -
- -
-
- -
-
-
- - - - - -
-
-
- -
- -
-
- -
-
- - -[[ include partials/scripts ]] - diff --git a/views/edit-profile.ejs b/views/edit-profile.ejs new file mode 100644 index 0000000..61bb592 --- /dev/null +++ b/views/edit-profile.ejs @@ -0,0 +1,83 @@ + + + + vvalls + [[ include partials/meta ]] + + +
+ + +
+ +
+ +
    +
  • +

    Edit Profile

    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +

    please choose a picture at least 500px wide

    +
  • +
  • +

    Edit Password

    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • + +
  • + +
  • +
+
+
+ +[[ include partials/footer ]] + +
+ +[[ include partials/scripts ]] + diff --git a/views/edit-profile.html b/views/edit-profile.html deleted file mode 100644 index 2e50458..0000000 --- a/views/edit-profile.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - vvalls - [[ include partials/meta ]] - - -
- - -
- -
- -
    -
  • -

    Edit Profile

    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -

    please choose a picture at least 500px wide

    -
  • -
  • -

    Edit Password

    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • - -
  • - - - -
  • -
-
-
- -
- -[[ include partials/scripts ]] - diff --git a/views/front.html b/views/front.html deleted file mode 100755 index a959e93..0000000 --- a/views/front.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - vvalls - [[ include partials/meta ]] - - - -
- - - - - - - -
-
- Welcome to VVALLS -
- -

Room Showcase

- - - - - - - - - - -
- Pace Gallery • 7.1.14 - - Pace Gallery • 7.1.14 -
- Pace Gallery • 7.1.14 - - Pace Gallery • 7.1.14 -
- - View More - - [[ inclue partials/signin ]] - - - -
- -[[ include partials/scripts ]] - diff --git a/views/index.ejs b/views/index.ejs new file mode 100755 index 0000000..155f2ca --- /dev/null +++ b/views/index.ejs @@ -0,0 +1,56 @@ + + + + vvalls + [[ include partials/meta ]] + + + +
+ + + + + + + +
+
+ Welcome to VVALLS +
+ +

Room Showcase

+ + + + + + + + + + +
+ Pace Gallery • 7.1.14 + + Pace Gallery • 7.1.14 +
+ Pace Gallery • 7.1.14 + + Pace Gallery • 7.1.14 +
+ + View More + + [[ include partials/signin ]] + [[ include partials/footer ]] + +
+ +[[ include partials/scripts ]] + diff --git a/views/partials/footer.ejs b/views/partials/footer.ejs new file mode 100644 index 0000000..f1bd0a8 --- /dev/null +++ b/views/partials/footer.ejs @@ -0,0 +1,5 @@ + diff --git a/views/profile.ejs b/views/profile.ejs new file mode 100644 index 0000000..2865274 --- /dev/null +++ b/views/profile.ejs @@ -0,0 +1,120 @@ + + + + vvalls + [[ include partials/meta ]] + + +
+ + edit profile + + + + + + +
+ + +

Ivan Sidorov

+ + New York City · http://example.com/ · @twitter + +
+ +

Ivan has 4 projects

+ + + + + + + +
+
edit
+
+ X +
+
+
    +
  • +

    Edit Room

    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
  • +
  • + +
    + + + + + +
    +
  • +
  • + + + +
  • +
    +
  • + Clone Project + Delete Project +
  • +
+
+
+
+ Idea for Show +
+
edit
+ Thing I'm Working On +
+
edit
+ Pace Gallery +
+ + + + + +
+
edit
+ Pace Gallery +
+ + create project + + [[ include partials/footer ]] + +
+ + + +[[ include partials/scripts ]] + + diff --git a/views/profile.html b/views/profile.html deleted file mode 100644 index b3f5041..0000000 --- a/views/profile.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - vvalls - [[ include partials/meta ]] - - -
- - edit profile - - - - - - -
- - -

Ivan Sidorov

- - New York City · http://example.com/ · @twitter - -
- -

Ivan has 4 projects

- - - - - - - -
-
edit
-
- X -
-
-
    -
  • -

    Edit Room

    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
  • -
  • - -
    - - - - - -
    -
  • -
  • - - - -
  • -
    -
  • - Clone Project - Delete Project -
  • -
-
-
-
- Idea for Show -
-
edit
- Thing I'm Working On -
-
edit
- Pace Gallery -
- - - - - -
-
edit
- Pace Gallery -
- - create project - - -
- - - -[[ include partials/scripts ]] - - diff --git a/views/signed-out.ejs b/views/signed-out.ejs new file mode 100755 index 0000000..3cdd769 --- /dev/null +++ b/views/signed-out.ejs @@ -0,0 +1,32 @@ + + + + vvalls + [[ include partials/meta ]] + + + +
+ +
+ + + +
+

Roomname, Ivan Sidorov

+

Last modified 3/12/14

+ Nulla vitae elit libero, a pharetra augue. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. +
+ + +
+ + [[ include partials/signin ]] + + +[[ include partials/scripts ]] + diff --git a/views/signed-out.html b/views/signed-out.html deleted file mode 100755 index aff8e26..0000000 --- a/views/signed-out.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - vvalls - [[ include partials/meta ]] - - -
-
- - - -
-

Roomname, Ivan Sidorov

-

Last modified 3/12/14

- Nulla vitae elit libero, a pharetra augue. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. -
- - -
- - [[ include partials/signin ]] - - -[[ include partials/scripts ]] - -- cgit v1.2.3-70-g09d2