diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/kotlin/moe/nea89/website/App.kt | 26 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea89/website/index.kt | 10 | ||||
-rw-r--r-- | src/main/resources/index.html | 15 |
3 files changed, 51 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea89/website/App.kt b/src/main/kotlin/moe/nea89/website/App.kt new file mode 100644 index 0000000..aa96825 --- /dev/null +++ b/src/main/kotlin/moe/nea89/website/App.kt @@ -0,0 +1,26 @@ +package moe.nea89.website + +import com.bnorm.react.RFunction +import react.RBuilder +import react.dom.li +import react.dom.nav +import react.dom.ul + + +@RFunction +fun RBuilder.App() { + Navigation() +} + +@RFunction +fun RBuilder.Navigation() { + nav { + ul { + li { +"Hehe" } + li { +"Hihi" } + li { +"Hoho" } + li { +"Haha" } + li { +"Huhu" } + } + } +} diff --git a/src/main/kotlin/moe/nea89/website/index.kt b/src/main/kotlin/moe/nea89/website/index.kt new file mode 100644 index 0000000..f10728a --- /dev/null +++ b/src/main/kotlin/moe/nea89/website/index.kt @@ -0,0 +1,10 @@ +package moe.nea89.website + +import kotlinx.browser.document +import react.dom.render +import kotlinext.js.require + +fun main() { + require("@fontsource/comic-mono/index.css") + render(document.getElementById("root") ?: throw RuntimeException("Could not find root element")) { App() } +}
\ No newline at end of file diff --git a/src/main/resources/index.html b/src/main/resources/index.html new file mode 100644 index 0000000..31e2631 --- /dev/null +++ b/src/main/resources/index.html @@ -0,0 +1,15 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" + content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>Nea Moe</title> +</head> +<body> +<noscript>You need to enable JavaScript to run this app.</noscript> +<div id="root"></div > +<script type="text/javascript" src="neamoe.js"></script> +</body> +</html>
\ No newline at end of file |