initial commit
This commit is contained in:
commit
a7350363be
7 changed files with 77 additions and 0 deletions
7
pages/home.rb
Normal file
7
pages/home.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class Pages::Home < ::Phlex::HTML
|
||||
def view_template
|
||||
render ::Pages::Layout.new("Home") {
|
||||
h1 { "Home" }
|
||||
}
|
||||
end
|
||||
end
|
21
pages/layout.rb
Normal file
21
pages/layout.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
module Pages
|
||||
class Layout < ::Phlex::HTML
|
||||
def initialize(title)
|
||||
@title = title
|
||||
end
|
||||
def view_template
|
||||
doctype
|
||||
html {
|
||||
head {
|
||||
title { @title + " | Aleks Rūtiņš" }
|
||||
meta(charset: "utf-8")
|
||||
meta(name: "viewport", content: "width=device-width, initial-scale=1.0")
|
||||
link(rel: "stylesheet", href: "/site.css")
|
||||
}
|
||||
body {
|
||||
yield
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue