forked from Jonathan/Peradventure
working version with /game
This commit is contained in:
parent
a3efe2369d
commit
ba73d8f3b6
8
app.lua
8
app.lua
@ -30,6 +30,14 @@ app:get("/", function(self)
|
|||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
app:get("/game", function(self)
|
||||||
|
self.text = say.hello()
|
||||||
|
self.isPopulated = mapFunc:mapExists(map)
|
||||||
|
return { render = "game",
|
||||||
|
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
app:match("/map/render", function(self)
|
app:match("/map/render", function(self)
|
||||||
self.tiles = {}
|
self.tiles = {}
|
||||||
for h = 1, 10 do
|
for h = 1, 10 do
|
||||||
|
6
views/game.etlua
Normal file
6
views/game.etlua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<script src="/static/htmx.min.js"></script>
|
||||||
|
<article>
|
||||||
|
<p style="text-align: center;">Game</p>
|
||||||
|
<main style="width: 50%;" class="container" id="map" hx-get="/map/render" hx-trigger="every 1s,load">
|
||||||
|
</article>
|
Loading…
Reference in New Issue
Block a user