Fully converted to tailwind now.

This commit is contained in:
Zed A. Shaw 2025-08-11 13:56:06 -04:00
parent 8906322b6d
commit 5da8697759
18 changed files with 386 additions and 122 deletions

View file

@ -2,7 +2,6 @@
let thePage = new PaginateTable("/api/admin/table/{{ .Table }}");
</script>
<blockstart>
<h1><a href="/admin/table/">&laquo;</a> Admin {{ .Table }}</h1>
<block x-data="thePage">
@ -12,15 +11,16 @@
<button type="button" @click="page += 1">Next</button>
<input type="text" x-model.debounce="search_query" name="search" size="40" placeholder="Search" />
</block>
<table>
<tr>
<table class="bg-gray-800 shadow-lg rounded-sm">
<tr class="bg-gray-950 *:border-x *:border-black">
<th>#</th>
<template x-for="header in headers">
<th x-text="header"></th>
</template>
</tr>
<template x-for="item in contents" :key="item.id">
<tr>
<tr class="*:border-2 *:border-black *:p-1 hover:bg-gray-100 hover:text-gray-950">
<td>
<a x-bind:href="'/admin/table/{{ .Table }}/' + item.id + '/'">
#
@ -33,4 +33,3 @@
</template>
</table>
</block>
</blockstart>

View file

@ -2,18 +2,18 @@
let Data = new PaginateTable("/api/admin/table")
</script>
<blockstart>
<h1>Admin Rows</h1>
<div class="p-4">
<h1>Admin Rows</h1>
<block x-data="Data">
<ul>
<template x-for="item in contents">
<li>
<a x-bind:href="`/admin/table/${item}`">
<span x-text="item"></span>
</a>
</li>
</template>
</ul>
</block>
</blockstart>
<block x-data="Data">
<ul>
<template x-for="item in contents">
<li>
<a x-bind:href="`/admin/table/${item}`">
<span x-text="item"></span>
</a>
</li>
</template>
</ul>
</block>
</div>

View file

@ -2,7 +2,6 @@
let Data = new GetJson("/api/admin/new/table/{{ .Table }}");
</script>
<blockstart>
<h1><a href="/admin/table/{{ .Table }}/">&laquo;</a>Admin {{ .Table }}</h1>
<block x-data="Data">
@ -18,13 +17,10 @@
</template>
</middle>
<bottom>
<button-group>
<button type="button"><a href="/admin/table/{{ .Table }}/">Back</a></button>
<button type="submit">Insert</button>
<button type="button">Clear</button>
</button-group>
<button class="hover:btn-alert" type="button">Clear</button>
<button class="hover:btn-hover" type="submit">Insert</button>
</bottom>
</card>
</form>
</block>
</blockstart>

View file

@ -2,7 +2,6 @@
let Data = new GetJson("/api/admin/table/{{ .Table }}/{{ .Id }}");
</script>
<blockstart>
<h1><a href="/admin/table/{{ .Table }}/">&laquo;</a>Admin {{ .Table }}</h1>
<block x-data="Data">
@ -18,13 +17,10 @@
</template>
</middle>
<bottom>
<button-group>
<button type="button"><a href="/admin/table/{{ .Table }}/">Back</a></button>
<button type="submit">Update</button>
<button type="button" @click.prevent="ConfirmDelete('{{ .Table }}', item.id)">Delete</button>
</button-group>
<button type="button"><a href="/admin/table/{{ .Table }}/">Back</a></button>
<button class="hover:btn-alert" type="button" @click.prevent="ConfirmDelete('{{ .Table }}', item.id)">Delete</button>
<button class="hover:btn-hover" type="submit">Update</button>
</bottom>
</card>
</form>
</block>
</blockstart>