Capture accumulated application, UI, CLI, regression tests and design documentation changes, including task project mapping and default CalDAV list naming. Keep deployment data, backups, local credentials and build artifacts out of Git. Move the Compose enrollment token to an ignored local environment file.
188 lines
2.8 KiB
Go Template
188 lines
2.8 KiB
Go Template
{{ define "link_manager.gohtml" }}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ T "link.title" }}</title>
|
|
<link rel="stylesheet" href="/static/css/main.css">
|
|
<link rel="stylesheet" href="/static/css/modes.css">
|
|
|
|
<link rel="stylesheet" href="/static/css/theme/base.css">
|
|
<link rel="stylesheet" href="{{ .ThemeCSS }}">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header class="topbar">
|
|
|
|
<div class="brand">
|
|
<a href="/">{{ .WikiName }}</a>
|
|
</div>
|
|
|
|
<nav>
|
|
{{ range .NavItems }}
|
|
<a href="{{ .ResolvedHref }}">{{ .Label }}</a>
|
|
{{ end }}
|
|
</nav>
|
|
|
|
{{ template "auth-menu" . }}</header>
|
|
|
|
<main class="container">
|
|
|
|
<section>
|
|
|
|
<h1>{{ T "link.title" }}</h1>
|
|
|
|
<p class="muted">
|
|
{{ T "link.object" }}:
|
|
<code>{{ .ObjectURI }}</code>
|
|
</p>
|
|
|
|
<table class="link-table">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>{{ T "link.primary" }}</th>
|
|
<th>{{ T "link.path" }}</th>
|
|
<th>{{ T "link.linked_at" }}</th>
|
|
<th>{{ T "link.action" }}</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ range .Links }}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
<form method="post" action="/l/uuid:{{ $.ObjectUUID }}">
|
|
<input type="hidden" name="action" value="primary">
|
|
<input type="hidden" name="path" value="{{ .Path }}">
|
|
<input
|
|
type="radio"
|
|
name="primary_display"
|
|
{{ if .IsPrimary }}checked{{ end }}
|
|
onchange="this.form.submit()"
|
|
>
|
|
</form>
|
|
</td>
|
|
|
|
<td>
|
|
<a href="{{ .Path }}">
|
|
{{ .Path }}
|
|
</a>
|
|
</td>
|
|
|
|
<td class="mono">
|
|
{{ formatUnix .CreatedAt }}
|
|
</td>
|
|
|
|
<td>
|
|
<form
|
|
method="post"
|
|
action="/l/uuid:{{ $.ObjectUUID }}"
|
|
onsubmit="return confirm('Delete link?\n\n{{ .Path }}')"
|
|
>
|
|
<input type="hidden" name="action" value="delete">
|
|
<input type="hidden" name="path" value="{{ .Path }}">
|
|
<button type="submit">
|
|
Delete
|
|
</button>
|
|
</form>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<h2>{{ T "link.add_path" }}</h2>
|
|
|
|
<form
|
|
method="post"
|
|
action="/l/uuid:{{ .ObjectUUID }}"
|
|
class="add-link-form"
|
|
>
|
|
|
|
<input type="hidden" name="action" value="add">
|
|
|
|
<input
|
|
name="path"
|
|
type="text"
|
|
placeholder="{{ T "link.placeholder" }}"
|
|
>
|
|
|
|
<button type="submit">
|
|
Add
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<style>
|
|
|
|
.link-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.link-table th {
|
|
text-align: left;
|
|
font-weight: normal;
|
|
color: var(--muted);
|
|
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
padding: 0.45rem 0.35rem;
|
|
}
|
|
|
|
.link-table td {
|
|
border-bottom: 1px solid rgba(255,255,255,0.035);
|
|
padding: 0.38rem 0.35rem;
|
|
}
|
|
|
|
.link-table tr:hover {
|
|
background: rgba(255,255,255,0.025);
|
|
}
|
|
|
|
.add-link-form {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
margin-top: 0.75rem;
|
|
}
|
|
|
|
.add-link-form input[type="text"] {
|
|
flex: 1;
|
|
background: var(--input-bg);
|
|
color: var(--fg);
|
|
border: 1px solid var(--input-border);
|
|
padding: 0.6rem;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.mono {
|
|
font-family:
|
|
"JetBrains Mono",
|
|
monospace;
|
|
}
|
|
|
|
.muted {
|
|
color: var(--muted);
|
|
}
|
|
|
|
button {
|
|
cursor: pointer;
|
|
}
|
|
|
|
</style>
|
|
|
|
</body>
|
|
</html>
|
|
{{ end }}
|