Fix stylesheet order (because that seems to matter)

This commit is contained in:
kageru 2020-03-12 11:14:36 +01:00
parent dfe048bac2
commit fc88a90703
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import moe.kageru.kodeshare.config.ServerSpec
import moe.kageru.kodeshare.config.config
object AboutPage {
private val domain = "${config[ServerSpec.domain]}"
private val domain = config[ServerSpec.domain]
val content = HtmlContent(HttpStatusCode.OK) {
head {
defaultHead("About kodeshare")

View File

@ -6,14 +6,13 @@ import kotlinx.html.*
object PastePage {
fun build(content: String, uri: String, type: String?) = HtmlContent {
head {
link(rel = "stylesheet", href = "/style.css", type = "text/css")
defaultHead("View paste $uri${type?.let { " (type $it)" } ?: ""}")
link(
rel = "stylesheet",
href = "https://p.kageru.moe/static/hljs.css",
type = "text/css"
)
script(src = "https://p.kageru.moe/static/hl.js") {}
defaultHead("View paste $uri${type?.let { " (type $it)" } ?: ""}")
// Show the first 3 lines in preview/embed for applications like discord, slack, or skype
meta(content = content.lines().take(3).joinToString("\n")) {
attributes["property"] = "og:description"