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
Verdana:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta | |
Liberation Mono:style=Regular | |
Nimbus Sans L:style=Regular Italic | |
Times New Roman:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta | |
Webdings:style=Regular | |
URW Palladio L:style=Roman | |
Century Schoolbook L:style=Bold Italic | |
Verdana:style=Bold Italic,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,Lodi etzana | |
Liberation Sans:style=Regular | |
Georgia:style=Italic,Cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana |
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
Verdana:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta | |
Liberation Mono:style=Regular | |
Nimbus Sans L:style=Regular Italic | |
LMMathSymbols8:style=Regular | |
LMMathSymbols9:style=Regular | |
LMMathSymbols6:style=Regular | |
LMMathSymbols7:style=Regular | |
LMMathSymbols5:style=Regular | |
Times New Roman:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta | |
LMMathItalic9:style=Regular |
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
function(doc) { | |
emit(doc.constituency, doc); | |
} |
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
h1= title | |
#articles | |
- each article in articles | |
div.article | |
div.created_at= article.created_at | |
- var articlelink = 'blog/view/' + article._id; | |
a(href=articlelink) | |
div.title= article.title | |
div.body= article.body | |
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
div.article | |
h1= article.title | |
div.created_at= article.created_at | |
div.body= article.body |
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
app.get('/blog/view/:id', function(req,res){ | |
articleProvider.findById(req.params.id, | |
function(error, doc){ | |
res.render('blog_view', { | |
locals: { | |
title: 'New Post', | |
article: doc | |
} | |
}); | |
}); |
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
var cradle = require('cradle'); | |
ArticleProvider = function(host, port) { | |
this.connection= new (cradle.Connection)(host, port, { | |
cache: true, | |
raw: false | |
}); | |
this.db = this.connection.database('articles'); | |
}; |
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
app.get('/blog/new', function(req,res){ | |
res.render('blog_new', { | |
locals: { | |
title: 'New Post' | |
} | |
}); | |
}); | |
app.post('/blog/new', function(req,res){ | |
articleProvider.save({ |
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
h1= title | |
form( method= 'post' ) | |
div | |
div | |
span Title : | |
input(type='text', name= 'title', id= 'editArticleTitle' ) | |
div | |
span Body : | |
textarea( name= 'body', rows= 20, id= 'editArticleBody' ) | |
div#editArticleSubmit |
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
html | |
head | |
title= title | |
link(rel: 'stylesheet', href: '/style.css' ) | |
body | |
#wrapper | |
!= body |
NewerOlder