Improve author/timestamp
This commit is contained in:
parent
b3166102c7
commit
04b8d90b8f
2 changed files with 9 additions and 6 deletions
|
@ -1 +1,8 @@
|
|||
@import "~tufte-css/tufte.css";
|
||||
|
||||
p.meta {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ class Articles::ShowPage < MainLayout
|
|||
if subtitle = page.subtitle
|
||||
para subtitle, class: "subtitle"
|
||||
end
|
||||
para do
|
||||
text "#{page.author} #{created_at(page.created_at)}"
|
||||
para class: "meta" do
|
||||
text "#{page.author} on #{page.created_at.to_s("%F")}"
|
||||
end
|
||||
article do
|
||||
section do
|
||||
|
@ -19,8 +19,4 @@ class Articles::ShowPage < MainLayout
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def created_at(time : Time) : String
|
||||
"at #{time.to_s("%I:%M%p")} on #{time.to_s("%F")}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue