forked from DemocracyOS/democracyos
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add/projects-page' into development
- Loading branch information
Showing
11 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
"proposal", | ||
"law", | ||
"about", | ||
"projects", | ||
"signin", | ||
"signup", | ||
"forgot", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "projects", | ||
"description": "projects page", | ||
"dependencies": { | ||
"component/bus": "^0.0.2", | ||
"component/dom": "0.7.1", | ||
"visionmedia/page.js": "1.3.7" | ||
}, | ||
"locals": [ | ||
"laws", | ||
"view" | ||
], | ||
"scripts": [ "projects.js", "view.js" ], | ||
"styles": [ "styles.styl" ], | ||
"templates": [ "template.jade" ], | ||
"main": "projects.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var express = require('express'); | ||
var app = module.exports = express(); | ||
|
||
app.get('/', require('lib/layout')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var Projects = require('./view'); | ||
var bus = require('bus'); | ||
var o = require('dom'); | ||
var page = require('page'); | ||
var laws = require('laws'); | ||
|
||
page('/projects', laws.middleware, function(ctx, next) { | ||
bus.emit('page:render'); | ||
|
||
var projects = new Projects(laws.get()); | ||
projects.replace('#content'); | ||
|
||
o(document.body).addClass('projects'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#projects | ||
margin 30px auto | ||
|
||
ul.projects-container | ||
padding 0 | ||
list-style none | ||
|
||
li | ||
margin-bottom 6px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#projects.inner-container | ||
h1=t('projects.title.1') | ||
p=t('projects.paragraph.1.1') | ||
p!=t('projects.paragraph.1.2') | ||
h2=t('projects.title.2') | ||
ul.projects-container | ||
- each project in projects | ||
li.project: a(href='/law/#{project.id}')=project.mediaTitle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var template = require('./template'); | ||
var View = require('view'); | ||
|
||
function Projects(projects) { | ||
if (!(this instanceof Projects)) { | ||
return new Projects(); | ||
} | ||
|
||
View.call(this, template, { projects: projects }); | ||
} | ||
|
||
View(Projects); | ||
|
||
/** | ||
* Expose Projects | ||
*/ | ||
|
||
module.exports = Projects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters