131 lines
5.7 KiB
HTML
131 lines
5.7 KiB
HTML
{{ define "main" }}
|
|
<div class="tile is-parent">
|
|
<div class="tile is-child card ">
|
|
<div class="card-content">
|
|
<div class="media-content">
|
|
<p class="title is-4">Monster Form</p>
|
|
</div>
|
|
<div class="content">
|
|
<form hx-post="/loadFile" hx-encoding="multipart/form-data"
|
|
_='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
|
|
<div class="file">
|
|
<label class="file-label">
|
|
<input class="file-input" type="file" name="uploadFile">
|
|
<span class="file-cta">
|
|
<span class="file-icon">
|
|
<i class="fas fa-upload"></i>
|
|
</span>
|
|
<span class="file-label">
|
|
Choose a file…
|
|
</span>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
<div class="field">
|
|
<div class="control">
|
|
<button class="button" type="button" hx-post="/loadFile" hx-trigger="click"
|
|
hx-target="#monster-table" hx-swap="outerHTML">Press Me</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<form action="/submit" method="post" class="">
|
|
<div class="field">
|
|
<td><label for="filename">Filename:</label></td>
|
|
<div class="control"><input type="text" name="filename" required placeholder="Dateiname"
|
|
class="input input-bordered w-full max-w-xs">
|
|
</div>
|
|
</div>
|
|
{{ template "monsterform" . }}
|
|
<div class="field">
|
|
<div class="control">
|
|
<button type="button" hx-post="/addMonster" hx-trigger="click" hx-target="#monster-table"
|
|
hx-swap="outerHTML" class="button is-info" hx-boost="true">Add
|
|
Monster</button>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="filename" value="{{.Filename}}">
|
|
<input type="submit" value="Submit" class="button is-primary">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tile is-parent">
|
|
<div class="tile is-child card">
|
|
<div class="card-content">
|
|
<div class="media-content">
|
|
<p class="title is-4 is-centered">Existing Monsters</p>
|
|
</div>
|
|
<div class="table-container">
|
|
<table class="table">
|
|
<colgroup>
|
|
<col style="width: 100px;">
|
|
<col style="width: 100px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Source</th>
|
|
<th>Size</th>
|
|
<th>Type</th>
|
|
<th>Alignment</th>
|
|
<th>AC</th>
|
|
<th>AC Form</th>
|
|
<th>HP Average</th>
|
|
<th>HP Formula</th>
|
|
<th>Walk</th>
|
|
<th>Swim</th>
|
|
<th>Burrow</th>
|
|
<th>Climb</th>
|
|
<th>Fly</th>
|
|
<th>Str</th>
|
|
<th>Dex</th>
|
|
<th>Con</th>
|
|
<th>Int</th>
|
|
<th>Wis</th>
|
|
<th>Cha</th>
|
|
<th>Save Dex</th>
|
|
<th>Save Con</th>
|
|
<th>Save Wis</th>
|
|
<th>Save Str</th>
|
|
<th>Save Con</th>
|
|
<th>Save Cha</th>
|
|
<th>Perception</th>
|
|
<th>Stealth</th>
|
|
<th>Acrobatics</th>
|
|
<th>AnimalHandling</th>
|
|
<th>Arcana</th>
|
|
<th>Athletics</th>
|
|
<th>Deception</th>
|
|
<th>History</th>
|
|
<th>Insight</th>
|
|
<th>Intimidation</th>
|
|
<th>Investigation</th>
|
|
<th>Medicine</th>
|
|
<th>Nature</th>
|
|
<th>Performance</th>
|
|
<th>Persuasion</th>
|
|
<th>SleightOfHand</th>
|
|
<th>Survival</th>
|
|
<th>Religion</th>
|
|
<th>Damage Resistance</th>
|
|
<th>Damage Immune</th>
|
|
<th>Vulnerable</th>
|
|
<th>Condition Immune</th>
|
|
<th>Senses</th>
|
|
<th>Languages</th>
|
|
<th>CR</th>
|
|
<th>Trait Name</th>
|
|
<th>Trait Entry</th>
|
|
<th>Action Name</th>
|
|
<th>Action Entry</th>
|
|
</tr>
|
|
</thead>
|
|
{{ template "monsterTable" }}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|