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

32 lines
924 B
Kotlin
Raw Normal View History

2019-09-22 18:26:28 +02:00
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")
2019-09-29 08:17:31 +02:00
unsafe {
+"<style>:not(textarea){transition-duration: 400ms;}</style>"
2019-09-29 08:17:31 +02:00
}
2019-09-22 18:26:28 +02:00
}
body {
2019-09-29 11:50:14 +02:00
a("/about") { div(Css.FLOATY_CLASS) { +"About" } }
2019-09-22 18:26:28 +02:00
form("/", encType = FormEncType.multipartFormData, method = FormMethod.post) {
acceptCharset = "utf-8"
textArea {
2019-09-29 11:50:14 +02:00
autoFocus = true
2019-09-22 18:26:28 +02:00
name = "input"
rows = "20"
cols = "100"
}
p {
submitInput { value = "Upload" }
}
}
}
}
2019-09-29 17:18:38 +02:00
}