A small project that collects various nice things to get started with Go Web Development.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<!-- HAS_ALPINE -->
|
|
|
|
|
<script>
|
|
|
|
|
let Data = new PaginateTable("/api/admin/table")
|
|
|
|
|
|
|
|
|
|
$boot(async () => {
|
|
|
|
|
const items = await Data.contents();
|
|
|
|
|
const list = $id('table-list');
|
|
|
|
|
const tmpl = $id('table-row');
|
|
|
|
|
|
|
|
|
|
for(let i in items) {
|
|
|
|
|
$append(list, $render(tmpl, {i, item: items[i]}));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="p-4">
|
|
|
|
|
<h1>Admin Rows</h1>
|
|
|
|
|
|
|
|
|
|
<block>
|
|
|
|
|
<ul id="table-list">
|
|
|
|
|
<template id='table-row'>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="/admin/table/${item}/">
|
|
|
|
|
<span>${item}</span>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
</template>
|
|
|
|
|
</ul>
|
|
|
|
|
</block>
|
|
|
|
|
</div>
|