23 lines
402 B
Crystal
23 lines
402 B
Crystal
class Articles::ShowPage < MainLayout
|
|
needs page : Page
|
|
|
|
def page_title
|
|
page.title
|
|
end
|
|
|
|
def content
|
|
h1 page.title
|
|
if subtitle = page.subtitle
|
|
para subtitle, class: "subtitle"
|
|
end
|
|
para class: "meta" do
|
|
text "#{page.author} on #{page.created_at.to_s("%F")}"
|
|
end
|
|
article do
|
|
section do
|
|
mount PageContent, page: page
|
|
end
|
|
end
|
|
end
|
|
end
|