package moe.kageru.kodeshare.pages import io.ktor.html.HtmlContent import kotlinx.html.* object PastePage { fun build(content: String, type: String?) = HtmlContent { head { link(rel = "stylesheet", href = "/style.css", type = "text/css") link( rel = "stylesheet", href = "https://p.kageru.moe/static/hljs.css", type = "text/css" ) script(src = "https://p.kageru.moe/static/hl.js") {} unsafe { +"" +"" } } body { pre { code(classes = type) { +content } } a("/") { div(Css.FLOATY_CLASS) { +"New paste" } } } } }