Skip to content

Commit

Permalink
update footer
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 7, 2025
1 parent f81677d commit 4a64739
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ if (import.meta.dev) {
docs: "",
});
}

const nitroVersion = useRuntimeConfig().nitroVersion;
const commitHash = nitroVersion.split(".").pop();
const version = nitroVersion.split("-")[0];
const gitURL = `https://github.com/nitrojs/nitro/tree/${commitHash || `v${version}`}`;

export default defineEventHandler((event) => {
const url = getRequestURL(event, {
xForwardedHost: true,
Expand Down Expand Up @@ -121,13 +127,14 @@ export default defineEventHandler((event) => {
.join("\n")}
</select>
</div>
<div class="mt-2">
<p>Generated at ${new Date().toUTCString()}</p>
<p>
<a href="https://nitro.unjs.io/" class="underline" target="_blank" rel="noopener">Nitro</a><span
<div class="mt-2 pt-4">
<p class="text-xs text-gray-100">Generated at ${new Date().toUTCString()}</p>
<p class="text-xs">
<a href="${gitURL}" class="underline" target="_blank" rel="noopener">Nitro<span
class="text-gray-200">@${useRuntimeConfig().nitroVersion}</span>
</a>
</p>
<p class="text-center">
<p class="text-xs">
<a href="https://github.com/nitrojs/nitro-deploys" class="underline" target="_blank" rel="noopener">source code</a>
</a>
</p>
Expand Down

0 comments on commit 4a64739

Please sign in to comment.