From 6baba803091e7f00bbe9c4555de3ffdb821295be Mon Sep 17 00:00:00 2001 From: Edward Loveall Date: Sun, 15 Aug 2021 15:01:18 -0400 Subject: [PATCH] Display title and subtitle Also wrap the content in an article for semantic formatting tufte.css requires that content is wrapped in an
and at least one
. There's no way of determining new semantic sections so there is only one. --- src/pages/articles/show_page.cr | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/articles/show_page.cr b/src/pages/articles/show_page.cr index c5c2b0e..1d81fbf 100644 --- a/src/pages/articles/show_page.cr +++ b/src/pages/articles/show_page.cr @@ -2,6 +2,14 @@ class Articles::ShowPage < MainLayout needs page : Page def content - mount PageContent, page: page + h1 page.title + if subtitle = page.subtitle + para subtitle, class: "subtitle" + end + article do + section do + mount PageContent, page: page + end + end end end