diff options
Diffstat (limited to 'sw-ui-kt/src/main')
-rw-r--r-- | sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/SevenWondersUi.kt | 23 | ||||
-rw-r--r-- | sw-ui-kt/src/main/web/index.html | 3 |
2 files changed, 25 insertions, 1 deletions
diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/SevenWondersUi.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/SevenWondersUi.kt new file mode 100644 index 00000000..5d9d9be6 --- /dev/null +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/SevenWondersUi.kt @@ -0,0 +1,23 @@ +package org.luxons.sevenwonders.ui + +import react.RBuilder +import react.dom.* +import kotlin.browser.document +import kotlin.browser.window + +fun main() { + window.onload = { + render(document.getElementById("root")!!) { + app() + } + } +} + +fun RBuilder.app() = div { + h1 { + +"Seven Wonders" + } + p { + +"Great app!" + } +} diff --git a/sw-ui-kt/src/main/web/index.html b/sw-ui-kt/src/main/web/index.html index 32b449cb..74cac462 100644 --- a/sw-ui-kt/src/main/web/index.html +++ b/sw-ui-kt/src/main/web/index.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> + <link rel="shortcut icon" href="${publicPath}favicon.ico"> <!-- Notice the use of %PUBLIC_URL% in the tag above. It will be replaced with the URL of the `public` folder during the build. @@ -27,5 +27,6 @@ To begin the development, run `npm start`. To create a production bundle, use `npm run build`. --> + <script src="${bundle}"></script> </body> </html> |