Skip to content

Commit

Permalink
close #74 titling blog pages
Browse files Browse the repository at this point in the history
  • Loading branch information
TangentFoxy committed Oct 1, 2016
1 parent a1356ac commit e4cbdc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blog.moon
Expand Up @@ -121,6 +121,7 @@ class extends lapis.Application
unless @session.id and (Users\find id: @session.id).admin
return redirect_to: @url_for "blog_index"

@title = "New Post"
@html ->
link rel: "stylesheet", href: @build_url "static/simplemde/simplemde.min.css"
script src: @build_url "static/simplemde/simplemde.min.js"
Expand Down Expand Up @@ -197,6 +198,7 @@ class extends lapis.Application
return redirect_to: @url_for "blog_index"

if post = Posts\find slug: @params.slug
@title = "Editing #{post.title}"
@html ->
link rel: "stylesheet", href: @build_url "static/simplemde/simplemde.min.css"
script src: @build_url "static/simplemde/simplemde.min.js"
Expand Down Expand Up @@ -317,6 +319,7 @@ class extends lapis.Application

posts = Posts\select "WHERE true ORDER BY pubdate ASC"

@title = "Drafts"
@html ->
p ->
a class: "pure-button", href: @url_for("blog_index"), "Return to Blog"
Expand Down

0 comments on commit e4cbdc6

Please sign in to comment.