go-urlsh/views/links.tmpl

77 lines
1.8 KiB
Cheetah
Raw Permalink Normal View History

2023-04-28 18:24:09 +02:00
<!DOCTYPE html>
<html lang="en">
2023-04-28 18:24:09 +02:00
<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/pico.min.css">
<link rel="stylesheet" href="/admin/custom.css">
2023-05-05 15:16:54 +02:00
<script src="/admin/main.js" defer></script>
2023-04-28 18:24:09 +02:00
<style>
td {
vertical-align: middle;
text-align: left;
}
2023-04-28 18:24:09 +02:00
</style>
</head>
<body>
2023-05-05 15:16:54 +02:00
<nav class="container-fluid">
<ul>
<li>
<a href="/admin/" class="contrast"><strong>go-urlsh</strong></a>
</li>
</ul>
<ul>
<li>
<a href="/admin/links/new" style="color: greenyellow;">Add new Shortlink</a>
</li>
<li>
<a href="/admin/apikeys/">API Keys</a>
</li>
<li>
<a href="javascript: void(0)" >Users (coming soon)</a>
</li>
<li>
<a href="javascript: Logout()" style="color: red;">Logout</a>
</li>
</ul>
</nav>
<main class="container">
<table class="n-table">
<thead>
<tr>
<th>Shortlink</th>
<th>URL</th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody>
{{range .}}
<tr>
<td><a href="javascript: HandleLinkIndexCopy('{{.ID}}');" data-tooltip="click to copy">{{.ID}}</a></td>
<td><a href="{{.URL}}" target="_blank" {{if .Description}}data-tooltip="{{.Description}}"{{end}}>{{.URL}}</a></td>
<td style="text-align: right;">
<a href="/admin/links/edit/{{.ID}}">
Edit
</a>
</td>
<td style="text-align: right;">
<a href="javascript: HandleLinkIndexDelete('{{.ID}}');">
Delete
</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</main>
{{template "partials/footer" .}}
2023-04-28 18:24:09 +02:00
</body>
</html>