linkstash_server/assets/templates/linkslist.html
2024-09-21 13:37:01 +01:00

46 lines
948 B
HTML

<script src="https://unpkg.com/htmx.org@2.0.2"></script>
<style>
fieldset {
width: 68%;
margin: 0 auto;
border-radius: 1em;
}
table {
font-family: sans-serif;
border: 1px solid darkblue;
border-radius: 1em;
padding: 0 .5em;
width: 70%;
margin: 0 auto;
}
table tr td:nth-child(1) {
width: 2em;
}
table tr td:nth-child(3) {
text-align:right;
width: 10em;
}
table tr:nth-child(even) {
background: rgba(0, 0, 0, .1);
}
</style>
<fieldset>
<legend>Selection stats</legend>
<label>Found: {{total}}</label>
</fieldset>
<table id="linkies">
<tr>
<th>#</th>
<th>Title</th>
<th>Created at</th>
</tr>
{{#each links}}
<tr id="link{{uuid}}">
<td><button hx-confirm="Are you sure?" hx-trigger="click" hx-target="#link{{uuid}}" hx-delete="/link/{{uuid}}" /></td>
<td><a ref="nofollow , noindex" href="{{href}}">{{#if title}}{{title}}{{else}}{{href}}{{/if}}</a></td>
<td>{{created_at}}</td>
</tr>
{{/each}}