diff --git a/index.ts b/index.ts
index 43d614d..85c941e 100644
--- a/index.ts
+++ b/index.ts
@@ -78,6 +78,7 @@ function baseHTML(title: string, content: string, cssPath: string = "styles.css"
${escapeHTML(title)}
+
@@ -110,16 +111,32 @@ function escapeHTML(str: string): string {
.replace(/"/g, """);
}
-function indexPage(rfcs: RFC[], liveReload: boolean = false): string {
- const sorted = [...rfcs].sort((a, b) => a.number.localeCompare(b.number));
+function indexPage(rfcs: RFC[], repoUrl: string | null, liveReload: boolean = false): string {
+ // Sort in reverse numeric order (newest first)
+ const sorted = [...rfcs].sort((a, b) => b.number.localeCompare(a.number));
+
+ const list = sorted.map(rfc => {
+ const dateStr = rfc.git.accepted ? formatDate(rfc.git.accepted.date) : "";
+
+ let authorHTML = "";
+ if (rfc.git.author && rfc.git.accepted) {
+ const commitUrl = repoUrl ? `${repoUrl}/commit/${rfc.git.accepted.hash}` : `https://github.com/${rfc.git.author.login}`;
+ authorHTML = `
+
+
+ ${rfc.git.author.login}
+ `;
+ }
- const list = sorted.map(rfc => `
+ return `
RFC ${rfc.number}
${escapeHTML(rfc.title)}
-
- `).join("\n");
+ ${dateStr}
+ ${authorHTML}
+ `;
+ }).join("\n");
const content = `
Request for Comments
@@ -374,7 +391,7 @@ async function build(liveReload: boolean = false): Promise {
}
// Generate index page
- const indexHTML = indexPage(rfcs, liveReload);
+ const indexHTML = indexPage(rfcs, repoUrl, liveReload);
await Bun.write("dist/index.html", indexHTML);
console.log("Generated dist/index.html");
diff --git a/styles.css b/styles.css
index f421875..1d00cbf 100644
--- a/styles.css
+++ b/styles.css
@@ -238,20 +238,32 @@ th {
}
.rfc-list li {
- border-bottom: 1px solid var(--border);
- margin-bottom: 0;
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ padding: 0.75rem 1rem;
+ margin: 0 -1rem;
+ border-radius: 4px;
+ transition: box-shadow 0.15s ease, background 0.15s ease;
+}
+
+.rfc-list li:hover {
+ background: var(--bg-alt);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
-.rfc-list li:last-child {
- border-bottom: none;
+:root[data-theme="dark"] .rfc-list li:hover {
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.rfc-item {
- display: block;
- padding: 1rem 0;
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ flex: 1;
text-decoration: none;
color: var(--fg);
- transition: background 0.1s ease;
+ min-width: 0;
}
.rfc-item:hover {
@@ -262,12 +274,50 @@ th {
.rfc-item .rfc-number {
color: var(--fg-muted);
font-size: 0.875rem;
+ flex-shrink: 0;
+ width: 5rem;
}
.rfc-item .rfc-title {
- display: block;
font-weight: 500;
- margin-top: 0.25rem;
+ flex: 1;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.rfc-item .rfc-date {
+ color: var(--fg-muted);
+ font-size: 0.875rem;
+ flex-shrink: 0;
+}
+
+.rfc-author-link {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ color: var(--fg-muted);
+ text-decoration: none;
+ flex-shrink: 0;
+}
+
+.rfc-author-link:hover {
+ color: var(--link);
+}
+
+.rfc-author-link:hover .rfc-author-name {
+ text-decoration: underline;
+}
+
+.rfc-author-avatar {
+ width: 24px;
+ height: 24px;
+ border-radius: 50%;
+}
+
+.rfc-author-name {
+ font-size: 0.875rem;
}
/* RFC page specific */