package moe.kageru.kodeshare.pages import io.ktor.html.HtmlContent import io.ktor.http.HttpStatusCode import kotlinx.html.* object Homepage { val content = HtmlContent(HttpStatusCode.OK) { head { defaultHead("Create new paste") } body { a("/about") { div(Css.FLOATY_CLASS) { +"About" } } form("/", encType = FormEncType.multipartFormData, method = FormMethod.post) { acceptCharset = "utf-8" textArea { autoFocus = true name = "input" rows = "20" cols = "100" } p { submitInput { value = "Upload" } } } } } } fun HEAD.defaultHead(title: String) { link(rel = "stylesheet", href = "/style.css", type = "text/css") meta(content = title) { attributes["property"] = "og:title" } meta(content = "kodeshare – a FOSS pastebin alternative") { attributes["property"] = "og:site_name" } meta(name = "theme-color", content = "#66D9EF") }