This commit is contained in:
HRG @ SCExC 2024-02-24 11:12:14 -05:00
parent f370a2fe68
commit e335c65506
21 changed files with 33471 additions and 86 deletions

12
views/auth/login.eta Normal file
View file

@ -0,0 +1,12 @@
<form action="/login" method="POST">
<input name="username" placeholder="username">
<input name="password" placeholder="password">
<button type="submit">
come home
</button>
<% if (error) { %>
<%= error %>
<% } %>
<br>
<div> or you can <a href="/register">move in here</a>.
</form>

10
views/auth/register.eta Normal file
View file

@ -0,0 +1,10 @@
<form action="/register" method="POST">
<input name="username" placeholder="username">
<input name="password" placeholder="password">
<button type="submit">
move in
</button>
<% if (error) { %>
<%= error %>
<% } %>
</form>

0
views/index.html Normal file
View file

29
views/workshop/editor.eta Normal file
View file

@ -0,0 +1,29 @@
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/xp.css">
</head>
<body>
<div class="flex flex-col w-full h-full window">
<div class="title-bar">
<div class="title-bar-text">Workshop - <%- include('/workshop/structure_name', {structure: it.structure}) %>
</div>
</div>
<div class="flex flex-grow window-body">
<div id="left-pane" class="flex w-1/2 bg-blue-500 h-full">
<div id="toggle" class="w-1/5 bg-red-500 h-full">
<%- include('/workshop/sidebar') %>
</div>
<div id="code-area" class="flex-grow bg-black h-full">
</div>
</div>
<div id="preview-area" class="w-1/2 bg-green-500 h-full">
</div>
</div>
</div>
</body>
</html>

24
views/workshop/index.eta Normal file
View file

@ -0,0 +1,24 @@
<html>
<head>
<script src="https://unpkg.com/htmx.org"></script>
<script src="https://unpkg.com/hyperscript.org"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<button _="on click toggle .hidden on #new-structure">+ new structure</button>
<div id="new-structure" class="hidden">
<form action="/workshop" method="POST">
<label for="name">come up with a name for your structure and enter it here.</label>
<input name="name">
<button type="submit">
erect structure
</button>
</form>
</div>
<% structures.map(structure => { %>
<a href="/workshop/<%= structure.id %>">
<%= structure.name %>
</a>
<% }) %>
</body>
</html>

View file

@ -0,0 +1 @@
sdf

View file

@ -0,0 +1,2 @@
<div id="name" _="">structure<%= it.structure.name %><div _="on click toggle .hidden on me then toggle .hidden on the next <div/>">✎</div></div>
<div class="hidden" _=""><input placeholder="structure name" value="<%= it.structure.name %>"></div>