diff options
Diffstat (limited to 'src/main/kotlin/moe/nea89/website/index.kt')
-rw-r--r-- | src/main/kotlin/moe/nea89/website/index.kt | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/main/kotlin/moe/nea89/website/index.kt b/src/main/kotlin/moe/nea89/website/index.kt index f10728a..8496b3a 100644 --- a/src/main/kotlin/moe/nea89/website/index.kt +++ b/src/main/kotlin/moe/nea89/website/index.kt @@ -1,10 +1,28 @@ package moe.nea89.website -import kotlinx.browser.document -import react.dom.render import kotlinext.js.require +import kotlinx.browser.document +import kotlinx.html.dom.append +import kotlinx.html.js.div +import styled.injectGlobal fun main() { require("@fontsource/comic-mono/index.css") - render(document.getElementById("root") ?: throw RuntimeException("Could not find root element")) { App() } + injectGlobal(Styles.global) + val root = document.body!!.append.div() + val console = KConsole.createFor(root) + console.registerCommand(object : Command { + override val name: String = "dick" + override val aliases: Set<String> = setOf("cock") + override fun run(console: KConsole, name: String, args: List<String>) { + console.addMultilineText("Hehe") + } + }) + console.registerCommand(object : Command { + override val name: String = "booob" + override val aliases: Set<String> = setOf("boob") + override fun run(console: KConsole, name: String, args: List<String>) { + console.addMultilineText(boobs) + } + }) }
\ No newline at end of file |