All checks were successful
Gitea Actions Demo / build (push) Successful in 2m13s
57 lines
1.8 KiB
Handlebars
57 lines
1.8 KiB
Handlebars
<html>
|
|
|
|
</html>
|
|
|
|
<head>
|
|
<meta charset='utf-8' />
|
|
<title>Chip's Attic</title>
|
|
<script src='https://cdn.tailwindcss.com'></script>
|
|
<script>
|
|
function copyMarkdown() {
|
|
const markdownContent = document.getElementById("markdown-content").innerText;
|
|
navigator.clipboard.writeText(markdownContent);
|
|
markdownContent.select();
|
|
document.execCommand("Copy");
|
|
alert("Copied to clipboard!");
|
|
}
|
|
function startup() {
|
|
const el = document.getElementById("markdown");
|
|
el.addEventListener("touchend", copyMarkdown);
|
|
el.addEventListener("click", copyMarkdown);
|
|
console.log("Initialized.");
|
|
}
|
|
|
|
document.addEventListener("DOMContentLoaded", startup);
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div>
|
|
<h1 class="text-xl">Attic Item</h1>
|
|
<p>The attic item was uploaded {{lastModified}}</p>
|
|
<h2>Description</h2>
|
|
<p class="bg-slate-100 px-2 py-4">{{description}}</p>
|
|
<p>Right-click copy: <a class="text-blue-500 underline" href='/attic/{{slug}}'>{{slug}}</a></p>
|
|
<p id="markdown" class="cursor-pointer mt-2">Click/tap to copy markdown <pre id="markdown-content">[Attic: {{slug}}](https://api.us.dev/attic/{{slug}})</pre></p>
|
|
{{#if items}}
|
|
<p class="text-lg">Files:</p>
|
|
<div class="list-disc list-inside ml-1">
|
|
{{#each items}}
|
|
<div>
|
|
<a target="_blank" class="text-emerald-600" href='/attic/{{../slug}}/{{filename}}'>
|
|
<p>
|
|
{{filename}}
|
|
</p>
|
|
{{#if isImage}}
|
|
<img height="150" width="150" src='/attic/{{../slug}}/{{filename}}' alt='{{filename}}' />
|
|
{{/if}}
|
|
</a>
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
<p><a class="text-blue-500 underline" href='/attic'>Upload another file</a></p>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |