Skip to content

Commit

Permalink
Better layout
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Sep 8, 2023
1 parent 908f918 commit 4a23e04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/resources/templates/Todos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
{/if}
</td>
<td>
{#form uri:Todos.done(todo.id) klass="inline"}
{#form uri:Todos.done(todo.id) class="inline"}
{#if todo.done}
<button type="submit" class="btn btn-warning"><i class="bi-arrow-counterclockwise"></i> Mark Undone</button>
<button type="submit" class="btn btn-warning" title="Mark as undone"><i class="bi-arrow-counterclockwise"></i></button>
{#else}
<button type="submit" class="btn btn-success"><i class="bi-check"></i> Mark Done</button>
<button type="submit" class="btn btn-success" title="Mark as done"><i class="bi-check"></i></button>
{/if}
{/form}
{#form uri:Todos.delete(todo.id) klass="inline"}
<button type="submit" class="btn btn-danger"><i class="bi-trash"></i> Delete</button>
{#form uri:Todos.delete(todo.id) class="inline"}
<button type="submit" class="btn btn-danger" title="Delete"><i class="bi-trash"></i></button>
{/form}
</td>
</tr>
Expand All @@ -38,7 +38,7 @@
<th scope="row">New</th>
<td>
{#form uri:Todos.add()}
{#input name="task" placeholder="Type task and press ENTER"/}
{#input name="task" placeholder="Type task and press ENTER" autofocus=true/}
{/form}
</td>
<td></td>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/tags/input.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<input name="{name}"
type="{type ?: 'text'}"
{#if placeholder??}placeholder="{placeholder}"{/if}
{#if autofocus??}autofocus{/if}
{#if id??}id="{id}"{/if}
class="form-control {#ifError name}is-invalid{/ifError}"
maxlength="{VARCHAR_SIZE}"
Expand Down

0 comments on commit 4a23e04

Please sign in to comment.