mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 06:55:06 -04:00
feat: footer in sider
This commit is contained in:
parent
5fde77604c
commit
3f038503dd
3 changed files with 53 additions and 0 deletions
10
env.d.ts
vendored
10
env.d.ts
vendored
|
@ -1,2 +1,12 @@
|
||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
/// <reference types="vite-svg-loader" />
|
/// <reference types="vite-svg-loader" />
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
PACKAGE_VERSION: string;
|
||||||
|
PROD: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv;
|
||||||
|
}
|
||||||
|
|
|
@ -15,6 +15,9 @@ const themeVars = useThemeVars()
|
||||||
const activeKey = ref(null)
|
const activeKey = ref(null)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const styleStore = useStyleStore()
|
const styleStore = useStyleStore()
|
||||||
|
const version = import.meta.env.PACKAGE_VERSION;
|
||||||
|
|
||||||
|
console.log(themeVars.value)
|
||||||
|
|
||||||
const makeLabel = (text: string, to: string) => () => h(RouterLink, { to }, { default: () => text })
|
const makeLabel = (text: string, to: string) => () => h(RouterLink, { to }, { default: () => text })
|
||||||
const makeIcon = (icon: Component) => () => h(NIcon, null, { default: () => h(icon) })
|
const makeIcon = (icon: Component) => () => h(NIcon, null, { default: () => h(icon) })
|
||||||
|
@ -71,6 +74,36 @@ const m = toolsByCategory.map(category => ({
|
||||||
:options="m"
|
:options="m"
|
||||||
:indent="20"
|
:indent="20"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div>
|
||||||
|
IT-Tools
|
||||||
|
|
||||||
|
<n-button
|
||||||
|
text
|
||||||
|
tag="a"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
type="primary"
|
||||||
|
depth="3"
|
||||||
|
:href="`https://github.com/CorentinTh/it-tools/tree/v${version}`"
|
||||||
|
>
|
||||||
|
v{{ version }}
|
||||||
|
</n-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
© {{ new Date().getFullYear() }}
|
||||||
|
<n-button
|
||||||
|
text
|
||||||
|
tag="a"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
type="primary"
|
||||||
|
>
|
||||||
|
Corentin Thomasset
|
||||||
|
</n-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -164,6 +197,13 @@ const m = toolsByCategory.map(category => ({
|
||||||
// background-size: @size @size;
|
// background-size: @size @size;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
color: #838587;
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
.sider-content {
|
.sider-content {
|
||||||
padding-top: 160px;
|
padding-top: 160px;
|
||||||
padding-bottom: 200px;
|
padding-bottom: 200px;
|
||||||
|
|
|
@ -59,4 +59,7 @@ export default defineConfig({
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
define: {
|
||||||
|
'import.meta.env.PACKAGE_VERSION': JSON.stringify(process.env.npm_package_version),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue