Split up the body into 2 divs for mounting the app seperately

This commit is contained in:
Jakub 2026-07-12 21:06:50 +08:00
parent d5673398f7
commit 438ff03826
3 changed files with 12 additions and 7 deletions

View file

@ -1,7 +1,10 @@
(m.mount
document.body
(mithril:comp
(sxml
(main
(h1 "Nitinol App Template")))))
(define repl (mithril:repl "lips> ")
"The LIPS repl component.")
(define app-root (document.querySelector "#app")
"Mount point for the application root. This is where your app should go.")
(m.mount
(document.querySelector "#repl")
repl)

View file

@ -11,6 +11,8 @@
<script type="text/x-scheme">(load "/lib/nitinol/nitinol.scm")</script>
</head>
<body>
<div id="app"></div>
<div id="repl"></div>
<!-- Load main app script. -->
<script type="text/x-scheme" src="/app.scm"></script>
</body>