go-urlsh/views/links.tmpl

57 lines
1.4 KiB
Cheetah
Raw Normal View History

2023-04-28 18:24:09 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Shortlinks - go-urlsh</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="stylesheet" href="/admin/style.css">
<style>
td { vertical-align: middle; }
</style>
</head>
<body>
2023-04-28 23:39:02 +02:00
<a href="/admin/links/new"><button type="button" id="add-new-button">Add new Shortlink</button></a>
2023-04-28 18:24:09 +02:00
<table>
<thead>
<tr>
<th>Shortlink</th>
<th>URL</th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody>
{{range .}}
<tr>
2023-04-28 23:39:02 +02:00
<td><a href="#" onclick="HandleCopy('{{.ID}}')">{{.ID}}</a></td>
<td><a href="{{.URL}}" target="_blank">{{.URL}}</a></td>
2023-04-28 18:24:09 +02:00
<td style="text-align: right;">
<button type="button" id="edit-button" onclick="HandleEdit('{{.ID}}')">
Edit
</button>
</td>
<td style="text-align: right;">
<button type="button" id="delete-button" onclick="HandleDelete('{{.ID}}')">
Delete
</button>
</td>
</tr>
{{end}}
</tbody>
</table>
<footer>
2023-04-28 23:39:02 +02:00
<p>go-urlsh - <a href="/admin/">Home</a> -
2023-04-28 18:24:09 +02:00
<a href="https://codeberg.org/lauralani/go-urlsh" target="_blank">Source Code</a> -
<a href="https://codeberg.org/lauralani/go-urlsh/src/branch/main/LICENSE" target="_blank">License</a>
</p>
</footer>
2023-04-28 23:39:02 +02:00
<script src="/admin/links.js"></script>
2023-04-28 18:24:09 +02:00
</body>
</html>