scribe/src/pages/main_layout.cr

31 wiersze
498 B
Crystal
Czysty Zwykły widok Historia

2021-05-01 21:02:08 +00:00
abstract class MainLayout
include Lucky::HTMLPage
abstract def content
abstract def page_title
def page_title
"Welcome"
end
def render
html_doctype
html lang: "en" do
mount Shared::LayoutHead, page_title: page_title
2021-05-01 21:02:08 +00:00
body do
mount Shared::FlashMessages, context.flash
content
end
end
end
2021-10-23 19:34:13 +00:00
private def app_domain
URI.parse(Home::Index.url).normalize
.to_s
.sub(/\/$/, "")
.sub(/^https?:\/\//, "")
end
2021-05-01 21:02:08 +00:00
end