You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.0 KiB

1 year ago
require "phlex"
module RankKing
module Views
class Layout < Phlex::HTML
1 year ago
def initialize(title: nil)
@title = title
1 year ago
end
1 year ago
def template(&block)
1 year ago
doctype
html(lang: "en") do
head do
meta(charset: "utf-8")
meta(name: "viewport", content: "width=device-width, initial-scale=1")
1 year ago
title { ["Rank King", @title].compact.join(" - ") }
1 year ago
end
body do
header do
h1 { "Rank King" }
end
nav
1 year ago
main(&block)
1 year ago
footer
end
end
end
end
class NewPool < Phlex::HTML
1 year ago
def initialize(csrf_token:)
@csrf_token = csrf_token
end
1 year ago
def template
1 year ago
form do
input(type: "hidden", name: "_csrf", value: @csrf_token)
label(for: "name")
input(type: "text", name: "name", id: "name", required: true)
input(type: "submit", value: "Create")
end
1 year ago
end
end
end
end