mirror of
https://github.com/CorentinTh/it-tools.git
synced 2024-09-11 13:37:53 +03:00
Compare commits
2 Commits
aa90b72f29
...
48b8a7f60a
Author | SHA1 | Date | |
---|---|---|---|
|
48b8a7f60a | ||
|
aee135386b |
1
components.d.ts
vendored
1
components.d.ts
vendored
@ -132,6 +132,7 @@ declare module '@vue/runtime-core' {
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NForm: typeof import('naive-ui')['NForm']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NGi: typeof import('naive-ui')['NGi']
|
||||
NGrid: typeof import('naive-ui')['NGrid']
|
||||
|
@ -4,6 +4,7 @@ import { useHead } from '@vueuse/head';
|
||||
import type { HeadObject } from '@vueuse/head';
|
||||
import VueMarkdown from 'vue-markdown-render';
|
||||
|
||||
import { useThemeVars } from 'naive-ui';
|
||||
import BaseLayout from './base.layout.vue';
|
||||
import FavoriteButton from '@/components/FavoriteButton.vue';
|
||||
import type { Tool } from '@/tools/tools.types';
|
||||
@ -33,7 +34,10 @@ const toolFooter = computed<string>(() => {
|
||||
const createLink = (linkText: string, url: string) => {
|
||||
return `[${linkText.replace('[', '\\[').replace(']', '\\]')}](${url.replace('(', '%28').replace(')', '%29')})`;
|
||||
};
|
||||
const footer = t(`tools.${i18nKey.value}.footer`, String(route.meta.footer));
|
||||
let footer = t(`tools.${i18nKey.value}.footer`, String(route.meta.footer));
|
||||
if (footer === 'undefined') {
|
||||
footer = '';
|
||||
}
|
||||
const npmPackages = (route.meta.npmPackages as string[] || [])
|
||||
.map(
|
||||
packageName => createLink(
|
||||
@ -42,6 +46,7 @@ const toolFooter = computed<string>(() => {
|
||||
);
|
||||
return ((npmPackages.length > 0 ? `Made with ${npmPackages.join(', ')}\n` : '') + footer).trim();
|
||||
});
|
||||
const themeVars = useThemeVars();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -124,9 +129,15 @@ const toolFooter = computed<string>(() => {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
.tool-footer {
|
||||
}
|
||||
.tool-footer {
|
||||
opacity: 0.7;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
|
||||
::v-deep(a) {
|
||||
color: v-bind('themeVars.textColor1');
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user