diff --git a/index.ts b/index.ts index 85c941e..4eacd73 100644 --- a/index.ts +++ b/index.ts @@ -40,6 +40,8 @@ const ICON_SUN = ``; +const ICON_EXTERNAL = ``; + const TOGGLE_SCRIPT = ` function toggleTheme() { const root = document.documentElement; @@ -176,27 +178,27 @@ function rfcPage(rfc: RFC, repoUrl: string | null, liveReload: boolean = false): // Accepted date if (rfc.git.accepted) { - const acceptedLink = repoUrl - ? `${formatDate(rfc.git.accepted.date)}` - : formatDate(rfc.git.accepted.date); + const commitLink = repoUrl + ? ` ${ICON_EXTERNAL}` + : ""; gitHeader += `
Accepted: - ${acceptedLink} + ${formatDate(rfc.git.accepted.date)}${commitLink}
`; } // Last updated date if (rfc.git.lastUpdated) { - const updatedLink = repoUrl - ? `${formatDate(rfc.git.lastUpdated.date)}` - : formatDate(rfc.git.lastUpdated.date); + const commitLink = repoUrl + ? ` ${ICON_EXTERNAL}` + : ""; gitHeader += `
Last updated: - ${updatedLink} + ${formatDate(rfc.git.lastUpdated.date)}${commitLink}
`; } diff --git a/styles.css b/styles.css index 1d00cbf..bd6d3a5 100644 --- a/styles.css +++ b/styles.css @@ -342,13 +342,29 @@ th { color: var(--fg-muted); } +.rfc-meta-value { + display: inline-flex; + align-items: center; + gap: 0.375rem; +} + .commit-link { + display: inline-flex; + align-items: center; color: var(--link); } .commit-link:hover { color: var(--link-hover); - text-decoration: underline; +} + +.commit-link svg { + display: block; + transition: stroke-width 0.1s ease; +} + +.commit-link:hover svg { + stroke-width: 2.5; } .rfc-author {