added article

This commit is contained in:
2013-01-16 20:44:56 -05:00
parent ef1226aef6
commit a899234e21
44 changed files with 16300 additions and 20 deletions

View File

@@ -0,0 +1,13 @@
h1= article.title
div!= article.body
hr
p
span Author:
 
a(href="/users/" + encodeURIComponent(article.author.username))= article.author.full_name
p
a(href="/articles") Back to all articles

View File

@@ -0,0 +1,15 @@
h1 Articles
p
a(href="/articles/new") Create new article
p!= partial('articles/list', {articles: articles})
- if (page > 0) {
a(href="?page=" + (page - 1)) Previous
 
- }
- if (! lastPage) {
a(href="?page=" + (page + 1)) Next
- }

View File

@@ -0,0 +1,5 @@
ul
- articles.forEach(function(article) {
li
a(href="/articles/" + encodeURIComponent(article.title))= article.title
- });

View File

@@ -0,0 +1,11 @@
h1 New Article
form(method="POST", action="/articles")
p
label(for="title") Title<br />
input#title(name="title")
p
label(for="body") Body<br />
textarea#body(name="body")
p
input(type="submit", value="Create")