42 lines
1.3 KiB
Text
42 lines
1.3 KiB
Text
|
|
<html>
|
||
|
|
|
||
|
|
<head>
|
||
|
|
<link rel="stylesheet" href="/css/xp.css">
|
||
|
|
<script src="/js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
|
||
|
|
</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-row flex-grow window-body">
|
||
|
|
<div class="w-1/5 h-full">
|
||
|
|
<%~ include('/workshop/sidebar', it) %>
|
||
|
|
</div>
|
||
|
|
<div id="main-editor" class="flex flex-grow flex-col">
|
||
|
|
<h1>Files</h1>
|
||
|
|
<div>
|
||
|
|
<form hx-encoding='multipart/form-data' hx-post='/workshop/<%= it.structure.id %>/files' hx-target="#files-list" hx-swap="afterbegin" _='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
|
||
|
|
<input type='file' name='file'>
|
||
|
|
<button type="submit">
|
||
|
|
Upload
|
||
|
|
</button>
|
||
|
|
<progress id='progress' value='0' max='100'></progress>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
<div>
|
||
|
|
<ul id="files-list">
|
||
|
|
<% for (let file of it.files) { %>
|
||
|
|
<%~ include('/workshop/file_detail', { file }) %>
|
||
|
|
<% } %>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</body>
|
||
|
|
|
||
|
|
</html>
|