diff options
author | Lurifax <stianalexanderolsen@gmail.com> | 2013-05-01 22:20:18 +0200 |
---|---|---|
committer | Lurifax <stianalexanderolsen@gmail.com> | 2013-05-01 22:20:18 +0200 |
commit | 464d4717ace36646db7636f2ebc7701a921c75dd (patch) | |
tree | 670d7fa67e7633ca818cc5b48e8886fab2d6ab3f | |
parent | Changes in text (diff) | |
parent | added generateRandomAccessToken method (diff) | |
download | Divid-464d4717ace36646db7636f2ebc7701a921c75dd.tar.gz |
Changes in text in home.ejs
-rw-r--r-- | app.js | 4 | ||||
-rw-r--r-- | controllers/system.js | 84 | ||||
-rw-r--r-- | models/Access.js | 42 | ||||
-rw-r--r-- | models/Project.js | 67 | ||||
-rw-r--r-- | models/User.js (renamed from models/user.js) | 23 | ||||
-rw-r--r-- | models/project.js | 39 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | public/css/shame.less | 12 | ||||
-rw-r--r-- | public/css/use.less | 61 | ||||
-rw-r--r-- | public/img/androidA.png | bin | 5288 -> 9055 bytes | |||
-rw-r--r-- | public/img/androidA@2x.png | bin | 5059 -> 22383 bytes | |||
-rw-r--r-- | public/img/dashboard.png | bin | 127906 -> 128952 bytes | |||
-rw-r--r-- | public/img/dashboard@2x.png | bin | 339575 -> 342282 bytes | |||
-rw-r--r-- | public/img/dennis.jpg | bin | 0 -> 28716 bytes | |||
-rw-r--r-- | public/img/erling.jpg | bin | 0 -> 30651 bytes | |||
-rw-r--r-- | public/img/iphoneA.png | bin | 4283 -> 9785 bytes | |||
-rw-r--r-- | public/img/iphoneA@2x.png | bin | 5906 -> 27306 bytes | |||
-rw-r--r-- | public/img/par.png | bin | 6545 -> 3453 bytes | |||
-rw-r--r-- | public/img/par@2x.png | bin | 5110 -> 3900 bytes | |||
-rw-r--r-- | public/img/robert.jpg | bin | 0 -> 29892 bytes | |||
-rw-r--r-- | public/img/stian.jpg | bin | 0 -> 23693 bytes | |||
-rw-r--r-- | public/img/winA.png | bin | 5296 -> 6468 bytes | |||
-rw-r--r-- | public/img/winA@2x.png | bin | 4678 -> 16853 bytes | |||
-rw-r--r-- | routes.js (renamed from router.js) | 10 | ||||
-rw-r--r-- | views/contact.ejs | 73 | ||||
-rw-r--r-- | views/dashboard.ejs | 32 | ||||
-rw-r--r-- | views/home.ejs | 26 | ||||
-rw-r--r-- | views/navbar.ejs | 11 | ||||
-rw-r--r-- | views/newproject.ejs | 2 | ||||
-rw-r--r-- | views/project.ejs | 2 | ||||
-rw-r--r-- | views/projectParticipants.ejs | 55 |
31 files changed, 409 insertions, 136 deletions
@@ -20,7 +20,7 @@ mongoose.connect(config.db); var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); db.once('open', function callback(){ - console.log('Connected to MongoDB'); + console.log('Connected to ' + config.db); }); // Bootstrap models @@ -44,7 +44,7 @@ require('./config/express')(app, config, passport); /** * Routes */ -require('./router')(app, passport, auth); +require('./routes')(app, passport, auth); /** diff --git a/controllers/system.js b/controllers/system.js index e3a55bd..a5e8f46 100644 --- a/controllers/system.js +++ b/controllers/system.js @@ -3,9 +3,9 @@ * Module dependencies */ var mongoose = require('mongoose') - , Project = mongoose.model('Project'); - - + , Project = mongoose.model('Project') + , Access = mongoose.model('Access') + , User = mongoose.model('User'); /** @@ -53,12 +53,47 @@ exports.faq = function(req, res) { exports.dashboard = function(req, res) { - console.log('/dashboard - ' + req.user); - res.render('dashboard', { - title: 'kanin', - loggedin: true + console.log('/dashboard - ' + req.user._id); + +/* + Access.find({ user: req.user._id }, function(err, accesses) { + if (err) return res.render('500'); + console.log('accesses ' + accesses); + accesses.forEach(function(access) { + Project.load(access.project, function(err, project) { + if (err) return res.render('500'); + projectList.push(project); + console.log(project.user.username); + }); + }); }); -}; +*/ + Access.loadUser(req.user._id, function(err, projects) { + if (err) return res.render('500'); + Project.populate(projects, { path: 'project.user', model: User }, function(err, projects) { + + console.log('accesses: ' + projects); + + res.render('dashboard', { + title: 'Dashboard', + loggedin: true, + projects: projects + }); + + }); + + }) + +/* + Project.find(function(err, projects) { + if (err) return res.render('500'); + res.render('dashboard', { + title: 'Dashboad', + loggedin: true, + projects: projects + }); + });*/ +} @@ -66,15 +101,44 @@ exports.project = function(req, res) { res.render('project', { title: 'Harepus', loggedin: true }); } +exports.projectParticipants = function(req, res) { + + res.render('projectParticipants', { title: 'Prosjektdeltakere', loggedin: true }); + +} + +exports.postProjectParticipants = function(req, res) { + + + +} + + exports.newProject = function(req, res) { res.render('newproject', { title: 'Nytt prosjekt', loggedin: true }); } exports.postNewProject = function(req, res) { var project = new Project(req.body); + project.user = req.user._id; project.save(function(err) { - if (err) return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true, errors: err.errors, project: project }); - return res.redirect('/dashboard'); + if (err) { + console.log(err.errors); + return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true, errors: err.errors, project: project }); + } }); + + var access = new Access(); + access.user = req.user._id; + access.creator = req.user._id; + access.project = project._id; + access.permissions = 1; + access.save(function(err) { + if (err) { + console.log(err.errors); + return res.render('newproject', { title: 'Nytt prosjekt - en feil oppstod', loggedin: true }); + } + return res.redirect('/dashboard'); + }) } diff --git a/models/Access.js b/models/Access.js new file mode 100644 index 0000000..ce75f8c --- /dev/null +++ b/models/Access.js @@ -0,0 +1,42 @@ + +/** + * Module dependencies + */ + +var mongoose = require('mongoose') + , Schema = mongoose.Schema; + +var AccessSchema = new Schema({ + user: { type: Schema.ObjectId, ref: 'User' }, + creator: { type: Schema.ObjectId, ref: 'User' }, + project: { type: Schema.ObjectId, ref: 'Project' }, + permissions: { type: Number, default: '3' }, + created: { type: Date, default: Date.now }, + updated: { type: Date, default: Date.now } +}); + +// the four validations below only apply if you are signing up traditionally + +AccessSchema.statics = { + + log: function() { + console.log('wat. wat logged this'); + }, + + /** + * Load ALL accesses for a single user + * + * @param {ObjectId} id + * @param {Function} callback + * @api private + */ + + loadUser: function(id, callback) { + this.find({ user: id }) + .populate('project') + .sort({ 'created': -1 }) // sort by date + .exec(callback); + } +} + +mongoose.model('Access', AccessSchema); diff --git a/models/Project.js b/models/Project.js new file mode 100644 index 0000000..f29c7f8 --- /dev/null +++ b/models/Project.js @@ -0,0 +1,67 @@ + +/** + * Module dependencies + */ + +var mongoose = require('mongoose') + , Schema = mongoose.Schema; + +var ProjectSchema = new Schema({ + user: { type: Schema.ObjectId, ref: 'User' }, + name: { type: String, default: '', trim: true }, + description: {type: String, default: '', trim: true }, + currency: { type: String, default: 'kr', trim: true }, + public: { type: String, default: 'invite-only' }, + created: { type: Date, default: Date.now }, + updated: { type: Date, default: Date.now }, + shortURL: { type: String, unique: true } +}); + +// the four validations below only apply if you are signing up traditionally + +ProjectSchema.path('name').validate(function(name) { + // if you're authenticated by any of the oauth strategies (facebook, twitter), don't validate + return name.length; +}, 'Project name cannot be blank'); + + +ProjectSchema.pre('save', function(next) { + if (this.shortURL !== undefined) return next(); + var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; + this.shortURL = ''; + for (var i = 0; i < 6; i++) { + var x = Math.floor(Math.random() * chars.length); + this.shortURL += chars.charAt(x); + } + console.log('SHORT: ' + this.shortURL); + next(); +}); + + + +ProjectSchema.statics = { + + log: function() { + console.log('wat. wat logged this'); + }, + + + + /** + * Find project by id + * + * @param {ObjectId} id + * @param {Function} callback + * @api private + */ + + load: function(id, callback) { + this.findOne({ _id: id }) + .populate('user') + .exec(callback); + } + + +} + +mongoose.model('Project', ProjectSchema); diff --git a/models/user.js b/models/User.js index b61f7c9..4d32941 100644 --- a/models/user.js +++ b/models/User.js @@ -5,7 +5,7 @@ var mongoose = require('mongoose') , Schema = mongoose.Schema - , crypto =require('crypto') + , crypto = require('crypto') , authTypes = ['facebook', 'twitter']; @@ -20,6 +20,7 @@ var UserSchema = new Schema({ provider: String, hashed_password: String, salt: String, + accessToken: String, facebook: {}, twitter: {} }); @@ -98,6 +99,7 @@ UserSchema.methods = { return this.encryptPassword(plainText) === this.hashed_password; }, + /** * Make salt * @@ -109,6 +111,7 @@ UserSchema.methods = { return Math.round((new Date().valueOf() * Math.random())) + ''; }, + /** * Encrypt password * @@ -120,6 +123,24 @@ UserSchema.methods = { encryptPassword: function(password) { if (!password) return ''; return crypto.createHmac('sha1', this.salt).update(password).digest('hex'); + }, + + + /** + * Generate random access token for Remember Me function + * + * @return {String} + * @api public + */ + + generateRandomToken: function() { + var chars = "_!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" + , token = new Date().getTime() + '_'; + for (var i = 0; i < 16; i++) { + var x = Math.floor(Math.random() * 62); + token += chars.charAt(x); + } + return token; } } diff --git a/models/project.js b/models/project.js deleted file mode 100644 index 2424694..0000000 --- a/models/project.js +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * Module dependencies - */ - -var mongoose = require('mongoose') - , Schema = mongoose.Schema; - - - - - -var ProjectSchema = new Schema({ - user: { type: String, ref: 'User' }, - name: { type: String, default: '', trim: true }, - description: {type: String, default: '', trim: true }, - currency: { type: String, default: 'kr', trim: true }, - public: { type: String, default: 'invite-only' }, - created: { type: Date, default: Date.now }, - updated: { type: Date, default: Date.now } -}); - - -// the four validations below only apply if you are signing up traditionally - -ProjectSchema.path('name').validate(function(name) { - // if you're authenticated by any of the oauth strategies (facebook, twitter), don't validate - return name.length; -}, 'Project name cannot be blank'); - -ProjectSchema.methods = { - - log: function() { - console.log('wat. wat logged this'); - } - -} - -mongoose.model('Project', ProjectSchema); diff --git a/package.json b/package.json index c2ca75b..4aabf64 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Divid" , "description": "A bachelorproject ending in a webapplication for social accounting" - , "version": "0.0.2" + , "version": "0.0.3" , "private": true , "engines": { "node": "0.10.x" diff --git a/public/css/shame.less b/public/css/shame.less index 04e4aa6..997409b 100644 --- a/public/css/shame.less +++ b/public/css/shame.less @@ -239,5 +239,15 @@ div.lastactivity .activity .details { } } +#vertical(@startColor: #555, @endColor: #333) { + background-color: mix(@startColor, @endColor, 60%); + background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down +} + -/*@import "use.less";*/ diff --git a/public/css/use.less b/public/css/use.less index 7788aa2..740818f 100644 --- a/public/css/use.less +++ b/public/css/use.less @@ -1,22 +1,10 @@ /*#wrapper { width:100%; background-position: center 40%; -}*/ - -#vertical(@startColor: #555, @endColor: #333) { - background-color: mix(@startColor, @endColor, 60%); - background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ - background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ - background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 - background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10 - background-repeat: repeat-x; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down } - .content { margin-left: 0px; -} +}*/ .pitch { position: relative; margin-left: 10px; @@ -37,18 +25,17 @@ float: left; margin-top: 20px; margin-left: 10px; - margin-right: 0px; + margin-right: 20px; } .sectionright { float: right; - margin-top: 20px; - margin-right: 10px; - margin-left: 0px; + margin: 20px; } .tutorial { padding: 5px; } .infobox { + display: inline-block; text-align: center; /*background-color: @grayLighter;*/ @@ -88,7 +75,7 @@ margin-top:45px; } .showcase { - height: 460px; + /*height: 460px;*/ margin-top: 40px; margin-bottom: 20px; margin-left: 0px; @@ -116,6 +103,7 @@ margin-top:45px; .scenario { margin:60px; +text-align: center; } /* @@ -123,22 +111,23 @@ margin:60px; background-color:@grayLighter; }*/ #hva { - height:460px; + /*height: 460px;*/ + /*margin: 0 auto;*/ margin-top: 25px; /*border-top: 2px solid #9fd5df;*/ - - color: #000000; - background-color: #eeeeee; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - margin: 0 auto; + font-size: 18px; line-height: 26px; display: block; } + +#dildo +{} #hvor { - height:460px; + /*height:460px;*/ margin-top: 25px; /*border-top: 2px solid #9fd5df;*/ @@ -147,13 +136,13 @@ margin:60px; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - margin: 0 auto; + /*margin: 0 auto;*/ font-size: 18px; line-height: 26px; display: block; } #hvordan { - height:460px; + /*height:460px;*/ margin-top: 25px; /*border-top: 2px solid #9fd5df;*/ @@ -162,26 +151,12 @@ margin:60px; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - margin: 0 auto; + /*margin: 0 auto;*/ font-size: 18px; line-height: 26px; display: block; } -#android:hover { -background-image: url('/img/androidA'); -} -img.apple { -background-image: url('/img/iphone'); -z-index:2; -} -img.apple:hover { -background-image: url('/img/iphoneA'); -z-index:1; -} -#windows:hover { -background-image: url('/img/winA'); -} /* #register { height:460px; @@ -193,7 +168,7 @@ background-image: url('/img/winA'); box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); - margin: 0 auto; + /*margin: 0 auto;*/ font-size: 18px; line-height: 26px; display: block; @@ -202,4 +177,4 @@ background-image: url('/img/winA'); background-color: #0D56A6; width:1170px; height:100px; -}*/
\ No newline at end of file +}*/ diff --git a/public/img/androidA.png b/public/img/androidA.png Binary files differindex 75736f3..afb53f9 100644 --- a/public/img/androidA.png +++ b/public/img/androidA.png diff --git a/public/img/androidA@2x.png b/public/img/androidA@2x.png Binary files differindex 5b80fd9..204c8d0 100644 --- a/public/img/androidA@2x.png +++ b/public/img/androidA@2x.png diff --git a/public/img/dashboard.png b/public/img/dashboard.png Binary files differindex 1b82ffc..0fdbc1f 100644 --- a/public/img/dashboard.png +++ b/public/img/dashboard.png diff --git a/public/img/dashboard@2x.png b/public/img/dashboard@2x.png Binary files differindex 4f582b8..b154265 100644 --- a/public/img/dashboard@2x.png +++ b/public/img/dashboard@2x.png diff --git a/public/img/dennis.jpg b/public/img/dennis.jpg Binary files differnew file mode 100644 index 0000000..9e86a1c --- /dev/null +++ b/public/img/dennis.jpg diff --git a/public/img/erling.jpg b/public/img/erling.jpg Binary files differnew file mode 100644 index 0000000..97e499e --- /dev/null +++ b/public/img/erling.jpg diff --git a/public/img/iphoneA.png b/public/img/iphoneA.png Binary files differindex 3d35eaf..0e0399a 100644 --- a/public/img/iphoneA.png +++ b/public/img/iphoneA.png diff --git a/public/img/iphoneA@2x.png b/public/img/iphoneA@2x.png Binary files differindex a341671..e519291 100644 --- a/public/img/iphoneA@2x.png +++ b/public/img/iphoneA@2x.png diff --git a/public/img/par.png b/public/img/par.png Binary files differindex 5b9beb2..3637a8e 100644 --- a/public/img/par.png +++ b/public/img/par.png diff --git a/public/img/par@2x.png b/public/img/par@2x.png Binary files differindex 1797663..6c15675 100644 --- a/public/img/par@2x.png +++ b/public/img/par@2x.png diff --git a/public/img/robert.jpg b/public/img/robert.jpg Binary files differnew file mode 100644 index 0000000..f4c0a69 --- /dev/null +++ b/public/img/robert.jpg diff --git a/public/img/stian.jpg b/public/img/stian.jpg Binary files differnew file mode 100644 index 0000000..2b6ce31 --- /dev/null +++ b/public/img/stian.jpg diff --git a/public/img/winA.png b/public/img/winA.png Binary files differindex b19d985..62bdb33 100644 --- a/public/img/winA.png +++ b/public/img/winA.png diff --git a/public/img/winA@2x.png b/public/img/winA@2x.png Binary files differindex 638145e..cdb2313 100644 --- a/public/img/winA@2x.png +++ b/public/img/winA@2x.png @@ -50,12 +50,18 @@ module.exports = function(app, passport, auth) { */ - app.get('/dashboard', system.dashboard); + app.get('/dashboard', auth.requiresLogin, system.dashboard); app.get('/project', auth.requiresLogin, system.project); app.get('/project/new', auth.requiresLogin, system.newProject); - app.post('/project/new', auth.requiresLogin, system.postNewProject) + app.post('/project/new', auth.requiresLogin, system.postNewProject); + + app.get('/project/:short', auth.requiresLogin, system.project); + + app.get('/project/:short/participants', auth.requiresLogin, system.projectParticipants); + + app.post('/project/:short/participants', auth.requiresLogin, system.postProjectParticipants); }; diff --git a/views/contact.ejs b/views/contact.ejs new file mode 100644 index 0000000..bf43f1c --- /dev/null +++ b/views/contact.ejs @@ -0,0 +1,73 @@ +<% include header %> +<link rel="stylesheet" href="/css/divanim.css"> +<link rel="stylesheet" href="/css/need.css"> +</head> +<body> + + <% include navbar %> + + <!-- Wrapper + ================================================== --> +<div class="container" id="wrapper"> + <div class="row"> + <!-- content + ================================================== --> + <div class="span12 content"> + <div class="container"> + <div class="contact"> + <h1>Kontakt oss</h1> + <h3>Support</h3> + <p>Se gjerne igjennom vår <a href="https://divid.no/faq">faq</a> - ofte stilte spørsmål - før dere sender mail på support(a)divid.no . </a> + <h3>Business</h3> + <p>Ønsker du å kontakte oss for kjøp av annonseplass, forretninger og lignende ta kontakt på pr(a)divid.no.</p> + </div> + <div class="about"> + <h1>Om teamet DERS</h1> + <div class="member"> + <h3>Dennis Eriksen<h3> + <img src="/img/dennis.jpg"> + <p>Alder:</p> + <p>Ifra:Skien</p> + <p>Mobil:</p> + <p>Fokus:</p> + <p>Favoritt ting:Unicorns</p> + </div> + <div class="member"> + <h3>Erling Aaby<h3> + <img src="/img/erling.jpg"> + <p>Alder:</p> + <p>Ifra:Oslo</p> + <p>Mobil:</p> + <p>Fokus:</p> + <p>Favoritt ting:trening</p> + </div> + <div class="member"> + <h3>Robert Joramo<h3> + <img src="/img/robert.jpg"> + <p>Alder:</p> + <p>Ifra:Årnes</p> + <p>Mobil:</p> + <p>Fokus:</p> + <p>Favoritt ting:Fopal</p> + </div> + <div class="member"> + <h3>Stian Olsen<h3> + <img src="/img/stian.jpeg"> + <p>Alder:</p> + <p>Ifra:Trondheim</p> + <p>Mobil:</p> + <p>Fokus:</p> + <p>Favoritt ting:Korboi <3 </p> + </div> + </div> + </div> + </div> + </div><!-- /div.row --> +</div><!-- /div#wrapper --> + <!--<div id="footer"> + <div class="container"> + </div> + </div>--> +<% include footer %> +</body> +</html>
\ No newline at end of file diff --git a/views/dashboard.ejs b/views/dashboard.ejs index 5eca9f1..dfd76f6 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -12,24 +12,26 @@ <div class="smallfullwidth span5"> <h1>Prosjekter</h1> <section class="projects"> - <section class="project"> - <div class="row-fluid"> - <div class="span11"> - <h1><a href="/project">dennisse/<strong>hytteturskogentilfrank</strong></a></h1> - <div class="row-fluid"> - <div class="span8"> - <small>Meg, Robert, Turid-Laila, Kurt, Stian, Aleksander, Frank, Olav, Heidi, Anette, Kristine</small> - </div> - <div class="span4"> - <small>Oppgjør: <span class="text-error">-200 kr</span></small> + <% projects.forEach(function(projects) { %> + <section class="project"> + <div class="row-fluid"> + <div class="span11"> + <h1><a href="/project/<%= projects.project.shortURL %>"><%= projects.project.user.username %>/<strong><%= projects.project.name %></strong></a></h1> + <div class="row-fluid"> + <div class="span8"> + <small>Meg, Robert, Turid-Laila, Kurt, Stian, Aleksander, Frank, Olav, Heidi, Anette, Kristine</small> + </div> + <div class="span4"> + <small>Oppgjør: <span class="text-error">-200 kr</span></small> + </div> </div> </div> + <div class="span1"> + <p>+</p> + </div> </div> - <div class="span1"> - <p>+</p> - </div> - </div> - </section> + </section> + <% }); %> <section class="project"> <div class="row-fluid"> <div class="span11"> diff --git a/views/home.ejs b/views/home.ejs index 4718199..c99c6fb 100644 --- a/views/home.ejs +++ b/views/home.ejs @@ -78,7 +78,6 @@ <img src="/img/flytting.png"> <h4>Parforhold</h4> <p>I etableringsfasen som ønsker å ha ordnet økonomi fra starten av</p> - <p>Hindrer snylting</p> </div> <div class="span2 scenario"> <img src="/img/omsorg.png"> @@ -88,11 +87,6 @@ <p>Hvem betaler hva for hans, hennes og deres barn?</p> <!--<p>klær, mat, reiser, aktiviteter, sport, skolebøker, tannlege, medisiner</p>--!> </div> - <!--<div class="span2 scenario"> - <img src="/img/overwatch.png"> - <h4>Person som vil ha oversikt over tingene sine.</h4> - <p>Ta et bilde med Divid: av gressklippern han lånte bort til naboen, tennisrackettene kompisen hans lånte, eller klær hun har lånt bort til venninner</p> - </div>--!> </div> </div> </div> @@ -109,12 +103,19 @@ <iframe src="http://player.vimeo.com/video/41974181" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> </div> </div> +<<<<<<< HEAD <div class="span5 sectionright"> <a href="https://itunes.apple.com/us/genre/ios-finance/id6015?mt=8" title="Appstore"> <div id="app" class="apple"> <img src="/img/iph.png" class="apple"> </a> <a href="https://play.google.com/store"><img src="/img/android.png" id="android" class="infoimg"></a> <a href="http://www.windowsphone.com/nb-no/store"><img src="/img/win.png" id="windows" class="infoimg"></a> +======= + <div class="span5 sectionright"> + <a href="https://itunes.apple.com/us/genre/ios-finance/id6015?mt=8"><img src="/img/iph.png" onmouseover="this.src='/img/iphoneA.png'" onmouseout="this.src='/img/iph.png'"></a> + <a href="https://play.google.com/store"><img src="/img/android.png" onmouseover="this.src='/img/androidA.png'" onmouseout="this.src='/img/android.png'"></a> + <a href="http://www.windowsphone.com/nb-no/store"><img src="/img/win.png" onmouseover="this.src='/img/winA.png'" onmouseout="this.src='/img/win.png'"></a> +>>>>>>> a935f29043c48063839c5f139dbbde6817b213f6 </div> </div> </div> @@ -124,20 +125,15 @@ <h1>Registrering</h1> <p>"Her skal registreringsformen inn"</p> </div> - <div class="span6 sectionright"> <h1>Divid er enkelt!</h1> <!-- Vi viser deg hvor enkelt det er å bruke Divid.--!> <ul> - <h4><i class="icon-chevron-right icon-white"></i> Vi tar bryet og løser delingen rettferdig</h4> - </br> - <h4><i class="icon-chevron-right icon-white"></i> Divid hjelper deg med å holde oversikt over dine utgifter, utlegg og lån</h4> <!--Ikke la uvissheten om at du glemmer eller manglende tillit til folk hindre deg i dele eller låne.--!> - </br> - <h4><i class="icon-chevron-right icon-white"></i> Hold venner og bekjente oppdatert eller purr de med hva de skylder deg og vice versa</h4> - </br> - <h4><i class="icon-chevron-right icon-white"></i> Ta bilde av kvitteringene eller en utlånt gjenstand med Divid bildebank for senere gjennomsyn</h4><!--Du slipper kvitteringer - ta bilde av de og kast de i søpla. Bildene lastes opp til Divids servere så har du de senere hvis det er bruk for de.--!> + <h3><i class="icon-chevron-right icon-white"></i> Divid tar bryet ut av delingen og løser det rettferdig</h3> + <h3><i class="icon-chevron-right icon-white"></i> Divid hjelper deg med å holde oversikt over dine utgifter, utlegg og lån</h3> <!--Ikke la uvissheten om at du glemmer eller manglende tillit til folk hindre deg i dele eller låne.--!> + <h3><i class="icon-chevron-right icon-white"></i> Hold venner og bekjente oppdatert med hva de skylder deg og vice versa</h3> + <h3><i class="icon-chevron-right icon-white"></i> Ta bilde av kvitteringene eller en utlånt gjenstand så er de tilgjengelig i Divids bildebank for senere gjennomsyn</h3><!--Du slipper kvitteringer - ta bilde av de og kast de i søpla. Bildene lastes opp til Divids servere så har du de senere hvis det er bruk for de.--!> </ul> </div> - </div> </div> </div> diff --git a/views/navbar.ejs b/views/navbar.ejs index 6bc2bbe..9f02e9f 100644 --- a/views/navbar.ejs +++ b/views/navbar.ejs @@ -6,10 +6,10 @@ <div class="container"> <% if (!loggedin) { %> <div class="row-fluid collapse login-collapse"> - <div class="span7"> + <div class="span6"> <!--<img src="/img/logo_white.png">--> </div> - <div class="span5"> + <div class="span6"> <form action="/login" method="post" id="login-form" class="form-horizontal"> <div class="control-group"> <div class="input-prepend"> @@ -31,15 +31,16 @@ </div> <div class="span5"> <button type="submit" class="btn btn-inverse btn-small">Logg inn</button> - <a href="/auth/facebook">f</a> - <a href="/auth/twitter">t</a> </div> </div> + <div class="row-fluid"> + Eller logg inn med <a href="/auth/facebook">facebook</a> / <a href="/auth/twitter">twitter</a> + </div> </form> </div> </div> <% } %> - <div class="row"> + <div class="row-fluid"> <img class="logo" src="/img/dividlogo.png" href="#"> <!--<a class="brand" href="#">Divid</a>--!> <div class="pull-right"> diff --git a/views/newproject.ejs b/views/newproject.ejs index e83673f..5559a9c 100644 --- a/views/newproject.ejs +++ b/views/newproject.ejs @@ -20,7 +20,7 @@ <div class="controls"> <div class="input-prepend"> <span class="add-on">u/fb.dennis.se/</span> - <input id="projectname" name="projectname" placeholder="" class="span12" type="text" required=""> + <input id="projectname" name="name" placeholder="" class="span12" type="text" required=""> </div> <p class="help-block">Navnet på prosjektet du vil lage</p> </div> diff --git a/views/project.ejs b/views/project.ejs index 4bee9fd..e9978d5 100644 --- a/views/project.ejs +++ b/views/project.ejs @@ -35,7 +35,7 @@ Robert Joramo<br /> Dennis Eriksen<br /> Helene Apelort<br /> - <small><a href="/ppl">Legg til flere deltakere</a></small> + <small><a href="/project/fEyMe3/participants">Legg til flere deltakere</a></small> </div> </div> <div class="row-fluid"> diff --git a/views/projectParticipants.ejs b/views/projectParticipants.ejs new file mode 100644 index 0000000..3af9c10 --- /dev/null +++ b/views/projectParticipants.ejs @@ -0,0 +1,55 @@ +<% include header %> + +</head> +<body> + <% include navbar %> + + <!-- Wrapper + ================================================== --> + <div class="container" id="wrapper"> + <div class="row-fluid"> + + + <form class="form-horizontal" method="post"> + <fieldset> + + <h1><legend><%= title %></legend></h1> + <p>Her kan du invitere venner til å delta i prosjektet ditt. Skriv inn eposadressene deres, en på hver linje, i tekstboksen under.</p> + <div class="control-group"> + <label class="control-label">Epostadresser</label> + <div class="controls"> + <textarea id="emails" name="emails" class="span6"></textarea> + </div> + </div> + + <div class="control-group"> + <label class="control-label">Beskrivelse</label> + <div class="controls"> + <textarea id="description" name="description" class="span6">Hei! Jeg har oppdaget et nytt og kult program... Bla bla bla. Stian og Erling fixes.</textarea> + </div> + </div> + + <div class="control-group"> + <label class="control-label"></label> + <div class="controls"> + <button type="submit" id="button1id" name="button1id" class="btn btn-primary">Inviter</button> + <button type="reset" id="button2id" name="button2id" class="btn">Nullstill</button> + </div> + </div> + + </fieldset> + </form> + + + + + + + + </div><!-- /div.row --> + </div><!-- /div.#wrapper --> + + +<% include footer %> +</body> +</html> |