feat: Add version to footer

This commit is contained in:
Xyphyn committed 2023-07-14 15:58:37 -07:00
1 parent eccbcb02e4
commit 8eb1e46d30
6 files changed
+17 -8

No files matched your search

+3 -1
View File
@@ -7,6 +7,8 @@ declare global {
// interface PageData {} // interface PageData {}
// interface Platform {} // interface Platform {}
} }
declare const __VERSION__: string
} }
export {}; export {}
declare const __VERSION__: string
+2 -1
View File
@@ -51,5 +51,6 @@
<FormattedNumber number={site.counts.communities} /> <FormattedNumber number={site.counts.communities} />
</span> </span>
</div> </div>
<Markdown source={site.site.description} /> <p class="text-sm">{site.site.description}</p>
<Markdown source={site.site.sidebar} />
</StickyCard> </StickyCard>
+2 -3
View File
@@ -16,7 +16,6 @@
ArrowLeftOnRectangle, ArrowLeftOnRectangle,
ArrowRightOnRectangle, ArrowRightOnRectangle,
Beaker, Beaker,
Cog6Tooth,
GlobeAlt, GlobeAlt,
Icon, Icon,
Inbox, Inbox,
@@ -28,10 +27,10 @@
<nav <nav
class="sticky top-0 bg-slate-50/80 dark:bg-zinc-950/80 backdrop-blur-3xl flex class="sticky top-0 bg-slate-50/80 dark:bg-zinc-950/80 backdrop-blur-3xl flex
flex-row gap-4 items-center w-full py-1 z-20 px-4" flex-row gap-4 items-center w-full py-1 z-50 px-4"
> >
<div <div
class="flex flex-row gap-4 items-center max-w-5xl w-full mx-auto px-4 my-1" class="flex flex-row gap-4 items-center max-w-5xl w-full mx-auto px-4 my-1 z-50"
> >
<div class="flex flex-row gap-2 items-center mr-auto"> <div class="flex flex-row gap-2 items-center mr-auto">
<a href="/" class="flex flex-row items-center gap-2"> <a href="/" class="flex flex-row items-center gap-2">
+5 -2
View File
@@ -16,13 +16,13 @@
if ($navigating) { if ($navigating) {
nProgress.start() nProgress.start()
if (typeof document != 'undefined') { if (typeof document != 'undefined') {
document.body.classList.toggle('wait', true) document.documentElement.classList.toggle('wait', true)
} }
} }
if (!$navigating) { if (!$navigating) {
nProgress.done() nProgress.done()
if (typeof document != 'undefined') { if (typeof document != 'undefined') {
document.body.classList.toggle('wait', false) document.documentElement.classList.toggle('wait', false)
} }
} }
} }
@@ -33,3 +33,6 @@
<div class="mx-auto max-w-5xl p-4 h-full"> <div class="mx-auto max-w-5xl p-4 h-full">
<slot /> <slot />
</div> </div>
<footer>
<p>{__VERSION__}</p>
</footer>
+1 -1
View File
@@ -20,7 +20,7 @@ const config = {
}, },
mode: 'nonce' mode: 'nonce'
} }
} },
}; };
export default config; export default config;
+4
View File
@@ -3,4 +3,8 @@ import { defineConfig, type PluginOption } from 'vite'
export default defineConfig({ export default defineConfig({
plugins: [sveltekit()], plugins: [sveltekit()],
define: {
__VERSION__: JSON.stringify(process.env.npm_package_version),
},
}) })