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

2 years ago
require "phlex"
module RankKing
module Views
class Layout < Phlex::HTML
2 years ago
def initialize(title: nil)
@title = title
2 years ago
end
2 years ago
def template(&block)
2 years ago
doctype
html(lang: "en") do
head do
meta(charset: "utf-8")
meta(name: "viewport", content: "width=device-width, initial-scale=1")
2 years ago
title { ["Rank King", @title].compact.join(" - ") }
2 years ago
end
body do
header do
h1 { "Rank King" }
end
nav
2 years ago
main(&block)
2 years ago
footer
end
end
end
end
class NewPool < Phlex::HTML
2 years ago
def initialize(csrf_token:)
@csrf_token = csrf_token
end
2 years ago
def template
2 years 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
2 years ago
end
end
end
end