ekzyis 845157c954 Add market form + page
* market form with question, description and end date
* markets cost 1k sats
* a goroutine polls pending invoices from the db and checks LND for their status
* markets are listed on front page (after paid)
* market page contains buttons to bet yes or no
* users have names now

TODO:
* show correct market percentage
* show how percentage changed over time in chart
* validate end date
* implement betting / order form
2024-08-24 02:35:15 -05:00

29 lines
690 B
Plaintext

package components
templ Modal(component templ.Component) {
if component != nil {
<div
id="modal"
class="fixed left-0 top-0 w-screen h-screen"
>
<div
class="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
>
<div class="flex justify-center p-3 w-screen">
@component
</div>
<script type="text/javascript">
var $ = selector => document.querySelector(selector)
$("#close").addEventListener("click", function () {
$("#modal").removeAttribute("class")
$("#modal").setAttribute("class", "hidden")
$("#modal").innerHTML = ""
})
</script>
</div>
</div>
} else {
<div id="modal" class="hidden"></div>
}
}