Add syntax highlighting, support draft posts
This commit is contained in:
parent
94c692a54c
commit
6fffd6e1cc
16 changed files with 64 additions and 97 deletions
|
@ -8,7 +8,14 @@ class Pages::Post < ::Phlex::HTML
|
|||
render ::Pages::Layout.new({title: meta['title']}) {
|
||||
article(class: 'prose prose-lg m-auto') {
|
||||
h1 { meta['title'] }
|
||||
time(datetime: meta['published_on']) { meta['published_on'] }
|
||||
if meta['published_on']
|
||||
time(datetime: meta['published_on']) { meta['published_on'] }
|
||||
else
|
||||
div(class: 'flex flex-row gap-2 -my-5 items-center') {
|
||||
raw safe(::Util::Heroicons.pencil_square('size-4 block'))
|
||||
p { 'Draft' }
|
||||
}
|
||||
end
|
||||
|
||||
hr
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue