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.
159 lines
2.7 KiB
Go Template
159 lines
2.7 KiB
Go Template
{{ define "markdown_view.gohtml" }}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Markdown - {{ .Path }}</title>
|
|
|
|
<link rel="stylesheet" href="/static/css/main.css">
|
|
<link rel="stylesheet" href="/static/css/theme/base.css">
|
|
<link rel="stylesheet" href="{{ .ThemeCSS }}">
|
|
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-tomorrow.min.css"
|
|
>
|
|
|
|
<style>
|
|
.markdown-view {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.markdown-toolbar {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
margin-bottom: 0.75rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.markdown-path {
|
|
color: var(--muted);
|
|
font-family: "JetBrains Mono", monospace;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.markdown-source {
|
|
border: 1px solid var(--border-soft);
|
|
background: var(--input-bg);
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-line {
|
|
display: grid;
|
|
grid-template-columns: 4.5rem 1fr;
|
|
min-height: 1.35rem;
|
|
font-family: "JetBrains Mono", monospace;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.markdown-line-no {
|
|
color: var(--muted);
|
|
text-align: right;
|
|
padding: 0.1rem 0.75rem;
|
|
border-right: 1px solid var(--border-soft);
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-line-code {
|
|
white-space: pre;
|
|
padding: 0.1rem 0.75rem;
|
|
}
|
|
|
|
.markdown-line:hover {
|
|
background: var(--row-hover);
|
|
}
|
|
|
|
.markdown-hidden-source {
|
|
display: none;
|
|
}
|
|
</style>
|
|
</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="markdown-view">
|
|
|
|
<div class="markdown-toolbar">
|
|
|
|
<a href="{{ .Path }}">
|
|
Rendered
|
|
</a>
|
|
|
|
<a href="/e/-{{ .Path }}">
|
|
Edit
|
|
</a>
|
|
|
|
<a href="/v/plain{{ .Path }}">
|
|
Plain
|
|
</a>
|
|
|
|
<a href="/:/compile/markdown{{ .Path }}">
|
|
Compile
|
|
</a>
|
|
|
|
<button type="button" onclick="copyMarkdown()">
|
|
Copy
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="markdown-path">
|
|
{{ .Path }}
|
|
</div>
|
|
|
|
<pre class="markdown-hidden-source"><code id="markdown-raw" class="language-markdown">{{ .MarkdownRaw }}</code></pre>
|
|
|
|
<div class="markdown-source">
|
|
|
|
{{ range .Lines }}
|
|
|
|
<div class="markdown-line">
|
|
<div class="markdown-line-no">
|
|
{{ .Number }}
|
|
</div>
|
|
|
|
<code class="markdown-line-code language-markdown">
|
|
{{ .Text }}
|
|
</code>
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/prism.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-markdown.min.js"></script>
|
|
|
|
<script>
|
|
function copyMarkdown() {
|
|
const raw =
|
|
document.getElementById(
|
|
"markdown-raw"
|
|
).textContent
|
|
|
|
navigator.clipboard.writeText(
|
|
raw
|
|
)
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
{{ end }}
|