initial commit

This commit is contained in:
Aleks Rūtiņš 2024-09-09 06:52:00 -04:00
commit a7350363be
7 changed files with 77 additions and 0 deletions

7
pages/home.rb Normal file
View 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
View 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