anbot

e6541c4 / webui.mjs

View file at this commit

diff --git a/webui.mjs b/webui.mjs
index 96140b2..df5a5c9 100644
--- a/webui.mjs
+++ b/webui.mjs
@@ -38,7 +38,7 @@ ${style}
 <body>
 ${body}
 <hr>
-<p><a href="/">ANBot repository</a></p>
+<p><a href="/git">Git</a> · <a href="/">Social feed</a></p>
 </body>
 </html>
 `
@@ -93,7 +93,7 @@ ${rows}
 export function indexPage({ name, cloneUrl, branch, repoId, updateId, commits, entries }) {
   const head = commits[0]
   const body = `<h1>${escapeHtml(name)}</h1>
-<p><a href="./feed">Social feed</a></p>
+<p><a href="/">Social feed</a></p>
 ${statusTable([
     ['Branch', escapeHtml(branch)],
     ['HEAD', head ? `<a href="/commit/${head.hash}"><code>${shortHash(head.hash)}</code></a> ${escapeHtml(head.subject)}` : 'none'],
@@ -124,7 +124,7 @@ ${content}`
 
 export function feedPage({ posts, author, post, missing }) {
   const title = missing ? 'Post or author not found' : post ? 'Post' : author ? 'Author feed' : 'ANBot feed'
-  const back = missing || author || post ? '<p><a href="./feed">All posts</a></p>\n' : ''
+  const back = missing || author || post ? ' · <a href="/">All posts</a>' : ''
   const heading = author ? `<p><code>${escapeHtml(author)}</code></p>\n` : ''
   const thread = post ? `${feedPost(post)}\n<h2>Replies</h2>\n` : ''
   const entries = missing ? '' : posts.map(feedPost).join('\n<hr>\n') ||
@@ -134,7 +134,8 @@ export function feedPage({ posts, author, post, missing }) {
 <head><title>${title}</title></head>
 <body>
 <h1>${title}</h1>
-${back}${heading}${thread}<div id="feed-entries">${entries}</div>
+<nav aria-label="ANBot"><a href="/git">Git</a>${back}</nav>
+${heading}${thread}<div id="feed-entries">${entries}</div>
 ${missing ? '' : '<script src="./feed-live.js" defer></script>'}
 </body>
 </html>

Git · Social feed