Skip to content

Commit

Permalink
chore: show the version of rayine-ui in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
HoshinoSuzumi committed Nov 22, 2024
1 parent e06d10e commit 421de5a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
11 changes: 6 additions & 5 deletions docs/components/TitleBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// const appConfig = useAppConfig();
// appConfig.rayui.primary = 'red';
const route = useRoute()
const runtimeConfig = useRuntimeConfig().public
</script>

<template>
Expand All @@ -11,18 +12,18 @@ const route = useRoute()
>
<NuxtLink to="/" class="text-neutral-900 dark:text-neutral-100">
<h1 class="font-medium text-xl">
RayineSoft<sup class="text-sm"> &copy;</sup>
RayineUI<sup class="text-xs">&nbsp;<span class="text-primary font-medium">{{ runtimeConfig.version }}</span></sup>
</h1>
<h2 class="font-normal text-xs">
Common Components
RayineSoft Components Lib
</h2>
</NuxtLink>
<div class="flex items-center gap-4">
<NuxtLink
to="/getting-started"
to="https://github.com/HoshinoSuzumi/rayine-ui"
target="_blank"
class="text-neutral-400 dark:text-neutral-500"
active-class="!text-neutral-700 dark:!text-neutral-300"
>Docs</NuxtLink>
>GitHub</NuxtLink>
</div>
</header>
</template>
Expand Down
6 changes: 6 additions & 0 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import defaultTheme from 'tailwindcss/defaultTheme'
import colors from 'tailwindcss/colors'
import module from '../src/module'
import { excludeColors } from '../src/runtime/utils/colors'
import pkg from '../package.json'

const { resolve } = createResolver(import.meta.url)

Expand Down Expand Up @@ -34,6 +35,11 @@ export default defineNuxtConfig({
themes: ['material-theme-lighter', 'material-theme'],
},
},
runtimeConfig: {
public: {
version: pkg.version,
},
},
routeRules: {
'/components': { redirect: '/components/button' },
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.2.0",
"description": "RayineSoft UI Components",
"repository": "HoshinoSuzumi/rayine-ui",
"homepage": "https://rayui.uniiem.com",
"license": "MIT",
"type": "module",
"exports": {
Expand Down Expand Up @@ -54,4 +55,4 @@
"vitest": "^2.1.5",
"vue-tsc": "^2.1.10"
}
}
}

0 comments on commit 421de5a

Please sign in to comment.