forked from Jonathan/Peradventure
Worked on Homepage game creation UI
This commit is contained in:
@ -5,7 +5,11 @@
|
||||
<button hx-post="/clickme" hx-target="#clickable">Start</button>
|
||||
</div>
|
||||
<% end %>
|
||||
<article>
|
||||
<article class="container-fluid">
|
||||
<p style="text-align: center;">Game</p>
|
||||
<main style="width: 50%;" class="container" id="map" hx-get="/map/render" hx-trigger="every 1s,load">
|
||||
</main>
|
||||
<div>
|
||||
<% render("views.player_ui") %>
|
||||
</div>
|
||||
</article>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!-- views/index.etlua -->
|
||||
<!DOCTYPE HTML>
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
<% if not isPopulated then %>
|
||||
<div id="clickable">
|
||||
@ -6,15 +7,21 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<a href="/game">Play Now</a>
|
||||
<article style="text-align: center;">
|
||||
<h3>Log In / Create Game</h3>
|
||||
<p>Player will be created if player name does not already exist.</p>
|
||||
<form>
|
||||
<div class="grid">
|
||||
<input type="text" name="playername">
|
||||
<input type="submit" hx-post="/character-create" hx-trigger="click" value="Execute" hx-target="#replace">
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<p id="replace"></p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<a href="/game">Play Now</a>
|
||||
</main>
|
||||
|
||||
<!--
|
||||
<ol>
|
||||
<p><% for i, thing in pairs(text) do %>
|
||||
<li><%= thing %></li>
|
||||
<% end %>
|
||||
</p>
|
||||
</ol>
|
||||
-->
|
||||
<!-- TODO: On player create use Model to make new game_ref and append game_ref to self_session -->
|
||||
|
@ -5,10 +5,11 @@
|
||||
<title><%= page_title or "My Page" %></title>
|
||||
<link rel="stylesheet" href="/static/css/pico/pico.min.css" />
|
||||
<link rel="stylesheet" href="/static/incertitude.css" />
|
||||
<link rel="stylesheet" href="/static/css/pico.colors.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 style="text-align: center; margin-top: 3rem;">Peradventure</h1>
|
||||
<h1 style="text-align: center; margin-top: 3rem;" >Peradventure</h1>
|
||||
<% content_for("inner") %>
|
||||
</body>
|
||||
</html>
|
||||
|
3
views/player_ui.etlua
Normal file
3
views/player_ui.etlua
Normal file
@ -0,0 +1,3 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<p>Look at me!</p>
|
Reference in New Issue
Block a user