summaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea89/website
diff options
context:
space:
mode:
authornea <romangraef@loves.dicksinhisan.us>2021-12-06 22:58:45 +0100
committernea <romangraef@loves.dicksinhisan.us>2021-12-06 22:58:45 +0100
commit6b44e60fc4efc23a30f16492bf9dc17aa30b66c5 (patch)
tree49af50b6260af48dc43c54fb1dd1dcb2a82dbd51 /src/main/kotlin/moe/nea89/website
downloadneamoe-6b44e60fc4efc23a30f16492bf9dc17aa30b66c5.tar.gz
neamoe-6b44e60fc4efc23a30f16492bf9dc17aa30b66c5.tar.bz2
neamoe-6b44e60fc4efc23a30f16492bf9dc17aa30b66c5.zip
Awful react version
Diffstat (limited to 'src/main/kotlin/moe/nea89/website')
-rw-r--r--src/main/kotlin/moe/nea89/website/App.kt26
-rw-r--r--src/main/kotlin/moe/nea89/website/index.kt10
2 files changed, 36 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