Add home page

This commit is contained in:
Edward Loveall 2021-09-06 13:38:18 -04:00
parent 04b8d90b8f
commit 0cab1a11ed
No known key found for this signature in database
GPG Key ID: 789A4AE983AC8901
2 changed files with 40 additions and 1 deletions

View File

@ -1,5 +1,5 @@
class Home::Index < BrowserAction
get "/" do
html Lucky::WelcomePage
html Home::IndexPage
end
end

View File

@ -0,0 +1,39 @@
class Home::IndexPage < MainLayout
def page_title
"Scribe"
end
def content
post_id = "92f4e0bb9f53"
post_slug = "my-post-#{post_id}"
h1 "Scribe"
h2 "How-To"
article do
section do
para "To view a medium post, you need the last part of the post's URL."
para do
text "For example if the URL is: "
code "medium.com/@user/#{post_slug}"
text " or "
code "user.medium.com/#{post_slug}"
text " or "
code "somewebsite.com/blog/#{post_slug}"
end
para do
text " take "
code post_slug
text " and add it on to the end of Scribe's post URL: "
end
para do
code Articles::Show.with(post_slug: post_slug).url
end
end
section do
para do
text "Hint: If you're feeling lazy, the URL only needs to be the nonsense at the end of the post URL. E.g. "
code Articles::Show.with(post_slug: post_id).url
end
end
end
end
end