kodeshare/src/main/kotlin/moe/kageru/kodeshare/pages/Homepage.kt

32 lines
951 B
Kotlin

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 {
link(rel = "stylesheet", href = "/style.css", type = "text/css")
meta(content = "Kodeshare – a FOSS pastebin alternative") {
attributes["property"] = "og:title"
}
}
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" }
}
}
}
}
}